Commit a65aa0ce authored by Linus Walleij's avatar Linus Walleij Committed by Lee Jones
Browse files

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 417c0fc2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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_ */
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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), \