From a65aa0ce23bd3bc29c9f3a6a90fe032e1dbd8f34 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Fri, 12 Mar 2021 09:36:03 +0100 Subject: 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 Acked-by: Sebastian Reichel Signed-off-by: Lee Jones --- include/linux/mfd/abx500/ux500_chargalg.h | 51 ------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 include/linux/mfd/abx500/ux500_chargalg.h (limited to 'include/linux') diff --git a/include/linux/mfd/abx500/ux500_chargalg.h b/include/linux/mfd/abx500/ux500_chargalg.h deleted file mode 100644 index 9b97d284d0ce..000000000000 --- a/include/linux/mfd/abx500/ux500_chargalg.h +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) ST-Ericsson SA 2012 - * Author: Johan Gardsmark for ST-Ericsson. - */ - -#ifndef _UX500_CHARGALG_H -#define _UX500_CHARGALG_H - -#include - -/* - * Valid only for supplies of type: - * - POWER_SUPPLY_TYPE_MAINS, - * - POWER_SUPPLY_TYPE_USB, - * because only them store as drv_data pointer to struct ux500_charger. - */ -#define psy_to_ux500_charger(x) power_supply_get_drvdata(psy) - -/* Forward declaration */ -struct ux500_charger; - -struct ux500_charger_ops { - int (*enable) (struct ux500_charger *, int, int, int); - int (*check_enable) (struct ux500_charger *, int, int); - int (*kick_wd) (struct ux500_charger *); - int (*update_curr) (struct ux500_charger *, int); -}; - -/** - * struct ux500_charger - power supply ux500 charger sub class - * @psy power supply base class - * @ops ux500 charger operations - * @max_out_volt maximum output charger voltage in mV - * @max_out_curr maximum output charger current in mA - * @enabled indicates if this charger is used or not - * @external external charger unit (pm2xxx) - */ -struct ux500_charger { - struct power_supply *psy; - struct ux500_charger_ops ops; - int max_out_volt; - int max_out_curr; - int wdt_refresh; - bool enabled; - bool external; -}; - -extern struct blocking_notifier_head charger_notifier_list; - -#endif -- cgit v1.2.3