diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2016-01-11 20:46:49 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2016-03-09 06:58:50 +0100 |
commit | dbc352b9f16de45277abf2e30d0317ce55fc1e57 (patch) | |
tree | 665bc45eb5549e55079a4d48723032cbdb6f1b19 /drivers/mfd | |
parent | Merge branches 'ib-mfd-clk-4.6', 'ib-mfd-input-iio-4.6', 'ib-mfd-regulator-4.... (diff) | |
download | linux-dbc352b9f16de45277abf2e30d0317ce55fc1e57.tar.xz linux-dbc352b9f16de45277abf2e30d0317ce55fc1e57.zip |
mfd: tps65010: Fix init when the driver is built-in
tps65010 driver's initcall cannot succeed when the driver is built-in,
because it expects that the I2C probe is completed at initcall time;
this cannot happen as MFD is initialized before I2C. Also on systems
where the chip is not present there is unnecessary 30 ms delay during
the boot.
Instead of waiting for probe to finish, just register the I2C device.
If some boards need retry mechanism for startup glitches, that should be
done in the actual probe function. Also delete the driver banner message.
The patch allows to use tps65010 again with OMAP1 (where it's required
to be built-in) and enables e.g. USB and LED functionality on OMAP5912 OSK.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/tps65010.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c index 83e615ed100a..495e4518fc29 100644 --- a/drivers/mfd/tps65010.c +++ b/drivers/mfd/tps65010.c @@ -1059,26 +1059,7 @@ EXPORT_SYMBOL(tps65013_set_low_pwr); static int __init tps_init(void) { - u32 tries = 3; - int status = -ENODEV; - - printk(KERN_INFO "%s: version %s\n", DRIVER_NAME, DRIVER_VERSION); - - /* some boards have startup glitches */ - while (tries--) { - status = i2c_add_driver(&tps65010_driver); - if (the_tps) - break; - i2c_del_driver(&tps65010_driver); - if (!tries) { - printk(KERN_ERR "%s: no chip?\n", DRIVER_NAME); - return -ENODEV; - } - pr_debug("%s: re-probe ...\n", DRIVER_NAME); - msleep(10); - } - - return status; + return i2c_add_driver(&tps65010_driver); } /* NOTE: this MUST be initialized before the other parts of the system * that rely on it ... but after the i2c bus on which this relies. |