aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/abx500/ux500_chargalg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd/abx500/ux500_chargalg.h')
-rw-r--r--include/linux/mfd/abx500/ux500_chargalg.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/mfd/abx500/ux500_chargalg.h b/include/linux/mfd/abx500/ux500_chargalg.h
index 234c99143bf7..67703f23e7ba 100644
--- a/include/linux/mfd/abx500/ux500_chargalg.h
+++ b/include/linux/mfd/abx500/ux500_chargalg.h
@@ -9,8 +9,13 @@
9 9
10#include <linux/power_supply.h> 10#include <linux/power_supply.h>
11 11
12#define psy_to_ux500_charger(x) container_of((x), \ 12/*
13 struct ux500_charger, psy) 13 * Valid only for supplies of type:
14 * - POWER_SUPPLY_TYPE_MAINS,
15 * - POWER_SUPPLY_TYPE_USB,
16 * because only them store as drv_data pointer to struct ux500_charger.
17 */
18#define psy_to_ux500_charger(x) power_supply_get_drvdata(psy)
14 19
15/* Forward declaration */ 20/* Forward declaration */
16struct ux500_charger; 21struct ux500_charger;
@@ -35,7 +40,7 @@ struct ux500_charger_ops {
35 * @power_path USB power path support 40 * @power_path USB power path support
36 */ 41 */
37struct ux500_charger { 42struct ux500_charger {
38 struct power_supply psy; 43 struct power_supply *psy;
39 struct ux500_charger_ops ops; 44 struct ux500_charger_ops ops;
40 int max_out_volt; 45 int max_out_volt;
41 int max_out_curr; 46 int max_out_curr;