Re: [RFC 4/4] ARM: shmobile: r8a7790: adapt DTS for I2C slave support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> > Why do you want DT to be involved at all?
> 
> Imagine a device which supports both, slave or master mode. The driver needs 
> to know in which mode it should operate. This cannot be hard coded, because on 
> different boards, different modes can be used.

Okay, it sounds weird to me that a device is not able to switch between
master and slave, but if you say so. Also, solving this issue would also
handle potential weird IP blocks which can be slave only, right?

What if you use two different adapter drivers or compatibles? One for
master-mode, one for slave-mode (slave could leave algo->master_xfer
empty, so the slave mode driver cannot send packets). I'm brainstorming
here, so while it should work IMO I will probably need a second thought.

So, in the DT you would have a block registering the I2C slave core
which binds to a simple driver providing reg_slave/unreg_slave and
pass on the slave-event. Then you could instantiate slave clients as
said before.

Maybe we need a real world example?

> The point is, that if we define a dt binding for master device on slave 
> adapters it will be there forever. So even if it makes no sense for the 
> example eeprom simulator (or even our embedded controller), it may make sense 
> for other or future devices.

I don't know what you mean here. Again, an example might help?

Thanks,

   Wolfram

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux