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

Commit 13c07190 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-v3.20' of git://git.infradead.org/battery-2.6

Pull power supply and reset changes from Sebastian Reichel:
 "New drivers:
   - charger driver for Maxim 77693
   - battery gauge driver for LTC 2941/2943
   - battery gauge driver for RT5033
   - reset driver for R-Mobile platforms

  Convert drivers to restart handler framework:
   - arm-versatile
   - at91
   - st-poweroff

  Misc:
   - remove deprecated sun6i reboot driver
   - use alarmtimer instead of rtc in charger-manager
   - misc fixes"

* tag 'for-v3.20' of git://git.infradead.org/battery-2.6: (48 commits)
  power_supply: 88pm860x: Fix leaked power supply on probe fail
  power/reset: restart-poweroff: Remove arm dependencies
  power/reset: st-poweroff: Fix misleading Kconfig description
  power/reset: st-poweroff: Register with kernel restart handler
  power/reset: Remove sun6i reboot driver
  power/reset: at91: Register with kernel restart handler
  power/reset: arm-versatile: Register with kernel restart handler
  power: test_power: Use enum as index for array of supplies
  Add devicetree binding documentation for the LTC2941/LTC2943 driver
  Add LTC2941/LTC2943 Battery Gauge Driver
  power/reset: brcmstb: Add support for old 65nm chips
  power/reset: brcmstb: Use the DT "compatible" string to indicate bit positions
  power/reset: brcmstb: Make the driver buildable on MIPS
  power: charger-manager: Use alarmtimer for battery monitoring in suspend.
  power/reset: at91-poweroff: Fix error handling and other compiler warnings
  bq27x00_battery: Call power_supply_changed only when capacity changed
  bq27x00_battery: fix register offset for bq27425
  power: max14577: Remove SYSFS dependency from Kconfig
  power: bq24190_charger: suppress build warning
  power: reset: Add reset driver for R-Mobile platforms
  ...
parents c5ce28df 24727b45
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
@@ -32,3 +32,45 @@ Description:
		Valid values:
		- 5, 6 or 7 (hours),
		- 0: disabled.

What:		/sys/class/power_supply/max77693-charger/device/fast_charge_timer
Date:		January 2015
KernelVersion:	3.19.0
Contact:	Krzysztof Kozlowski <k.kozlowski@samsung.com>
Description:
		This entry shows and sets the maximum time the max77693
		charger operates in fast-charge mode. When the timer expires
		the device will terminate fast-charge mode (charging current
		will drop to 0 A) and will trigger interrupt.

		Valid values:
		- 4 - 16 (hours), step by 2 (rounded down)
		- 0: disabled.

What:		/sys/class/power_supply/max77693-charger/device/top_off_threshold_current
Date:		January 2015
KernelVersion:	3.19.0
Contact:	Krzysztof Kozlowski <k.kozlowski@samsung.com>
Description:
		This entry shows and sets the charging current threshold for
		entering top-off charging mode. When charging current in fast
		charge mode drops below this value, the charger will trigger
		interrupt and start top-off charging mode.

		Valid values:
		- 100000 - 200000 (microamps), step by 25000 (rounded down)
		- 200000 - 350000 (microamps), step by 50000 (rounded down)
		- 0: disabled.

What:		/sys/class/power_supply/max77693-charger/device/top_off_timer
Date:		January 2015
KernelVersion:	3.19.0
Contact:	Krzysztof Kozlowski <k.kozlowski@samsung.com>
Description:
		This entry shows and sets the maximum time the max77693
		charger operates in top-off charge mode. When the timer expires
		the device will terminate top-off charge mode (charging current
		will drop to 0 A) and will trigger interrupt.

		Valid values:
		- 0 - 70 (minutes), step by 10 (rounded down)
+3 −1
Original line number Diff line number Diff line
@@ -79,7 +79,9 @@ reboot
Required properties

    - compatible
        The string property "brcm,brcmstb-reboot".
        The string property "brcm,brcmstb-reboot" for 40nm/28nm chips with
        the new SYS_CTRL interface, or "brcm,bcm7038-reboot" for 65nm
        chips with the old SUN_TOP_CTRL interface.

    - syscon
        A phandle / integer array that points to the syscon node which describes
+45 −0
Original line number Diff line number Diff line
@@ -41,6 +41,41 @@ Optional properties:
	 To get more informations, please refer to documentaion.
	[*] refer Documentation/devicetree/bindings/pwm/pwm.txt

- charger : Node configuring the charger driver.
  If present, required properties:
  - compatible : Must be "maxim,max77693-charger".

  Optional properties (if not set, defaults will be used):
  - maxim,constant-microvolt : Battery constant voltage in uV. The charger
    will operate in fast charge constant current mode till battery voltage
    reaches this level. Then the charger will switch to fast charge constant
    voltage mode. Also vsys (system voltage) will be set to this value when
    DC power is supplied but charger is not enabled.
    Valid values: 3650000 - 4400000, step by 25000 (rounded down)
    Default: 4200000

  - maxim,min-system-microvolt : Minimal system voltage in uV.
    Valid values: 3000000 - 3700000, step by 100000 (rounded down)
    Default: 3600000

  - maxim,thermal-regulation-celsius : Temperature in Celsius for entering
    high temperature charging mode. If die temperature exceeds this value
    the charging current will be reduced by 105 mA/Celsius.
    Valid values: 70, 85, 100, 115
    Default: 100

  - maxim,battery-overcurrent-microamp : Overcurrent protection threshold
    in uA (current from battery to system).
    Valid values: 2000000 - 3500000, step by 250000 (rounded down)
    Default: 3500000

  - maxim,charge-input-threshold-microvolt : Threshold voltage in uV for
    triggering input voltage regulation loop. If input voltage decreases
    below this value, the input current will be reduced to reach the
    threshold voltage.
    Valid values: 4300000, 4700000, 4800000, 4900000
    Default: 4300000

Example:
	max77693@66 {
		compatible = "maxim,max77693";
@@ -73,4 +108,14 @@ Example:
			pwms = <&pwm 0 40000 0>;
			pwm-names = "haptic";
		};

		charger {
			compatible = "maxim,max77693-charger";

			maxim,constant-microvolt = <4200000>;
			maxim,min-system-microvolt = <3600000>;
			maxim,thermal-regulation-celsius = <75>;
			maxim,battery-overcurrent-microamp = <3000000>;
			maxim,charge-input-threshold-microvolt = <4300000>;
		};
	};
+27 −0
Original line number Diff line number Diff line
binding for LTC2941 and LTC2943 battery gauges

Both the LTC2941 and LTC2943 measure battery capacity.
The LTC2943 is compatible with the LTC2941, it adds voltage and
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.
- 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
    resistor.
- lltc,prescaler-exponent: The prescaler exponent as explained in the datasheet.
    This determines the range and accuracy of the gauge. The value is programmed
    into the chip only if it differs from the current setting. The setting is
    lost when the battery is disconnected.

Example from the Topic Miami Florida board:

	fuelgauge: ltc2943@64 {
		compatible = "ltc2943";
		reg = <0x64>;
		lltc,resistor-sense = <15>;
		lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */
	};
+8 −5
Original line number Diff line number Diff line
Binding for the LTC2952 PowerPath controller

This chip is used to externally trigger a system shut down. Once the trigger has
been sent, the chips' watchdog has to be reset to gracefully shut down.
If the Linux systems decides to shut down it powers off the platform via the
kill signal.
been sent, the chip's watchdog has to be reset to gracefully shut down.
A full powerdown can be triggered via the kill signal.

Required properties:

- compatible:		Must contain: "lltc,ltc2952"
- trigger-gpios:	phandle + gpio-specifier for the GPIO connected to the
			chip's trigger line
- watchdog-gpios:	phandle + gpio-specifier for the GPIO connected to the
			chip's watchdog line
- kill-gpios:		phandle + gpio-specifier for the GPIO connected to the
			chip's kill line

Optional properties:
- trigger-gpios:	phandle + gpio-specifier for the GPIO connected to the
			chip's trigger line. If this property is not set, the
			trigger function is ignored and the chip is kept alive
			until an explicit kill signal is received

Example:

ltc2952 {
Loading