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

Commit 7f2ebde7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:
 "New drivers:
   - gemini-poweroff
   - cpcap-charger (for Motorola Droid 4)
   - battery-lego-ev3 (for LEGO Mindstorms EV3)

  New chip/feature support:
   - bq24190-charger: add runtime PM support
   - bq24190-charger: add bq24192i support
   - register masking for syscon-poweroff

  ... and misc small fixes & cleanups

* tag 'for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (29 commits)
  power: supply: bq24190_charger: Use new extcon_register_notifier_all()
  power: supply: bq24190_charger: Longer delay while polling reset flag
  power: supply: bq24190_charger: Uniform pm_runtime_get() failure handling
  power: supply: bq24190_charger: Clean up extcon code
  power: supply: bq24190_charger: Limit over/under voltage fault logging
  power: supply: New driver for LEGO MINDSTORMS EV3 battery
  dt-bindings: power: supply: New bindings for LEGO MINDSTORMS EV3 battery
  power: supply: tps65217: remove debug messages for function calls
  power: supply: ltc2941-battery-gauge: Add OF device ID table
  power: supply: ltc2941-battery-gauge: Add vendor to compatibles in binding
  power: supply: charger-manager: simplify return statements
  power: supply: lp8788: prevent out of bounds array access
  power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger
  power: supply: bq24190_charger: Use extcon to determine ilimit, 5v boost
  power: supply: bq24190_charger: Add support for bq24192i
  power: supply: bq24190_charger: Use i2c-core irq-mapping code
  power: bq24190_charger: mark PM functions as __maybe_unused
  power: supply: sbs-charger: simplified bool function
  power: supply: ab8500: Replaced spaces with tabs in indent
  power: supply: bq25890: Use gpiod_get()
  ...
parents cdbfbba9 6c381663
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
* Device-Tree bindings for Cortina Systems Gemini Poweroff

This is a special IP block in the Cortina Gemini SoC that only
deals with different ways to power the system down.

Required properties:
- compatible: should be "cortina,gemini-power-controller"
- reg: should contain the physical memory base and size
- interrupts: should contain the power management interrupt

Example:

power-controller@4b000000 {
	compatible = "cortina,gemini-power-controller";
	reg = <0x4b000000 0x100>;
	interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
};
+9 −2
Original line number Diff line number Diff line
@@ -3,13 +3,20 @@ 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.
with the value and 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)
- value: the poweroff value written to the poweroff register (32 bit access)

Optional properties:
- mask: update only the register bits defined by the mask (32 bit)

Legacy usage:
If a node doesn't contain a value property but contains a mask property, the
mask property is used as the value.

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

+37 −0
Original line number Diff line number Diff line
Motorola CPCAP PMIC battery charger binding

Required properties:
- compatible: Shall be "motorola,mapphone-cpcap-charger"
- interrupts: Interrupt specifier for each name in interrupt-names
- interrupt-names: Should contain the following entries:
		   "chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
		   "rvrs_mode", "chrgcurr1", "vbusvld", "battdetb"
- io-channels: IIO ADC channel specifier for each name in io-channel-names
- io-channel-names: Should contain the following entries:
		    "battdetb", "battp", "vbus", "chg_isense", "batti"

Optional properties:
- mode-gpios: Optionally CPCAP charger can have a companion wireless
	      charge controller that is controlled with two GPIOs
	      that are active low.

Example:

cpcap_charger: charger {
	compatible = "motorola,mapphone-cpcap-charger";
	interrupts-extended = <
		&cpcap 13 0 &cpcap 12 0 &cpcap 29 0 &cpcap 28 0
		&cpcap 22 0 &cpcap 20 0 &cpcap 19 0 &cpcap 54 0
	>;
	interrupt-names =
		"chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
		"rvrs_mode", "chrgcurr1", "vbusvld", "battdetb";
	mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW
		      &gpio3 23 GPIO_ACTIVE_LOW>;
	io-channels = <&cpcap_adc 0 &cpcap_adc 1
		       &cpcap_adc 2 &cpcap_adc 5
		       &cpcap_adc 6>;
	io-channel-names = "battdetb", "battp",
			   "vbus", "chg_isense",
			   "batti";
};
+21 −0
Original line number Diff line number Diff line
LEGO MINDSTORMS EV3 Battery
~~~~~~~~~~~~~~~~~~~~~~~~~~~

LEGO MINDSTORMS EV3 has some built-in capability for monitoring the battery.
It uses 6 AA batteries or a special Li-ion rechargeable battery pack that is
detected by a key switch in the battery compartment.

Required properties:
 - compatible: Must be "lego,ev3-battery"
 - io-channels: phandles to analog inputs for reading voltage and current
 - io-channel-names: Must be "voltage", "current"
 - rechargeable-gpios: phandle to the rechargeable battery indication gpio

Example:

	battery {
		compatible = "lego,ev3-battery";
		io-channels = <&adc 4>, <&adc 3>;
		io-channel-names = "voltage", "current";
		rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>;
	};
+3 −3
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ temperature monitoring, and uses a slightly different conversion
formula for the charge counter.

Required properties:
- compatible: Should contain "ltc2941" or "ltc2943" which also indicates the
    type of I2C chip attached.
- compatible: Should contain "lltc,ltc2941" or "lltc,ltc2943" which also
    indicates the type of I2C chip attached.
- reg: The 7-bit I2C address.
- lltc,resistor-sense: The sense resistor value in milli-ohms. Can be a 32-bit
    negative value when the battery has been connected to the wrong end of the
@@ -20,7 +20,7 @@ Required properties:
Example from the Topic Miami Florida board:

	fuelgauge: ltc2943@64 {
		compatible = "ltc2943";
		compatible = "lltc,ltc2943";
		reg = <0x64>;
		lltc,resistor-sense = <15>;
		lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */
Loading