Skip to content

Commit c6e8c51

Browse files
committed
Merge tag 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel: "Battery/charger driver changes: - convert charger-manager binding to YAML - drop bd70528-charger driver - drop pm2301-charger driver - introduce rt5033-battery driver - misc improvements and fixes" * tag 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (42 commits) power: supply: ab8500: Fix an old bug power: supply: axp288_fuel_gauge: remove redundant continue statement power: supply: axp288_fuel_gauge: Make "T3 MRD" no_battery_list DMI entry more generic power: supply: axp288_fuel_gauge: Rename fuel_gauge_blacklist to no_battery_list power: supply: bq24190_charger: drop of_match_ptr() from device ID table drivers: power: add missing MODULE_DEVICE_TABLE in keystone-reset.c power: supply: ab8500: add missing MODULE_DEVICE_TABLE power: supply: charger-manager: add missing MODULE_DEVICE_TABLE power: reset: regulator-poweroff: add missing MODULE_DEVICE_TABLE power: supply: cpcap-charger: get the battery inserted infomation from cpcap-battery power: supply: cpcap-battery: invalidate config when incompatible measurements are read power: supply: axp20x_battery: allow disabling battery charging power: supply: max17040: drop unused platform data support power: supply: max17040: simplify POWER_SUPPLY_PROP_ONLINE power: supply: max17040: remove non-working POWER_SUPPLY_PROP_STATUS power: reset: at91-sama5d2_shdwc: Remove redundant error printing in at91_shdwc_probe() power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE power: supply: rt5033_battery: Fix device tree enumeration dt-bindings: power: supply: Add DT schema for richtek,rt5033-battery power: supply: Drop BD70528 support ...
2 parents 9d69294 + f1c74a6 commit c6e8c51

38 files changed

+1113
-2662
lines changed

Documentation/devicetree/bindings/power/supply/charger-manager.txt

Lines changed: 0 additions & 91 deletions
This file was deleted.
Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/power/supply/charger-manager.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Charger Manager
8+
9+
maintainers:
10+
- Sebastian Reichel <[email protected]>
11+
12+
description: |
13+
Binding for the legacy charger manager driver.
14+
Please do not use for new products.
15+
16+
properties:
17+
compatible:
18+
const: charger-manager
19+
20+
cm-chargers:
21+
description: name of chargers
22+
$ref: /schemas/types.yaml#/definitions/string-array
23+
24+
cm-num-chargers:
25+
$ref: /schemas/types.yaml#/definitions/uint32
26+
deprecated: true
27+
28+
cm-fuel-gauge:
29+
description: name of battery fuel gauge
30+
$ref: /schemas/types.yaml#/definitions/string
31+
32+
cm-name:
33+
description: name of the charger manager
34+
default: battery
35+
$ref: /schemas/types.yaml#/definitions/string
36+
37+
cm-poll-mode:
38+
description: polling mode
39+
default: 0
40+
enum:
41+
- 0 # disabled
42+
- 1 # always
43+
- 2 # when external power is connected
44+
- 3 # when charging
45+
46+
cm-poll-interval:
47+
description: polling interval (in ms)
48+
$ref: /schemas/types.yaml#/definitions/uint32
49+
50+
cm-battery-stat:
51+
description: battery status
52+
enum:
53+
- 0 # battery always present
54+
- 1 # no battery
55+
- 2 # check presence via fuel gauge
56+
- 3 # check presence via charger
57+
58+
cm-fullbatt-vchkdrop-volt:
59+
description: voltage drop before restarting charging in uV
60+
$ref: /schemas/types.yaml#/definitions/uint32
61+
62+
cm-fullbatt-vchkdrop-ms:
63+
deprecated: true
64+
65+
cm-fullbatt-voltage:
66+
description: voltage of full battery in uV
67+
$ref: /schemas/types.yaml#/definitions/uint32
68+
69+
cm-fullbatt-soc:
70+
description: state of charge to consider as full battery in %
71+
$ref: /schemas/types.yaml#/definitions/uint32
72+
73+
cm-fullbatt-capacity:
74+
description: capcity to consider as full battery in uAh
75+
$ref: /schemas/types.yaml#/definitions/uint32
76+
77+
cm-thermal-zone:
78+
description: name of external thermometer's thermal zone
79+
$ref: /schemas/types.yaml#/definitions/string
80+
81+
cm-discharging-max:
82+
description: limits of discharging duration in ms
83+
$ref: /schemas/types.yaml#/definitions/uint32
84+
85+
cm-charging-max:
86+
description: limits of charging duration in ms
87+
$ref: /schemas/types.yaml#/definitions/uint32
88+
89+
cm-battery-cold:
90+
description: critical cold temperature of battery for charging in deci-degree celsius
91+
$ref: /schemas/types.yaml#/definitions/uint32
92+
93+
cm-battery-cold-in-minus:
94+
description: if set cm-battery-cold temperature is in minus degrees
95+
type: boolean
96+
97+
cm-battery-hot:
98+
description: critical hot temperature of battery for charging in deci-degree celsius
99+
$ref: /schemas/types.yaml#/definitions/uint32
100+
101+
cm-battery-temp-diff:
102+
description: temperature difference to allow recharging in deci-degree celsius
103+
$ref: /schemas/types.yaml#/definitions/uint32
104+
105+
patternProperties:
106+
"-supply$":
107+
description: regulator consumer, named according to cm-regulator-name
108+
$ref: /schemas/types.yaml#/definitions/phandle
109+
110+
"^regulator[@-][0-9]$":
111+
type: object
112+
properties:
113+
cm-regulator-name:
114+
description: name of charger regulator
115+
$ref: /schemas/types.yaml#/definitions/string
116+
117+
required:
118+
- cm-regulator-name
119+
120+
additionalProperties: false
121+
122+
patternProperties:
123+
"^cable[@-][0-9]$":
124+
type: object
125+
properties:
126+
cm-cable-name:
127+
description: name of charger cable
128+
enum:
129+
- USB
130+
- USB-HOST
131+
- SDP
132+
- DCP
133+
- CDP
134+
- ACA
135+
- FAST-CHARGER
136+
- SLOW-CHARGER
137+
- WPT
138+
- PD
139+
- DOCK
140+
- JIG
141+
- MECHANICAL
142+
143+
cm-cable-extcon:
144+
description: name of extcon dev
145+
$ref: /schemas/types.yaml#/definitions/string
146+
147+
cm-cable-min:
148+
description: minimum current of cable in uA
149+
$ref: /schemas/types.yaml#/definitions/uint32
150+
151+
cm-cable-max:
152+
description: maximum current of cable in uA
153+
$ref: /schemas/types.yaml#/definitions/uint32
154+
155+
required:
156+
- cm-cable-name
157+
- cm-cable-extcon
158+
159+
additionalProperties: false
160+
161+
required:
162+
- compatible
163+
- cm-chargers
164+
- cm-fuel-gauge
165+
166+
additionalProperties: false
167+
168+
examples:
169+
- |
170+
charger-manager {
171+
compatible = "charger-manager";
172+
chg-reg-supply = <&charger_regulator>;
173+
174+
cm-name = "battery";
175+
/* Always polling ON : 30s */
176+
cm-poll-mode = <1>;
177+
cm-poll-interval = <30000>;
178+
179+
cm-fullbatt-vchkdrop-volt = <150000>;
180+
cm-fullbatt-soc = <100>;
181+
182+
cm-battery-stat = <3>;
183+
184+
cm-chargers = "charger0", "charger1", "charger2";
185+
186+
cm-fuel-gauge = "fuelgauge0";
187+
188+
cm-thermal-zone = "thermal_zone.1";
189+
/* in deci centigrade */
190+
cm-battery-cold = <50>;
191+
cm-battery-cold-in-minus;
192+
cm-battery-hot = <800>;
193+
cm-battery-temp-diff = <100>;
194+
195+
/* Allow charging for 5hr */
196+
cm-charging-max = <18000000>;
197+
/* Allow discharging for 2hr */
198+
cm-discharging-max = <7200000>;
199+
200+
regulator-0 {
201+
cm-regulator-name = "chg-reg";
202+
cable-0 {
203+
cm-cable-name = "USB";
204+
cm-cable-extcon = "extcon-dev.0";
205+
cm-cable-min = <475000>;
206+
cm-cable-max = <500000>;
207+
};
208+
cable-1 {
209+
cm-cable-name = "SDP";
210+
cm-cable-extcon = "extcon-dev.0";
211+
cm-cable-min = <650000>;
212+
cm-cable-max = <675000>;
213+
};
214+
};
215+
};

Documentation/devicetree/bindings/power/supply/maxim,max17040.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ examples:
8989
reg = <0x36>;
9090
maxim,alert-low-soc-level = <10>;
9191
interrupt-parent = <&gpio7>;
92-
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
92+
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
9393
wakeup-source;
9494
};
9595
};
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: "http://devicetree.org/schemas/power/supply/richtek,rt5033-battery.yaml#"
5+
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6+
7+
title: Richtek RT5033 PMIC Fuel Gauge
8+
9+
maintainers:
10+
- Stephan Gerhold <[email protected]>
11+
12+
allOf:
13+
- $ref: power-supply.yaml#
14+
15+
properties:
16+
compatible:
17+
const: richtek,rt5033-battery
18+
19+
reg:
20+
maxItems: 1
21+
22+
interrupts:
23+
maxItems: 1
24+
25+
required:
26+
- compatible
27+
- reg
28+
29+
additionalProperties: false
30+
31+
examples:
32+
- |
33+
i2c {
34+
#address-cells = <1>;
35+
#size-cells = <0>;
36+
37+
battery@35 {
38+
compatible = "richtek,rt5033-battery";
39+
reg = <0x35>;
40+
};
41+
};
42+
- |
43+
#include <dt-bindings/interrupt-controller/irq.h>
44+
i2c {
45+
#address-cells = <1>;
46+
#size-cells = <0>;
47+
48+
battery@35 {
49+
compatible = "richtek,rt5033-battery";
50+
reg = <0x35>;
51+
interrupt-parent = <&msmgpio>;
52+
interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
53+
};
54+
};

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14827,6 +14827,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git
1482714827
F: Documentation/ABI/testing/sysfs-class-power
1482814828
F: Documentation/devicetree/bindings/power/supply/
1482914829
F: drivers/power/supply/
14830+
F: include/linux/power/
1483014831
F: include/linux/power_supply.h
1483114832

1483214833
POWERNV OPERATOR PANEL LCD DISPLAY DRIVER
@@ -16213,7 +16214,7 @@ W: http://www.ibm.com/developerworks/linux/linux390/
1621316214
F: drivers/s390/scsi/zfcp_*
1621416215

1621516216
S3C ADC BATTERY DRIVER
16216-
M: Krzysztof Kozlowski <[email protected]>
16217+
M: Krzysztof Kozlowski <[email protected]>
1621716218
1621816219
S: Odd Fixes
1621916220
F: drivers/power/supply/s3c_adc_battery.c

0 commit comments

Comments
 (0)