summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-03-12 09:36:03 +0100
committerLee Jones <lee.jones@linaro.org>2021-03-22 14:55:51 +0000
commita65aa0ce23bd3bc29c9f3a6a90fe032e1dbd8f34 (patch)
tree52df88ce2030dc48f1464fc0b4a348c3900efef8
parent417c0fc24dd4dbd60d94fa8deb36bf1176930e06 (diff)
downloadlinux-a65aa0ce23bd3bc29c9f3a6a90fe032e1dbd8f34.tar.bz2
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>
-rw-r--r--drivers/power/supply/ab8500-chargalg.h (renamed from include/linux/mfd/abx500/ux500_chargalg.h)6
-rw-r--r--drivers/power/supply/ab8500_charger.c2
-rw-r--r--drivers/power/supply/abx500_chargalg.c2
-rw-r--r--drivers/power/supply/pm2301_charger.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/mfd/abx500/ux500_chargalg.h b/drivers/power/supply/ab8500-chargalg.h
index 9b97d284d0ce..94a6f9068bc5 100644
--- a/include/linux/mfd/abx500/ux500_chargalg.h
+++ b/drivers/power/supply/ab8500-chargalg.h
@@ -4,8 +4,8 @@
* Author: Johan Gardsmark <johan.gardsmark@stericsson.com> for ST-Ericsson.
*/
-#ifndef _UX500_CHARGALG_H
-#define _UX500_CHARGALG_H
+#ifndef _AB8500_CHARGALG_H_
+#define _AB8500_CHARGALG_H_
#include <linux/power_supply.h>
@@ -48,4 +48,4 @@ struct ux500_charger {
extern struct blocking_notifier_head charger_notifier_list;
-#endif
+#endif /* _AB8500_CHARGALG_H_ */
diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index 50989a5ec95c..a9be10eb2c22 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -28,12 +28,12 @@
#include <linux/mfd/core.h>
#include <linux/mfd/abx500/ab8500.h>
#include <linux/mfd/abx500.h>
-#include <linux/mfd/abx500/ux500_chargalg.h>
#include <linux/usb/otg.h>
#include <linux/mutex.h>
#include <linux/iio/consumer.h>
#include "ab8500-bm.h"
+#include "ab8500-chargalg.h"
/* Charger constants */
#define NO_PW_CONN 0
diff --git a/drivers/power/supply/abx500_chargalg.c b/drivers/power/supply/abx500_chargalg.c
index 5b28d58041b4..f5b792243727 100644
--- a/drivers/power/supply/abx500_chargalg.c
+++ b/drivers/power/supply/abx500_chargalg.c
@@ -28,10 +28,10 @@
#include <linux/mfd/core.h>
#include <linux/mfd/abx500.h>
#include <linux/mfd/abx500/ab8500.h>
-#include <linux/mfd/abx500/ux500_chargalg.h>
#include <linux/notifier.h>
#include "ab8500-bm.h"
+#include "ab8500-chargalg.h"
/* Watchdog kick interval */
#define CHG_WD_INTERVAL (6 * HZ)
diff --git a/drivers/power/supply/pm2301_charger.c b/drivers/power/supply/pm2301_charger.c
index 5aeff75db33b..d53e0c37c059 100644
--- a/drivers/power/supply/pm2301_charger.c
+++ b/drivers/power/supply/pm2301_charger.c
@@ -18,13 +18,13 @@
#include <linux/i2c.h>
#include <linux/workqueue.h>
#include <linux/mfd/abx500/ab8500.h>
-#include <linux/mfd/abx500/ux500_chargalg.h>
#include <linux/pm2301_charger.h>
#include <linux/gpio.h>
#include <linux/pm_runtime.h>
#include <linux/pm.h>
#include "ab8500-bm.h"
+#include "ab8500-chargalg.h"
#include "pm2301_charger.h"
#define to_pm2xxx_charger_ac_device_info(x) container_of((x), \