Merge tag 'for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel:
- New core support:
- battery internal resistance
- battery OCV capacity lookup table
- support for custom sysfs attributes
- Convert all drivers to use power-supply core support for custom sysfs
attributes
- bq24190-charger: bq24196 support
- axp20x-charger: AXP813 support
- sc27xx-battery: new fuel gauge driver
- gpio-poweroff: support for specific active and inactive delays
- Misc fixes
* tag 'for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (53 commits)
power: supply: bq25890: fix BAT_COMP field definition
power: supply: gpio-charger: Do not use deprecated POWER_SUPPLY_TYPE_USB_*
power: supply: ds2781: switch to devm_power_supply_register
power: supply: ds2780: switch to devm_power_supply_register
power: supply: ds2781: fix race-condition in bin attribute registration
power: supply: ds2780: fix race-condition in bin attribute registration
power: supply: pcf50633: fix race-condition in sysfs registration
power: supply: charger-manager: fix race-condition in sysfs registration
power: supply: charger-manager: simplify generation of sysfs attribute group name
power: supply: bq24257: fix race-condition in sysfs registration
power: supply: bq24190_charger: fix race-condition in sysfs registration
power: supply: lp8788: fix race-condition in sysfs registration
power: supply: ds2781: fix race-condition in sysfs registration
power: supply: ds2780: fix race-condition in sysfs registration
power: supply: bq2415x: fix race-condition in sysfs registration
power: supply: core: add support for custom sysfs attributes
power: supply: sc27xx: Save last battery capacity
power: reset: at91-poweroff: move shdwc related data to one structure
power: supply: sc27xx: Add suspend/resume interfaces
power: supply: sc27xx: Add fuel gauge low voltage alarm
...
This commit is contained in:
@@ -27,6 +27,8 @@ Optional properties:
|
||||
it to an output when the power-off handler is called. If this optional
|
||||
property is not specified, the GPIO is initialized as an output in its
|
||||
inactive state.
|
||||
- active-delay-ms: Delay (default 100) to wait after driving gpio active
|
||||
- inactive-delay-ms: Delay (default 100) to wait after driving gpio inactive
|
||||
- timeout-ms: Time to wait before asserting a WARN_ON(1). If nothing is
|
||||
specified, 3000 ms is used.
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ Required Properties:
|
||||
- compatible: One of:
|
||||
"x-powers,axp202-ac-power-supply"
|
||||
"x-powers,axp221-ac-power-supply"
|
||||
"x-powers,axp813-ac-power-supply"
|
||||
|
||||
This node is a subnode of the axp20x PMIC.
|
||||
|
||||
@@ -13,6 +14,8 @@ reading ADC channels from the AXP20X ADC.
|
||||
The AXP22X is only able to tell if an AC power supply is present and
|
||||
usable.
|
||||
|
||||
AXP813/AXP803 are able to limit current and supply voltage
|
||||
|
||||
Example:
|
||||
|
||||
&axp209 {
|
||||
|
||||
@@ -22,6 +22,18 @@ Optional Properties:
|
||||
- charge-term-current-microamp: current for charge termination phase
|
||||
- constant-charge-current-max-microamp: maximum constant input current
|
||||
- constant-charge-voltage-max-microvolt: maximum constant input voltage
|
||||
- factory-internal-resistance-micro-ohms: battery factory internal resistance
|
||||
- ocv-capacity-table-0: An array providing the open circuit voltage (OCV)
|
||||
of the battery and corresponding battery capacity percent, which is used
|
||||
to look up battery capacity according to current OCV value. And the open
|
||||
circuit voltage unit is microvolt.
|
||||
- ocv-capacity-table-1: Same as ocv-capacity-table-0
|
||||
......
|
||||
- ocv-capacity-table-n: Same as ocv-capacity-table-0
|
||||
- ocv-capacity-celsius: An array containing the temperature in degree Celsius,
|
||||
for each of the battery capacity lookup table. The first temperature value
|
||||
specifies the OCV table 0, and the second temperature value specifies the
|
||||
OCV table 1, and so on.
|
||||
|
||||
Battery properties are named, where possible, for the corresponding
|
||||
elements in enum power_supply_property, defined in
|
||||
@@ -42,6 +54,11 @@ Example:
|
||||
charge-term-current-microamp = <128000>;
|
||||
constant-charge-current-max-microamp = <900000>;
|
||||
constant-charge-voltage-max-microvolt = <4200000>;
|
||||
factory-internal-resistance-micro-ohms = <250000>;
|
||||
ocv-capacity-celsius = <(-10) 0 10>;
|
||||
ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, ...;
|
||||
ocv-capacity-table-1 = <4200000 100>, <4185000 95>, <4113000 90>, ...;
|
||||
ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>, ...;
|
||||
};
|
||||
|
||||
charger: charger@11 {
|
||||
|
||||
@@ -3,7 +3,9 @@ TI BQ24190 Li-Ion Battery Charger
|
||||
Required properties:
|
||||
- compatible: contains one of the following:
|
||||
* "ti,bq24190"
|
||||
* "ti,bq24192"
|
||||
* "ti,bq24192i"
|
||||
* "ti,bq24196"
|
||||
- reg: integer, I2C address of the charger.
|
||||
- interrupts[-extended]: configuration for charger INT pin.
|
||||
|
||||
@@ -19,6 +21,12 @@ Optional properties:
|
||||
- ti,system-minimum-microvolt: when power is connected and the battery is below
|
||||
minimum system voltage, the system will be regulated above this setting.
|
||||
|
||||
child nodes:
|
||||
- usb-otg-vbus:
|
||||
Usage: optional
|
||||
Description: Regulator that is used to control the VBUS voltage direction for
|
||||
either USB host mode or for charging on the OTG port.
|
||||
|
||||
Notes:
|
||||
- Some circuit boards wire the chip's "OTG" pin high (enabling 500mA default
|
||||
charge current on USB SDP ports, among other features). To simulate this on
|
||||
@@ -39,6 +47,8 @@ Example:
|
||||
interrupts-extended = <&gpiochip 10 IRQ_TYPE_EDGE_FALLING>;
|
||||
monitored-battery = <&bat>;
|
||||
ti,system-minimum-microvolt = <3200000>;
|
||||
|
||||
usb_otg_vbus: usb-otg-vbus { };
|
||||
};
|
||||
|
||||
&twl_gpio {
|
||||
|
||||
56
Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt
Normal file
56
Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
Spreadtrum SC27XX PMICs Fuel Gauge Unit Power Supply Bindings
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be one of the following:
|
||||
"sprd,sc2720-fgu",
|
||||
"sprd,sc2721-fgu",
|
||||
"sprd,sc2723-fgu",
|
||||
"sprd,sc2730-fgu",
|
||||
"sprd,sc2731-fgu".
|
||||
- reg: The address offset of fuel gauge unit.
|
||||
- battery-detect-gpios: GPIO for battery detection.
|
||||
- io-channels: Specify the IIO ADC channel to get temperature.
|
||||
- io-channel-names: Should be "bat-temp".
|
||||
- nvmem-cells: A phandle to the calibration cells provided by eFuse device.
|
||||
- nvmem-cell-names: Should be "fgu_calib".
|
||||
- monitored-battery: Phandle of battery characteristics devicetree node.
|
||||
See Documentation/devicetree/bindings/power/supply/battery.txt
|
||||
|
||||
Example:
|
||||
|
||||
bat: battery {
|
||||
compatible = "simple-battery";
|
||||
charge-full-design-microamp-hours = <1900000>;
|
||||
constant-charge-voltage-max-microvolt = <4350000>;
|
||||
ocv-capacity-celsius = <20>;
|
||||
ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>,
|
||||
<4022000 85>, <3983000 80>, <3949000 75>,
|
||||
<3917000 70>, <3889000 65>, <3864000 60>,
|
||||
<3835000 55>, <3805000 50>, <3787000 45>,
|
||||
<3777000 40>, <3773000 35>, <3770000 30>,
|
||||
<3765000 25>, <3752000 20>, <3724000 15>,
|
||||
<3680000 10>, <3605000 5>, <3400000 0>;
|
||||
......
|
||||
};
|
||||
|
||||
sc2731_pmic: pmic@0 {
|
||||
compatible = "sprd,sc2731";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <26000000>;
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
fgu@a00 {
|
||||
compatible = "sprd,sc2731-fgu";
|
||||
reg = <0xa00>;
|
||||
battery-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>;
|
||||
io-channels = <&pmic_adc 5>;
|
||||
io-channel-names = "bat-temp";
|
||||
nvmem-cells = <&fgu_calib>;
|
||||
nvmem-cell-names = "fgu_calib";
|
||||
monitored-battery = <&bat>;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user