summaryrefslogtreecommitdiff
path: root/drivers/power/supply/ab8500-bm.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-05-23 01:50:39 +0300
committerSebastian Reichel <sre@kernel.org>2021-06-03 19:40:15 +0300
commit1c1f13a006ed0d71bb5664c8b7e3e77a28da3beb (patch)
tree2e1cc7e00fb9baff932c51571bda3b1f91521863 /drivers/power/supply/ab8500-bm.h
parent94233f11f8b6be9dd78f66cca162de66b7b66ae6 (diff)
downloadlinux-1c1f13a006ed0d71bb5664c8b7e3e77a28da3beb.tar.xz
power: supply: ab8500: Move to componentized binding
The driver has problems with the different components of the charging code racing with each other to probe(). This results in all four subdrivers populating battery information to ascertain that it is populated for their own needs for example. Fix this by using component probing and thus expressing to the kernel that these are dependent components. The probes can happen in any order and will only acquire resources such as state container, regulators and interrupts and initialize the data structures, but no execution happens until the .bind() callback is called. The charging driver is the main component and binds first, then bind in order the three subcomponents: ab8500-fg, ab8500-btemp and ab8500-chargalg. Do some housekeeping while we are moving the code around. Like use devm_* for IRQs so as to cut down on some boilerplate. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply/ab8500-bm.h')
-rw-r--r--drivers/power/supply/ab8500-bm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/power/supply/ab8500-bm.h b/drivers/power/supply/ab8500-bm.h
index 41c69a4f2a1f..012595a9d269 100644
--- a/drivers/power/supply/ab8500-bm.h
+++ b/drivers/power/supply/ab8500-bm.h
@@ -730,4 +730,8 @@ int ab8500_bm_of_probe(struct device *dev,
struct device_node *np,
struct abx500_bm_data *bm);
+extern struct platform_driver ab8500_fg_driver;
+extern struct platform_driver ab8500_btemp_driver;
+extern struct platform_driver abx500_chargalg_driver;
+
#endif /* _AB8500_CHARGER_H_ */