lkml.org 
[lkml]   [2018]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND PATCH v1 2/6] i2c: i2c-stm32f7: Add slave support

> I do believe the hw can support it, even it looks odd to me having the same I2C
> in slave and master mode at the same time.

I2C is multi-master, so it is perfectly valid for a device to be master
and slave. I do have seen designs making use of that more than once.

> Nevertheless the driver is devised to support either master or slave more but
> not at the same time.

Why should we limit ourselves here? Also, why should we have an
unnecessary configuration option?

Unless the HW is broken and does not support it, I usually don't accept
slave-only solutions. If the needs for master and slave arises later,
this is hard to refactor and better done properly right away.

Is it so hard? Usually you have irqs for master and for slave seperated,
so you can code things quite orthogonal. Check de20d1857dd6 ("i2c: rcar:
add slave support") as an example.

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-03-20 10:52    [W:0.060 / U:2.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site