Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a21c1ea6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
  ...
parents d700b056 5939d9df
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
Dialog Semiconductor DA9150 IIO GPADC bindings

Required properties:
- compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC
- #io-channel-cells: Should be set to <1>
  (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info)

For further information on GPADC channels, see device datasheet.


Example:

	gpadc: da9150-gpadc {
		compatible = "dlg,da9150-gpadc";
		#io-channel-cells = <1>;
	};
+26 −0
Original line number Original line Diff line number Diff line
Dialog Semiconductor DA9150 Charger Power Supply bindings

Required properties:
- compatible: "dlg,da9150-charger" for DA9150 Charger Power Supply

Optional properties:
- io-channels: List of phandle and IIO specifier pairs
- io-channel-names: List of channel names used by charger
      ["CHAN_IBUS", "CHAN_VBUS", "CHAN_TJUNC", "CHAN_VBAT"]
  (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info)


Example:

	da9150-charger {
		compatible = "dlg,da9150-charger";

		io-channels = <&gpadc 0>,
			      <&gpadc 2>,
			      <&gpadc 8>,
			      <&gpadc 5>;
		io-channel-names = "CHAN_IBUS",
				   "CHAN_VBUS",
				   "CHAN_TJUNC",
				   "CHAN_VBAT";
	};
+23 −0
Original line number Original line Diff line number Diff line
Generic SYSCON mapped register poweroff driver

This is a generic poweroff driver using syscon to map the poweroff register.
The poweroff is generally performed with a write to the poweroff register
defined by the register map pointed by syscon reference plus the offset
with the mask defined in the poweroff node.

Required properties:
- compatible: should contain "syscon-poweroff"
- regmap: this is phandle to the register map node
- offset: offset in the register map for the poweroff register (in bytes)
- mask: the poweroff value written to the poweroff register (32 bit access)

Default will be little endian mode, 32 bit access only.

Examples:

	poweroff {
	   compatible = "syscon-poweroff";
	   regmap = <&regmapnode>;
	   offset = <0x0>;
	   mask = <0x7a>;
	};
+4 −0
Original line number Original line Diff line number Diff line
@@ -3137,12 +3137,15 @@ S: Supported
F:	Documentation/hwmon/da90??
F:	Documentation/hwmon/da90??
F:	drivers/gpio/gpio-da90??.c
F:	drivers/gpio/gpio-da90??.c
F:	drivers/hwmon/da90??-hwmon.c
F:	drivers/hwmon/da90??-hwmon.c
F:	drivers/iio/adc/da91??-*.c
F:	drivers/input/misc/da90??_onkey.c
F:	drivers/input/misc/da90??_onkey.c
F:	drivers/input/touchscreen/da9052_tsi.c
F:	drivers/input/touchscreen/da9052_tsi.c
F:	drivers/leds/leds-da90??.c
F:	drivers/leds/leds-da90??.c
F:	drivers/mfd/da903x.c
F:	drivers/mfd/da903x.c
F:	drivers/mfd/da90??-*.c
F:	drivers/mfd/da90??-*.c
F:	drivers/mfd/da91??-*.c
F:	drivers/power/da9052-battery.c
F:	drivers/power/da9052-battery.c
F:	drivers/power/da91??-*.c
F:	drivers/regulator/da903x.c
F:	drivers/regulator/da903x.c
F:	drivers/regulator/da9???-regulator.[ch]
F:	drivers/regulator/da9???-regulator.[ch]
F:	drivers/rtc/rtc-da90??.c
F:	drivers/rtc/rtc-da90??.c
@@ -3152,6 +3155,7 @@ F: include/linux/mfd/da903x.h
F:	include/linux/mfd/da9052/
F:	include/linux/mfd/da9052/
F:	include/linux/mfd/da9055/
F:	include/linux/mfd/da9055/
F:	include/linux/mfd/da9063/
F:	include/linux/mfd/da9063/
F:	include/linux/mfd/da9150/
F:	include/sound/da[79]*.h
F:	include/sound/da[79]*.h
F:	sound/soc/codecs/da[79]*.[ch]
F:	sound/soc/codecs/da[79]*.[ch]


+3 −1
Original line number Original line Diff line number Diff line
@@ -758,8 +758,10 @@ static void raumfeld_power_signal_charged(void)
	struct power_supply *psy =
	struct power_supply *psy =
		power_supply_get_by_name(raumfeld_power_supplicants[0]);
		power_supply_get_by_name(raumfeld_power_supplicants[0]);


	if (psy)
	if (psy) {
		power_supply_set_battery_charged(psy);
		power_supply_set_battery_charged(psy);
		power_supply_put(psy);
	}
}
}


static int raumfeld_power_resume(void)
static int raumfeld_power_resume(void)
Loading