Commit 38525c69 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull power supply and reset updates from Sebastian Reichel:
 "Power-supply core:
   - add wireless type
   - properly document current direction

  Battery/charger driver changes:
   - new fuel-gauge/charger driver for RN5T618/RN5T619
   - new charger driver for BQ25980, BQ25975 and BQ25960
   - bq27xxx-battery: add support for TI bq34z100
   - gpio-charger: convert to GPIO descriptors
   - gpio-charger: add optional support for charge current limiting
   - max17040: add support for max17041, max17043, max17044
   - max17040: add support for max17048, max17049, max17058, max17059
   - smb347-charger: add DT support
   - smb247-charger: add SMB345 and SMB358 support
   - simple-battery: add temperature properties
   - lots of minor fixes, cleanups and DT binding YAML conversions

  Reset drivers:
   - ocelot: Add support for Sparx5"

* tag 'for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (81 commits)
  power: reset: POWER_RESET_OCELOT_RESET should depend on Ocelot or Sparx5
  power: supply: bq25980: Fix uninitialized wd_reg_val and overrun
  power: supply: ltc2941: Fix ptr to enum cast
  power: supply: test-power: revise parameter printing to use sprintf
  power: supply: charger-manager: fix incorrect check on charging_duration_ms
  power: supply: max17040: Fix ptr to enum cast
  power: supply: bq25980: Fix uninitialized wd_reg_val
  power: supply: bq25980: remove redundant zero check on ret
  power: reset: ocelot: Add support for Sparx5
  dt-bindings: reset: ocelot: Add Sparx5 support
  power: supply: sbs-battery: keep error code when get_property() fails
  power: supply: bq25980: Add support for the BQ259xx family
  dt-binding: bq25980: Add the bq25980 flash charger
  power: supply: fix spelling mistake "unprecise" -> "imprecise"
  power: supply: test_power: add missing newlines when printing parameters by sysfs
  power: supply: pm2301: drop duplicated i2c_device_id
  power: supply: charger-manager: drop unused charger assignment
  power: supply: rt9455: skip 'struct acpi_device_id' when !CONFIG_ACPI
  power: supply: goldfish: skip 'struct acpi_device_id' when !CONFIG_ACPI
  power: supply: bq25890: skip 'struct acpi_device_id' when !CONFIG_ACPI
  ...
parents f9915b96 7007fab4
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ Description:
		Describes the main type of the supply.

		Access: Read
		Valid values: "Battery", "UPS", "Mains", "USB"
		Valid values: "Battery", "UPS", "Mains", "USB", "Wireless"

===== Battery Properties =====

@@ -108,7 +108,8 @@ Description:
		which they average readings to smooth out the reported value.

		Access: Read
		Valid values: Represented in microamps
		Valid values: Represented in microamps. Negative values are used
		for discharging batteries, positive values for charging batteries.

What:		/sys/class/power_supply/<supply_name>/current_max
Date:		October 2010
@@ -127,7 +128,8 @@ Description:
		This value is not averaged/smoothed.

		Access: Read
		Valid values: Represented in microamps
		Valid values: Represented in microamps. Negative values are used
		for discharging batteries, positive values for charging batteries.

What:		/sys/class/power_supply/<supply_name>/charge_control_limit
Date:		Oct 2012
+5 −2
Original line number Diff line number Diff line
Microsemi Ocelot reset controller

The DEVCPU_GCB:CHIP_REGS have a SOFT_RST register that can be used to reset the
SoC MIPS core.
SoC core.

The reset registers are both present in the MSCC vcoreiii MIPS and
microchip Sparx5 armv8 SoC's.

Required Properties:
 - compatible: "mscc,ocelot-chip-reset"
 - compatible: "mscc,ocelot-chip-reset" or "microchip,sparx5-chip-reset"

Example:
	reset@1070008 {
+0 −25
Original line number Diff line number Diff line
Generic reboot mode core map driver

This driver get reboot mode arguments and call the write
interface to store the magic value in special register
or ram. Then the bootloader can read it and take different
action according to the argument stored.

All mode properties are vendor specific, it is a indication to tell
the bootloader what to do when the system reboots, and should be named
as mode-xxx = <magic> (xxx is mode name, magic should be a none-zero value).

For example modes common on Android platform:
- mode-normal: Normal reboot mode, system reboot with command "reboot".
- mode-recovery: Android Recovery mode, it is a mode to format the device or update a new image.
- mode-bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device.
- mode-loader: A bootloader mode, it's a mode used to download image on Rockchip platform,
	       usually used in development.

Example:
	reboot-mode {
		mode-normal = <BOOT_NORMAL>;
		mode-recovery = <BOOT_RECOVERY>;
		mode-bootloader = <BOOT_FASTBOOT>;
		mode-loader = <BOOT_BL_DOWNLOAD>;
	}
+47 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/reboot-mode.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Generic reboot mode core map

maintainers:
  - Andy Yan <andy.yan@rock-chips.com>

description: |
  This driver get reboot mode arguments and call the write
  interface to store the magic value in special register
  or ram. Then the bootloader can read it and take different
  action according to the argument stored.

  All mode properties are vendor specific, it is a indication to tell
  the bootloader what to do when the system reboots, and should be named
  as mode-xxx = <magic> (xxx is mode name, magic should be a non-zero value).

  For example, modes common Android platform are:
    - normal: Normal reboot mode, system reboot with command "reboot".
    - recovery: Android Recovery mode, it is a mode to format the device or update a new image.
    - bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device.
    - loader: A bootloader mode, it's a mode used to download image on Rockchip platform,
              usually used in development.

properties:
  mode-normal:
      $ref: /schemas/types.yaml#/definitions/uint32
      description: |
        Default value to set on a reboot if no command was provided.

patternProperties:
  "^mode-.*$":
    $ref: /schemas/types.yaml#/definitions/uint32

examples:
  - |
    reboot-mode {
      mode-normal = <0>;
      mode-recovery = <1>;
      mode-bootloader = <2>;
      mode-loader = <3>;
    };
...
+24 −0
Original line number Diff line number Diff line
@@ -82,6 +82,27 @@ properties:
      An array containing the temperature in degree Celsius,
      for each of the battery capacity lookup table.

  operating-range-celsius:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: operating temperature range of a battery
    items:
      - description: minimum temperature at which battery can operate
      - description: maximum temperature at which battery can operate

  ambient-celsius:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: safe range of ambient temperature
    items:
      - description: alert when ambient temperature is lower than this value
      - description: alert when ambient temperature is higher than this value

  alert-celsius:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: safe range of battery temperature
    items:
      - description: alert when battery temperature is lower than this value
      - description: alert when battery temperature is higher than this value

required:
  - compatible

@@ -130,6 +151,9 @@ examples:
        /* table for 10 degree Celsius */
        ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>;
        resistance-temp-table = <20 100>, <10 90>, <0 80>, <(-10) 60>;
        operating-range-celsius = <(-30) 50>;
        ambient-celsius = <(-5) 50>;
        alert-celsius = <0 40>;
      };

      charger@11 {
Loading