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

Commit c1fecabe authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:

 - Improve support for TI bq20z75 in sbs-battery

 - Add Qualcomm PM8xxx reboot driver

 - Add cros-ec USBPD charger driver

 - Move ds2760 battery driver from w1 to power-supply and add DT support

 - Misc fixes

* tag 'for-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits)
  power: supply: bq27xxx: Update comments
  power: supply: max77693_charger: fix unintentional fall-through
  power: supply: mark expected switch fall-throughs
  power: supply: lego_ev3_battery: fix Vce offset
  power: supply: lego_ev3_battery: Don't ignore iio_read_channel_processed() return value
  power: supply: ds2760_battery: add devicetree probing
  power: supply: ds2760_battery: merge ds2760 supply driver with its w1 slave companion
  w1: core: match sub-nodes of bus masters in devicetree
  dt-bindings: w1: document bindings for ds2760 battery monitor
  dt-bindings: w1: document generic onewire bindings
  power: supply: adp5061: Fix a couple off by ones
  dt-bindings: power: reset: qcom: Add resin binding
  adp5061: New driver for ADP5061 I2C battery charger
  power: generic-adc-battery: check for duplicate properties copied from iio channels
  power: generic-adc-battery: fix out-of-bounds write when copying channel properties
  power: supply: axp288_charger: Fix initial constant_charge_current value
  power: supply: ab8500: stop using getnstimeofday64()
  power: gemini-poweroff: Avoid more spurious poweroffs
  power: vexpress: fix corruption in notifier registration
  power: remove possible deadlock when unregistering power_supply
  ...
parents 99cc7ad4 5198a483
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
Qualcomm PON Device

The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey
and resin along with the Android reboot-mode.

This DT node has pwrkey and resin as sub nodes.

Required Properties:
-compatible: "qcom,pm8916-pon"
-reg: Specifies the physical address of the pon register

Optional subnode:
-pwrkey: Specifies the subnode pwrkey and should follow the
 qcom,pm8941-pwrkey.txt description.
-resin: Specifies the subnode resin and should follow the
 qcom,pm8xxx-pwrkey.txt description.

The rest of the properties should follow the generic reboot-mode description
found in reboot-mode.txt

Example:

	pon@800 {
		compatible = "qcom,pm8916-pon";

		reg = <0x800>;
		mode-bootloader = <0x2>;
		mode-recovery = <0x1>;

		pwrkey {
			compatible = "qcom,pm8941-pwrkey";
			interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
			debounce = <15625>;
			bias-pull-up;
			linux,code = <KEY_POWER>;
		};

		resin {
			compatible = "qcom,pm8941-resin";
			interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
			debounce = <15625>;
			bias-pull-up;
			linux,code = <KEY_VOLUMEDOWN>;
		};
	};
+26 −0
Original line number Diff line number Diff line
Devicetree bindings for Maxim DS2760
====================================

The ds2760 is a w1 slave device and must hence have its sub-node in DT
under a w1 bus master node.

The device exposes a power supply, so the details described in
Documentation/devicetree/bindings/power/supply/power_supply.txt apply.

Required properties:
- compatible: must be "maxim,ds2760"

Optional properties:
- power-supplies:	Refers to one or more power supplies connected to
			this battery.
- maxim,pmod-enabled:	This boolean property enables the DS2760 to enter
			sleep mode when the DQ line goes low for greater
			than 2 seconds and leave sleep Mode when the DQ
			line goes high.
- maxim,cache-time-ms:	Time im milliseconds to cache the data for. When
			this time expires, the values are read again from
			the hardware. Defaults to 1000.
- rated-capacity-microamp-hours:
			The rated capacity of the battery, in mAh.
			If not specified, the value stored in the
			non-volatile chip memory is used.
+8 −4
Original line number Diff line number Diff line
@@ -2,7 +2,11 @@ SBS sbs-battery
~~~~~~~~~~

Required properties :
 - compatible : "sbs,sbs-battery"
 - compatible: "<vendor>,<part-number>", "sbs,sbs-battery" as fallback. The
     part number compatible string might be used in order to take care of
     vendor specific registers.
     Known <vendor>,<part-number>:
       ti,bq20z75

Optional properties :
 - sbs,i2c-retry-count : The number of times to retry i2c transactions on i2c
@@ -14,8 +18,8 @@ Optional properties :

Example:

	bq20z75@b {
		compatible = "sbs,sbs-battery";
	battery@b {
		compatible = "ti,bq20z75", "sbs,sbs-battery";
		reg = <0xb>;
		sbs,i2c-retry-count = <2>;
		sbs,poll-retry-count = <10>;
+7 −2
Original line number Diff line number Diff line
@@ -13,10 +13,15 @@ Optional properties:
 - linux,open-drain: if specified, the data pin is considered in
		     open-drain mode.

Also refer to the generic w1.txt document.

Examples:

	onewire {
		compatible = "w1-gpio";
		gpios = <&gpio 126 0>, <&gpio 105 0>;
	};
		gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;

		battery {
			// ...
		};
	};
+25 −0
Original line number Diff line number Diff line
Generic devicetree bindings for onewire (w1) busses
===================================================

Onewire busses are described through nodes of their master bus controller.
Slave devices are listed as sub-nodes of such master devices. For now, only
one slave is allowed per bus master.


Example:

	charger: charger {
		compatible = "gpio-charger";
		charger-type = "mains";
		gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
	};

	onewire {
		compatible = "w1-gpio";
		gpios = <&gpio 100 0>, <&gpio 101 0>;

		battery {
			compatible = "maxim,ds2760";
			power-supplies = <&charger>;
		};
	};
Loading