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

Commit 03d11a0e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull battery updates from Dmitry Eremin-Solenikov:
 "I'm picking up power supply maintainership from Anton Vorontov.  Could
  you please pull battery-2.6 git tree changes prepared for the v3.14
  release.

  Highlights:

   - Power supply notifier

   - Several drivers gained DT support

   - Added Maxim 14577 driver

   - Change of maintainer"

* tag 'for-v3.14' of git://git.infradead.org/battery-2.6:
  MAINTAINERS: Pick up power supply maintainership
  max17042_battery: Add IRQF_ONESHOT flag to use default irq handler
  gpio-charger: Support wakeup events
  power_supply: Add charger support for Maxim 14577
  dt: Binding documentation for isp1704 charger
  isp1704_charger: Add DT support
  charger-manager: of_cm_parse_desc() should be static
  bq2415x_charger: Add DT support
  power_supply: Add power_supply_get_by_phandle
  bq2415x_charger: Use power_supply notifier for automode
  power: reset: Add as3722 power-off driver
  mfd: AS3722: Add dt node properties for system power controller
  charger-manager: Support deivce tree in charger manager driver
  charger-manager: Modify the way of checking battery's temperature
  power_supply: Add power_supply notifier
parents ac266635 57318935
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -112,6 +112,15 @@ Following are properties of regulator subnode.
		ams,enable-tracking: Enable tracking with SD1, only supported
			by LDO3.

Power-off:
=========
AS3722 supports the system power off by turning off all its rail. This
is provided through pm_power_off.
The device node should have the following properties to enable this
functionality
ams,system-power-controller: Boolean, to enable the power off functionality
        through this device.

Example:
--------
#include <dt-bindings/mfd/as3722.h>
@@ -120,6 +129,8 @@ ams3722 {
	compatible = "ams,as3722";
	reg = <0x48>;

	ams,system-power-controller;

	interrupt-parent = <&intc>;
	interrupt-controller;
	#interrupt-cells = <2>;
+17 −0
Original line number Diff line number Diff line
Binding for NXP ISP1704 USB Charger Detection

Required properties:
- compatible: Should contain one of the following:
 * "nxp,isp1704"
- nxp,enable-gpio: Should contain a phandle + gpio-specifier
  to the GPIO pin connected to the chip's enable pin.
- usb-phy: Should contain a phandle to the USB PHY
  the ISP1704 is connected to.

Example:

isp1704 {
	compatible = "nxp,isp1704";
	nxp,enable-gpio = <&gpio3 3 GPIO_ACTIVE_LOW>;
	usb-phy = <&usb2_phy>;
};
+81 −0
Original line number Diff line number Diff line
charger-manager bindings
~~~~~~~~~~~~~~~~~~~~~~~~

Required properties :
 - compatible : "charger-manager"
 - <>-supply : for regulator consumer
 - cm-num-chargers : number of chargers
 - cm-chargers : name of chargers
 - cm-fuel-gauge : name of battery fuel gauge
 - subnode <regulator> :
	- cm-regulator-name : name of charger regulator
	- subnode <cable> :
		- cm-cable-name : name of charger cable
		- cm-cable-extcon : name of extcon dev
(optional)	- cm-cable-min : minimum current of cable
(optional)	- cm-cable-max : maximum current of cable

Optional properties :
 - cm-name : charger manager's name (default : "battery")
 - cm-poll-mode : polling mode (enum polling_modes)
 - cm-poll-interval : polling interval
 - cm-battery-stat : battery status (enum data_source)
 - cm-fullbatt-* : data for full battery checking
 - cm-thermal-zone : name of external thermometer's thermal zone
 - cm-battery-* : threshold battery temperature for charging
	-cold : critical cold temperature of battery for charging
	-cold-in-minus : flag that cold temerature is in minus degree
	-hot : critical hot temperature of battery for charging
	-temp-diff : temperature difference to allow recharging
 - cm-dis/charging-max = limits of charging duration

Example :
	charger-manager@0 {
		compatible = "charger-manager";
		chg-reg-supply = <&charger_regulator>;

		cm-name = "battery";
		/* Always polling ON : 30s */
		cm-poll-mode = <1>;
		cm-poll-interval = <30000>;

		cm-fullbatt-vchkdrop-ms = <30000>;
		cm-fullbatt-vchkdrop-volt = <150000>;
		cm-fullbatt-soc = <100>;

		cm-battery-stat = <3>;

		cm-num-chargers = <3>;
		cm-chargers = "charger0", "charger1", "charger2";

		cm-fuel-gauge = "fuelgauge0";

		cm-thermal-zone = "thermal_zone.1"
		/* in deci centigrade */
		cm-battery-cold = <50>;
		cm-battery-cold-in-minus;
		cm-battery-hot = <800>;
		cm-battery-temp-diff = <100>;

		/* Allow charging for 5hr */
		cm-charging-max = <18000000>;
		/* Allow discharging for 2hr */
		cm-discharging-max = <7200000>;

		regulator@0 {
			cm-regulator-name = "chg-reg";
			cable@0 {
				cm-cable-name = "USB";
				cm-cable-extcon = "extcon-dev.0";
				cm-cable-min = <475000>;
				cm-cable-max = <500000>;
			};
			cable@1 {
				cm-cable-name = "TA";
				cm-cable-extcon = "extcon-dev.0";
				cm-cable-min = <650000>;
				cm-cable-max = <675000>;
			};
		};

	};
+1 −1
Original line number Diff line number Diff line
@@ -6712,7 +6712,7 @@ F: include/linux/timer*
F:	kernel/*timer*

POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS
M:	Anton Vorontsov <anton@enomsg.org>
M:	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
M:	David Woodhouse <dwmw2@infradead.org>
T:	git git://git.infradead.org/battery-2.6.git
S:	Maintained
+7 −0
Original line number Diff line number Diff line
@@ -317,6 +317,13 @@ config CHARGER_MANAGER
          runtime and in suspend-to-RAM by waking up the system periodically
          with help of suspend_again support.

config CHARGER_MAX14577
	tristate "Maxim MAX14577 MUIC battery charger driver"
	depends on MFD_MAX14577
	help
	  Say Y to enable support for the battery charger control sysfs and
	  platform data of MAX14577 MUICs.

config CHARGER_MAX8997
	tristate "Maxim MAX8997/MAX8966 PMIC battery charger driver"
	depends on MFD_MAX8997 && REGULATOR_MAX8997
Loading