Commit c7c18635 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:
 "Power-supply core:
   - support charge_types in extensions

  Power-supply drivers:
   - new driver for Pegatron Chagall battery
   - new driver for Maxim MAX8971 charger
   - new driver for Huawei Matebook E Go
   - bq27xxx: retry failed I2C transmissions
   - bq24190: add BQ24193 support
   - misc small cleanups and fixes

  Reset drivers:
   - new driver for Toradex SMARC Embedded Controller
   - reboot-mode: add support for modes containing / in DT
   - atmel,at91sam9260-reset: support sama7d65
   - syscon-reboot: add Google GS101 support
   - misc small cleanups and fixes"

* tag 'for-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (28 commits)
  power: supply: rt9471: Simplify definition of some struct linear_range
  power: supply: max77976: add EXTCON dependency
  power: supply: Add support for Maxim MAX8971 charger
  dt-bindings: power: supply: Document Maxim MAX8971 charger
  power: supply: max17040: adjust thermal channel scaling
  power: reset: syscon-reboot: add gs101-specific reset
  dt-bindings: reset: syscon-reboot: add google,gs101-reboot
  power: supply: add Huawei Matebook E Go psy driver
  power: supply: Add driver for Pegatron Chagall battery
  dt-bindings: power: supply: Document Pegatron Chagall fuel gauge
  dt-bindings: vendor-prefixes: add prefix for Pegatron Corporation
  power: supply: cros_charge-control: Avoid -Wflex-array-member-not-at-end warning
  power: reset: add Toradex Embedded Controller
  dt-bindings: power: reset: add toradex,smarc-ec
  power: supply: support charge_types in extensions
  power: supply: max77705: Fix workqueue error handling in probe
  power: supply: wm831x: Constify struct chg_map and some arrays
  power: bq24190: Add BQ24193 support
  dt-bindings: power: supply: bq24190: Add BQ24193 compatible
  power: supply: sysfs: Remove duplicate NUL termination
  ...
parents 5722a6ce b1d87660
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
@@ -822,3 +822,46 @@ Description:
		Each entry is a link to the device which registered the extension.

		Access: Read

What:		/sys/class/power_supply/max8971-charger/fast_charge_timer
Date:		May 2025
KernelVersion:	6.15.0
Contact:	Svyatoslav Ryhel <clamor95@gmail.com>
Description:
		This entry shows and sets the maximum time the max8971
		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 - 10 (hours), step by 1
		- 0: disabled.

What:		/sys/class/power_supply/max8971-charger/top_off_threshold_current
Date:		May 2025
KernelVersion:	6.15.0
Contact:	Svyatoslav Ryhel <clamor95@gmail.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:

		- 50000 - 200000 (microamps), step by 50000 (rounded down)

What:		/sys/class/power_supply/max8971-charger/top_off_timer
Date:		May 2025
KernelVersion:	6.15.0
Contact:	Svyatoslav Ryhel <clamor95@gmail.com>
Description:
		This entry shows and sets the maximum time the max8971
		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)
+27 −0
Original line number Diff line number Diff line
What:		/sys/class/power_supply/gaokun-ec-battery/smart_charge_delay
Date:		March 2025
KernelVersion:	6.15
Contact:	Pengyu Luo <mitltlatltl@gmail.com>
Description:
		This entry allows configuration of smart charging delay.

		Smart charging behavior: when the power adapter is connected
		for delay hours, battery charging will follow the rules of
		charge_control_start_threshold and charge_control_end_threshold.
		For more information about charge control, please refer to
		sysfs-class-power.

		Access: Read, Write

		Valid values: In hours (non-negative)

What:		/sys/class/power_supply/gaokun-ec-battery/battery_adaptive_charge
Date:		March 2025
KernelVersion:	6.15
Contact:	Pengyu Luo <mitltlatltl@gmail.com>
Description:
		This entry allows enabling battery adaptive charging.

		Access: Read, Write

		Valid values: 0 (disabled) or 1 (enabled)
+30 −12
Original line number Diff line number Diff line
@@ -21,7 +21,9 @@ description: |+

properties:
  compatible:
    const: syscon-reboot
    enum:
      - syscon-reboot
      - google,gs101-reboot

  mask:
    $ref: /schemas/types.yaml#/definitions/uint32
@@ -49,12 +51,6 @@ properties:
  priority:
    default: 192

oneOf:
  - required:
      - offset
  - required:
      - reg

required:
  - compatible

@@ -63,6 +59,19 @@ additionalProperties: false
allOf:
  - $ref: restart-handler.yaml#
  - if:
      properties:
        compatible:
          contains:
            const: google,gs101-reboot
    then:
      properties:
        mask: false
        offset: false
        reg: false
        value: false

    else:
      if:
        not:
          required:
            - mask
@@ -70,6 +79,10 @@ allOf:
        required:
          - value

      oneOf:
        - required: [offset]
        - required: [reg]

examples:
  - |
    reboot {
@@ -78,3 +91,8 @@ examples:
        offset = <0x0>;
        mask = <0x1>;
    };

  - |
    reboot {
        compatible = "google,gs101-reboot";
    };
+52 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/toradex,smarc-ec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Toradex Embedded Controller

maintainers:
  - Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
  - Francesco Dolcini <francesco.dolcini@toradex.com>

description: |
  The Toradex Embedded Controller (EC) is used on Toradex SMARC modules,
  primarily to manage power and reset functionalities.

  The EC provides the following functions:
    - Reads the SMARC POWER_BTN# and RESET_IN# signals and controls the PMIC accordingly.
    - Controls the SoC boot mode signals based on the SMARC BOOT_SEL# and FORCE_RECOV# inputs.
    - Manages the CARRIER_STDBY# signal in response to relevant SoC signals.

  The EC runs a small firmware, factory programmed into its internal flash, and communicates over I2C.
  It allows software to control power-off and reset functionalities of the module.

properties:
  compatible:
    items:
      - enum:
          - toradex,smarc-imx95-ec
          - toradex,smarc-imx8mp-ec
      - const: toradex,smarc-ec

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        reset-controller@28 {
            compatible = "toradex,smarc-imx95-ec", "toradex,smarc-ec";
            reg = <0x28>;
        };
    };
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ properties:
      - ti,bq24190
      - ti,bq24192
      - ti,bq24192i
      - ti,bq24193
      - ti,bq24196
      - ti,bq24296
      - ti,bq24297
Loading