Skip to content

Commit f28f489

Browse files
committed
Merge tag 'for-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel: "Power-supply core: - introduce power supply extensions, which allows adding properties to a power supply device from a separate driver. This will be used initially to extend the generic ACPI charger/battery driver with vendor extensions for charge thresholds. - convert all drivers from power_supply_for_each_device to new power_supply_for_each_psy(), which avoids lots of casting being done in the drivers. - avoid LED trigger like values in uevent for POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR - introduce POWER_SUPPLY_PROP_CHARGE_TYPES, which is similar to the POWER_SUPPLY_PROP_CHARGE_TYPE property, but also lists the available options on the specific platform Power-supply drivers - dell-laptop: use new power_supply_charge_types_show/_parse helpers - stc3117: new driver for equally named fuel gauge chip - bq24190: add support for new POWER_SUPPLY_PROP_CHARGE_TYPES - bq24190: add BQ24297 support - bq27xxx: add voltage min design for bq27000/bq27200 - cros_charge-control: convert to new power supply extension API - multiple drivers: constify 'struct bin_attribute' - ds2782: convert to device managed resources - max1720x: add charge full property - max1720x: support extra thermistor temperatures - max17042: add max77705 support - ip5xxx-power: add support for IP5306 - ltc4162-l-charger: add ltc4162-f/s and ltc4015 support - gpio-charger: support for default charge current limit - misc small cleanups and fixes Reset drivers: - at91-poweroff: add sam9x7 support" * tag 'for-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (77 commits) power: supply: max1720x: add support for reading internal and thermistor temperatures power: supply: ltc4162l: Use GENMASK macro in bitmask operation power: supply: max17042: add max77705 fuel gauge support dt-bindings: power: supply: max17042: add max77705 support power: supply: add undervoltage health status property power: supply: max17042: add platform driver variant power: supply: max17042: make interrupt shared power: reset: keystone: Use syscon_regmap_lookup_by_phandle_args power: supply: Use str_enable_disable-like helpers platform/x86: dell-laptop: Use power_supply_charge_types_show/_parse() helpers power: supply: bq2415x_charger: Immediately reschedule delayed work on notifier events power: supply: Add STC3117 fuel gauge unit driver dt-bindings: power: supply: Add STC3117 Fuel Gauge power: supply: ug3105_battery: Let the core handle POWER_SUPPLY_PROP_TECHNOLOGY power: supply: gpio-charger: add support for default charge current limit dt-bindings: power: supply: gpio-charger: add support for default charge current limit power: supply: Use power_supply_external_power_changed() in __power_supply_changed_work() power: supply: core: fix build of extension sysfs group if CONFIG_SYSFS=n power: supply: bq2415x_charger: report charging state changes to userspace bq27xxx: add voltage min design for bq27000 and bq27200 ...
2 parents deee748 + b4a95b8 commit f28f489

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2723
-710
lines changed

Documentation/ABI/testing/sysfs-class-power

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,30 @@ Description:
407407

408408
Access: Read, Write
409409

410+
Reading this returns the current active value, e.g. 'Standard'.
411+
Check charge_types to get the values supported by the battery.
412+
410413
Valid values:
411414
"Unknown", "N/A", "Trickle", "Fast", "Standard",
412415
"Adaptive", "Custom", "Long Life", "Bypass"
413416

417+
What: /sys/class/power_supply/<supply_name>/charge_types
418+
Date: December 2024
419+
420+
Description:
421+
Identical to charge_type but reading returns a list of supported
422+
charge-types with the currently active type surrounded by square
423+
brackets, e.g.: "Fast [Standard] Long_Life".
424+
425+
power_supply class devices may support both charge_type and
426+
charge_types for backward compatibility. In this case both will
427+
always have the same active value and the active value can be
428+
changed by writing either property.
429+
430+
Note charge-types which contain a space such as "Long Life" will
431+
have the space replaced by a '_' resulting in e.g. "Long_Life".
432+
When writing charge-types both variants are accepted.
433+
414434
What: /sys/class/power_supply/<supply_name>/charge_term_current
415435
Date: July 2014
416436
@@ -433,7 +453,7 @@ Description:
433453

434454
Valid values:
435455
"Unknown", "Good", "Overheat", "Dead",
436-
"Over voltage", "Unspecified failure", "Cold",
456+
"Over voltage", "Under voltage", "Unspecified failure", "Cold",
437457
"Watchdog timer expire", "Safety timer expire",
438458
"Over current", "Calibration required", "Warm",
439459
"Cool", "Hot", "No battery"
@@ -793,3 +813,12 @@ Description:
793813

794814
Access: Read
795815
Valid values: 1-31
816+
817+
What: /sys/class/power_supply/<supply_name>/extensions/<extension_name>
818+
Date: March 2025
819+
820+
Description:
821+
Reports the extensions registered to the power supply.
822+
Each entry is a link to the device which registered the extension.
823+
824+
Access: Read
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
What: /sys/class/power_supply/max1720x/temp_ain1
2+
Date: January 2025
3+
KernelVersion: 6.14
4+
Contact: Dimitri Fedrau <[email protected]>
5+
Description:
6+
Reports the current temperature reading from AIN1 thermistor.
7+
8+
Access: Read
9+
10+
Valid values: Represented in 1/10 Degrees Celsius
11+
12+
What: /sys/class/power_supply/max1720x/temp_ain2
13+
Date: January 2025
14+
KernelVersion: 6.14
15+
Contact: Dimitri Fedrau <[email protected]>
16+
Description:
17+
Reports the current temperature reading from AIN2 thermistor.
18+
19+
Access: Read
20+
21+
Valid values: Represented in 1/10 Degrees Celsius
22+
23+
What: /sys/class/power_supply/max1720x/temp_int
24+
Date: January 2025
25+
KernelVersion: 6.14
26+
Contact: Dimitri Fedrau <[email protected]>
27+
Description:
28+
Reports the current temperature reading from internal die.
29+
30+
Access: Read
31+
32+
Valid values: Represented in 1/10 Degrees Celsius

Documentation/devicetree/bindings/power/reset/atmel,sama5d2-shdwc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ properties:
2222
- enum:
2323
- atmel,sama5d2-shdwc
2424
- microchip,sam9x60-shdwc
25+
- items:
26+
- const: microchip,sam9x7-shdwc
27+
- const: microchip,sam9x60-shdwc
2528

2629
reg:
2730
maxItems: 1

Documentation/devicetree/bindings/power/supply/bq24190.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ properties:
2121
- ti,bq24192i
2222
- ti,bq24196
2323
- ti,bq24296
24+
- ti,bq24297
2425

2526
reg:
2627
maxItems: 1

Documentation/devicetree/bindings/power/supply/gpio-charger.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ properties:
5858
charge-current-limit-gpios property. Bit 1 second to last
5959
GPIO and so on.
6060

61+
charge-current-limit-default-microamp:
62+
description: Default charge current limit. Must be listed in
63+
charge-current-limit-mapping.
64+
6165
required:
6266
- compatible
6367

@@ -72,6 +76,7 @@ anyOf:
7276
dependencies:
7377
charge-current-limit-gpios: [ charge-current-limit-mapping ]
7478
charge-current-limit-mapping: [ charge-current-limit-gpios ]
79+
charge-current-limit-default-microamp: [charge-current-limit-mapping]
7580

7681
additionalProperties: false
7782

@@ -91,4 +96,5 @@ examples:
9196
charge-current-limit-mapping = <2500000 0x00>, // 2.5 A => both GPIOs low
9297
<700000 0x01>, // 700 mA => GPIO A.12 high
9398
<0 0x02>; // 0 mA => GPIO A.11 high
99+
charge-current-limit-default-microamp = <700000>;
94100
};

Documentation/devicetree/bindings/power/supply/ltc4162-l.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ description: |
1717
panels, etc., and a rechargeable Lithium-Ion/Polymer battery.
1818
1919
Specifications about the charger can be found at:
20+
https://www.analog.com/en/products/ltc4162-l.html
21+
https://www.analog.com/en/products/ltc4162-f.html
2022
https://www.analog.com/en/products/ltc4162-s.html
23+
https://www.analog.com/en/products/ltc4015.html
2124
2225
properties:
2326
compatible:
2427
enum:
28+
- lltc,ltc4015
29+
- lltc,ltc4162-f
2530
- lltc,ltc4162-l
31+
- lltc,ltc4162-s
2632

2733
reg:
2834
maxItems: 1

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ properties:
1919
- maxim,max17047
2020
- maxim,max17050
2121
- maxim,max17055
22+
- maxim,max77705-battery
2223
- maxim,max77849-battery
2324

2425
reg:
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/power/supply/st,stc3117.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: STMicroelectronics STC3117 Fuel Gauge Unit Power Supply
8+
9+
maintainers:
10+
- Hardevsinh Palaniya <[email protected]>
11+
- Bhavin Sharma <[email protected]>
12+
13+
description: |
14+
The STC3117 includes the STMicroelectronics OptimGauge algorithm.
15+
It provides accurate battery state-of-charge (SOC) monitoring, tracks
16+
battery parameter changes with operation conditions, temperature,
17+
and aging, and allows the application to get a battery state-of-health
18+
(SOH) indication.
19+
20+
An alarm output signals low SOC or low voltage conditions and also
21+
indicates fault conditions like a missing or swapped battery.
22+
23+
Datasheet is available at
24+
https://www.st.com/resource/en/datasheet/stc3117.pdf
25+
26+
allOf:
27+
- $ref: power-supply.yaml#
28+
29+
properties:
30+
compatible:
31+
enum:
32+
- st,stc3117
33+
34+
reg:
35+
maxItems: 1
36+
37+
monitored-battery:
38+
description: |
39+
The fuel gauge uses the following battery properties:
40+
- charge-full-design-microamp-hours
41+
- voltage-min-design-microvolt
42+
- voltage-max-design-microvolt
43+
44+
shunt-resistor-micro-ohms:
45+
description: Current sense resistor
46+
47+
interrupts:
48+
maxItems: 1
49+
50+
required:
51+
- compatible
52+
- reg
53+
- monitored-battery
54+
- shunt-resistor-micro-ohms
55+
56+
unevaluatedProperties: false
57+
58+
examples:
59+
- |
60+
#include <dt-bindings/interrupt-controller/irq.h>
61+
62+
i2c {
63+
#address-cells = <1>;
64+
#size-cells = <0>;
65+
66+
battery@70 {
67+
compatible = "st,stc3117";
68+
reg = <0x70>;
69+
interrupt-parent = <&gpio0>;
70+
interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
71+
monitored-battery = <&bat>;
72+
shunt-resistor-micro-ohms = <10000>;
73+
};
74+
};

Documentation/devicetree/bindings/trivial-devices.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ properties:
147147
- injoinic,ip5207
148148
# Injoinic IP5209 2.4A Power Bank IC with I2C
149149
- injoinic,ip5209
150+
# Injoinic IP5306 2.1A Power Bank IC with I2C option
151+
- injoinic,ip5306
150152
# Inspur Power System power supply unit version 1
151153
- inspur,ipsps1
152154
# Intel common redudant power supply crps185

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22309,6 +22309,14 @@ T: git git://linuxtv.org/media.git
2230922309
F: Documentation/devicetree/bindings/media/i2c/st,st-mipid02.yaml
2231022310
F: drivers/media/i2c/st-mipid02.c
2231122311

22312+
ST STC3117 FUEL GAUGE DRIVER
22313+
M: Hardevsinh Palaniya <[email protected]>
22314+
M: Bhavin Sharma <[email protected]>
22315+
22316+
S: Maintained
22317+
F: Documentation/devicetree/bindings/power/supply/st,stc3117.yaml
22318+
F: drivers/power/supply/stc3117_fuel_gauge.c
22319+
2231222320
ST STM32 FIREWALL
2231322321
M: Gatien Chevallier <[email protected]>
2231422322
S: Maintained

0 commit comments

Comments
 (0)