diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 18:21:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 18:21:34 -0400 |
commit | a21c1ea65615f5323575d84508637a9481ca79c6 (patch) | |
tree | 669d5bf3171cc42e82cc8396c61f56a48634313c /include/linux/mfd | |
parent | d700b0567132e894971325fbb452a8db9e781c13 (diff) | |
parent | 5939d9dfe4406a49d8688eb827d88abcaf233c42 (diff) |
Merge tag 'for-v4.1' of git://git.infradead.org/battery-2.6
Pull power supply and reset changes from Sebastian Reichel:
- new API for safe access of power supply function attrs
- devres support for power supply (un)registration
- new drivers / chips:
- generic syscon based poweroff driver
- iio & charger driver for da9150
- fuel gauge driver for axp288
- bq27x00: add support for bq27510
- bq2415x: add support for bq24157s
- twl4030-madc-battery: convert to iio consumer
- misc fixes
* tag 'for-v4.1' of git://git.infradead.org/battery-2.6: (66 commits)
power: twl4030_madc_battery: Add missing MODULE_ALIAS
power: twl4030-madc-battery: Convert to iio consumer.
dt: power: Add docs for generic SYSCON poweroff driver.
power: reset: Add generic SYSCON register mapped poweroff.
power: max17042_battery: add missed blank
power: max17042_battery: Use reg type instead of chip type
power/reset: at91: big endian fixes for atsama5d3x
power_supply: charger-manager: Fix dereferencing of ERR_PTR
HID: input: Fix NULL pointer dereference when power_supply_register fails
power: constify of_device_id array
power/reset/rmobile-reset.c: Fix !HAS_IOMEM build
power_supply: 88pm860x_charger: Fix possible NULL pointer dereference and use of initialized variable
arm: mach-pxa: Decrement the power supply's device reference counter
mfd: ab8500: Decrement the power supply's device reference counter
power_supply: bq2415x_charger: Decrement the power supply's device reference counter
power_supply: 88pm860x_charger: Decrement the power supply's device reference counter
x86/olpc/xo15/sci: Use newly added power_supply_put API
x86/olpc/xo1/sci: Use newly added power_supply_put API
power_supply: charger-manager: Decrement the power supply's device reference counter
power_supply: Increment power supply use counter when obtaining references
...
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/abx500/ux500_chargalg.h | 11 | ||||
-rw-r--r-- | include/linux/mfd/rt5033.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/supply.h | 6 |
3 files changed, 12 insertions, 7 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 */ |
16 | struct ux500_charger; | 21 | struct 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 | */ |
37 | struct ux500_charger { | 42 | struct 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; |
diff --git a/include/linux/mfd/rt5033.h b/include/linux/mfd/rt5033.h index 010cff49a98e..6cff5cf458d2 100644 --- a/include/linux/mfd/rt5033.h +++ b/include/linux/mfd/rt5033.h | |||
@@ -39,7 +39,7 @@ struct rt5033_battery { | |||
39 | struct i2c_client *client; | 39 | struct i2c_client *client; |
40 | struct rt5033_dev *rt5033; | 40 | struct rt5033_dev *rt5033; |
41 | struct regmap *regmap; | 41 | struct regmap *regmap; |
42 | struct power_supply psy; | 42 | struct power_supply *psy; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* RT5033 charger platform data */ | 45 | /* RT5033 charger platform data */ |
diff --git a/include/linux/mfd/wm8350/supply.h b/include/linux/mfd/wm8350/supply.h index 2b9479310bbd..8dc93673e34a 100644 --- a/include/linux/mfd/wm8350/supply.h +++ b/include/linux/mfd/wm8350/supply.h | |||
@@ -123,9 +123,9 @@ struct wm8350_charger_policy { | |||
123 | 123 | ||
124 | struct wm8350_power { | 124 | struct wm8350_power { |
125 | struct platform_device *pdev; | 125 | struct platform_device *pdev; |
126 | struct power_supply battery; | 126 | struct power_supply *battery; |
127 | struct power_supply usb; | 127 | struct power_supply *usb; |
128 | struct power_supply ac; | 128 | struct power_supply *ac; |
129 | struct wm8350_charger_policy *policy; | 129 | struct wm8350_charger_policy *policy; |
130 | 130 | ||
131 | int rev_g_coeff; | 131 | int rev_g_coeff; |