Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd/power: ab8500: Push algorithm to power supply code

The charging algorithm header is only used locally in the
power supply subsystem so push this down into
drivers/power/supply and rename from the confusing
"ux500_chargalg.h" to "ab8500-chargalg.h" for clarity:
it is only used with the AB8500.

This is another remnant of non-DT code needing to pass
data from boardfiles, which we don't do anymore.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Linus Walleij and committed by
Lee Jones
a65aa0ce 417c0fc2

+6 -6
+1 -1
drivers/power/supply/ab8500_charger.c
··· 28 28 #include <linux/mfd/core.h> 29 29 #include <linux/mfd/abx500/ab8500.h> 30 30 #include <linux/mfd/abx500.h> 31 - #include <linux/mfd/abx500/ux500_chargalg.h> 32 31 #include <linux/usb/otg.h> 33 32 #include <linux/mutex.h> 34 33 #include <linux/iio/consumer.h> 35 34 36 35 #include "ab8500-bm.h" 36 + #include "ab8500-chargalg.h" 37 37 38 38 /* Charger constants */ 39 39 #define NO_PW_CONN 0
+1 -1
drivers/power/supply/abx500_chargalg.c
··· 28 28 #include <linux/mfd/core.h> 29 29 #include <linux/mfd/abx500.h> 30 30 #include <linux/mfd/abx500/ab8500.h> 31 - #include <linux/mfd/abx500/ux500_chargalg.h> 32 31 #include <linux/notifier.h> 33 32 34 33 #include "ab8500-bm.h" 34 + #include "ab8500-chargalg.h" 35 35 36 36 /* Watchdog kick interval */ 37 37 #define CHG_WD_INTERVAL (6 * HZ)
+1 -1
drivers/power/supply/pm2301_charger.c
··· 18 18 #include <linux/i2c.h> 19 19 #include <linux/workqueue.h> 20 20 #include <linux/mfd/abx500/ab8500.h> 21 - #include <linux/mfd/abx500/ux500_chargalg.h> 22 21 #include <linux/pm2301_charger.h> 23 22 #include <linux/gpio.h> 24 23 #include <linux/pm_runtime.h> 25 24 #include <linux/pm.h> 26 25 27 26 #include "ab8500-bm.h" 27 + #include "ab8500-chargalg.h" 28 28 #include "pm2301_charger.h" 29 29 30 30 #define to_pm2xxx_charger_ac_device_info(x) container_of((x), \
+3 -3
include/linux/mfd/abx500/ux500_chargalg.h drivers/power/supply/ab8500-chargalg.h
··· 4 4 * Author: Johan Gardsmark <johan.gardsmark@stericsson.com> for ST-Ericsson. 5 5 */ 6 6 7 - #ifndef _UX500_CHARGALG_H 8 - #define _UX500_CHARGALG_H 7 + #ifndef _AB8500_CHARGALG_H_ 8 + #define _AB8500_CHARGALG_H_ 9 9 10 10 #include <linux/power_supply.h> 11 11 ··· 48 48 49 49 extern struct blocking_notifier_head charger_notifier_list; 50 50 51 - #endif 51 + #endif /* _AB8500_CHARGALG_H_ */