Re: i2c-mux registered too late?

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

 



On Wed, 2018-08-29 at 19:42 +0200, Wolfram Sang wrote:
> On Wed, Aug 29, 2018 at 02:20:19PM +0000, Joakim Tjernlund wrote:
> > I see when I boot:
> > [    0.602608] i2c /dev entries driver
> > [    0.608010] mpc-i2c e0003000.i2c: timeout 1000000 us
> > [    0.623056] rtc-ds1307 1-0068: read: 17 33 13 04 29 08 18
> > [    0.623096] rtc-ds1307 1-0068: read secs=17, mins=33, hours=13, mday=29, mon=7, year=118, wday=3
> > [    0.623554] rtc-ds1307 1-0068: char device (253:0)
> > [    0.623609] rtc-ds1307 1-0068: registered as rtc0
> > [    0.629544] i2c i2c-0: Added multiplexed i2c bus 1
> > [    0.635788] i2c i2c-0: Added multiplexed i2c bus 2
> > [    0.642584] i2c i2c-0: Added multiplexed i2c bus 3
> > [    0.649617] i2c i2c-0: Added multiplexed i2c bus 4
> > [    0.657617] i2c i2c-0: Added multiplexed i2c bus 5
> > [    0.666545] i2c i2c-0: Added multiplexed i2c bus 6
> > [    0.673730] i2c i2c-0: Added multiplexed i2c bus 7
> > [    0.679968] i2c i2c-0: Added multiplexed i2c bus 8
> > [    0.686263] i2c i2c-0: Added multiplexed i2c bus 9
> > [    0.692515] i2c i2c-0: Added multiplexed i2c bus 10
> > [    0.698832] i2c i2c-0: Added multiplexed i2c bus 11
> > [    0.705256] i2c i2c-0: Added multiplexed i2c bus 12
> > [    0.711551] i2c i2c-0: Added multiplexed i2c bus 13
> > [    0.717979] i2c i2c-0: Added multiplexed i2c bus 14
> > [    0.724342] i2c i2c-0: Added multiplexed i2c bus 15
> > [    0.730654] i2c i2c-0: Added multiplexed i2c bus 16
> > [    0.735635] i2c-mux-gpio e0000000.soc8321:i2cmux: 16 port mux on MPC adapter at 0xe0003000 adapter
> > 
> > This looks like the I2C based RTC is accessed before i2c-mux-gpio is active?
> 
> I once got confused by this, too. As part of the initialization of the
> mux, all devices behind it are probed. During that probe, transactions
> happen. Once all devices are probed, then the mux initialization is
> finished, and *then* the "added bus" message is printed.
> 
> Couldn't think of a better way back then, because we don't want to print
> this message before everything with regard to the mux initialization was
> successful.

I don't get why you think mux init cannot be considered done until
all devices are done too. This would make much more sense too me:
[    0.629544] i2c i2c-0: Added multiplexed i2c bus 1
[    0.623056] rtc-ds1307 1-0068: read: 17 33 13 04 29 08 18
[    0.623096] rtc-ds1307 1-0068: read secs=17, mins=33, hours=13, mday=29, mon=7, year=118, wday=3
[    0.623554] rtc-ds1307 1-0068: char device (253:0)
[    0.623609] rtc-ds1307 1-0068: registered as rtc0
[    0.635788] i2c i2c-0: Added multiplexed i2c bus 2
....

Good to know this is just a "mirage" though, thanks.

> 
> At least, this is how I recall all of this.





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux