Re: [RFC 2/5] i3c: Add core I3C infrastructure

From: Boris Brezillon
Date: Thu Aug 17 2017 - 03:48:47 EST


Le Wed, 16 Aug 2017 23:03:55 +0200,
Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> a Ãcrit :

> On Tue, Aug 1, 2017 at 5:01 PM, Wolfram Sang <wsa@xxxxxxxxxxxxx> wrote:
> >> I'm perfectly fine with the I3C / I2C framework separation. The only
> >> minor problem I had with that was the inaccuracy of the
> >> sysfs/device-model representation: we don't have one i2c and one i3c
> >> bus, we just have one i3c bus with a mix of i2c and i3c devices.
> >
> > I understand that. What if I2C had the same seperation between the "bus"
> > and the "master"?
>
> There can be multiple masters on an i2c bus. But not on an i3c bus, due
> to SCL being push/pull.

I guess you mean there can't be a mix of I2C and I3C masters on the same
bus. Then yes, you're right, you can only connect I2C slaves on an I3C
bus, but I don't think Wolfram suggested this approach to support this
case.

Note that there can be multiple I3C masters on an I3C bus. When a
'secondary master' wants to become the current master it must ask the
permission to the 'current master' which can decide to ack or nack the
request.
As soon as the previous 'current master' accepted to release the bus it
should act as a slave and if it needs to reclaim the bus, it should ask
the new 'current master'.