Re: pca953x: Probing too early

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

 



On Tue, Aug 20, 2024 at 6:04 PM Frank Li <Frank.li@xxxxxxx> wrote:

> I am not sure how this happen. i2c device should be probed by i2c bus
> driver. Only after i2c bus probe, which scan i2c device, then i2c device
> driver probe can be called.

Exactly. This is my understanding as well.

I don't understand how the PCA953X driver can probe before its I2C parent.

For now, I am registering imx-i2c like this:

--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1639,17 +1639,7 @@ static struct platform_driver i2c_imx_driver = {
        .id_table = imx_i2c_devtype,
 };

-static int __init i2c_adap_imx_init(void)
-{
-       return platform_driver_register(&i2c_imx_driver);
-}
-subsys_initcall(i2c_adap_imx_init);
-
-static void __exit i2c_adap_imx_exit(void)
-{
-       platform_driver_unregister(&i2c_imx_driver);
-}
-module_exit(i2c_adap_imx_exit);
+module_platform_driver(i2c_imx_driver);

No errors are seen so far.

What do you think?





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux