Re: Using the gpio i2c multiplexer driver

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

 



>>>>> "Guenter" == Guenter Roeck <guenter.roeck@xxxxxxxxxxxx> writes:

 Guenter> Hi all,

 Guenter> I am trying to use the new GPIO based I2C
 Guenter> multiplexer. Unfortunately, I have an initialization problem
 Guenter> with it.

 Guenter> Some time after registering the multiplexer as platform driver, its
 Guenter> probe function is called. Unfortunately, that does not happen in sync
 Guenter> with I2C adapter initialization. The GPIO mux probe function is called
 Guenter> before the parent's (ie the multiplexed I2C adapter) probe function is
 Guenter> called. As a result, the GPIO mux driver does not find its parent i2c
 Guenter> adapter, and the probe function aborts with an error.

 Guenter> Any idea how I I can fix the problem, ie how I can ensure that
 Guenter> the GPIO mux probe function is only called after its parent
 Guenter> I2C adapter is initialized ?

What i2c bus controller are you using? Are you registering it's platform
data very late (E.G. after you register the platform data for gpiomux)?

If you do register the platform data in the correct order, things SHOULD
work correctly as busses are listed in drivers/i2c/Makefile before
muxes, but alternatively you could play with the init order (E.G. use
subsys_initcall instead of module_init in the bus driver, see
b8680784875 for an example).

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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