Skip to content

Commit

Permalink
Merge tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
 "battery/charger driver changes:
   - core:
      - provide function stubs if CONFIG_POWER_SUPPLY=n
      - reduce loglevel for probe defer info
   - surface:
      - new battery and charger drivers for Surface
   - bq27xxx:
      - add bq78z100 support
      - fix current_now/power_avg for newer chips
   - cw2015:
      - add CHARGE_NOW support
   - ab8500:
      - drop pdata support
   - convert most DT bindings to YAML
   - lots of minor fixes and cleanups

  reset drivers:
   - ltc2952-poweroff:
      - make trigger delay configurable from DT
   - minor fixes and cleanups"

* tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (97 commits)
  power: supply: cpcap-battery: fix invalid usage of list cursor
  power: supply: bq256xx: add kerneldoc for structure members
  power: supply: act8945a: correct kerneldoc
  power: supply: max17040: remove unneeded double cast
  power: supply: max17040: handle device_property_read_u8_array() failure
  power: supply: max14577: remove unneeded variable initialization
  power: supply: surface-charger: Make symbol 'surface_ac_pm_ops' static
  power: supply: surface-battery: Make some symbols static
  power: reset: restart-poweroff: Add missing MODULE_DEVICE_TABLE
  power: reset: hisi-reboot: add missing MODULE_DEVICE_TABLE
  power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()
  power: supply: generic-adc-battery: fix possible use-after-free in gab_remove()
  power: supply: Add AC driver for Surface Aggregator Module
  power: supply: Add battery driver for Surface Aggregator Module
  power: supply: bq25980: Move props from battery node
  power: supply: core: Use true and false for bool variable
  power: supply: goldfish: Remove the GOLDFISH dependency
  power: reset: ltc2952: make trigger delay configurable
  power: supply: cpcap-charger: Simplify bool conversion
  power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug bounce
  ...
  • Loading branch information
torvalds committed Apr 28, 2021
2 parents a8b5e03 + d0a43c1 commit 5a69e9b
Show file tree
Hide file tree
Showing 139 changed files with 4,680 additions and 2,133 deletions.
15 changes: 15 additions & 0 deletions Documentation/ABI/testing/sysfs-class-power-surface
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
What: /sys/class/power_supply/<supply_name>/alarm
Date: April 2021
KernelVersion: 5.13
Contact: Maximilian Luz <[email protected]>
Description:
Battery trip point. When the remaining battery capacity crosses this
value in either direction, the system will be notified and if
necessary woken.

Set to zero to clear/disable.

Access: Read, Write

Valid values: In micro-Wh or micro-Ah, depending on the power unit
of the battery
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ Optional properties:
chip's trigger line. If this property is not set, the
trigger function is ignored and the chip is kept alive
until an explicit kill signal is received
- trigger-delay-ms The number of milliseconds to wait after trigger line
assertion before executing shut down procedure.
The default is 2500ms.

Example:

ltc2952 {
compatible = "lltc,ltc2952";

trigger-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
trigger-delay-ms = <2000>;
watchdog-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
kill-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
};
16 changes: 0 additions & 16 deletions Documentation/devicetree/bindings/power/supply/ab8500/btemp.txt

This file was deleted.

16 changes: 0 additions & 16 deletions Documentation/devicetree/bindings/power/supply/ab8500/chargalg.txt

This file was deleted.

25 changes: 0 additions & 25 deletions Documentation/devicetree/bindings/power/supply/ab8500/charger.txt

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: "http://devicetree.org/schemas/power/supply/active-semi,act8945a-charger.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Active-semi ACT8945A Charger Function

maintainers:
- Sebastian Reichel <[email protected]>

allOf:
- $ref: power-supply.yaml#

properties:
compatible:
const: active-semi,act8945a-charger

interrupts:
maxItems: 1

active-semi,chglev-gpios:
maxItems: 1
description: charge current level GPIO

active-semi,lbo-gpios:
maxItems: 1
description: low battery voltage detect GPIO

active-semi,input-voltage-threshold-microvolt:
description: |
Specifies the charger's input over-voltage threshold value.
Despite the name, specified values are in millivolt (mV).
Defaults to 6.6 V
enum: [ 6600, 7000, 7500, 8000 ]

active-semi,precondition-timeout:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Specifies the charger's PRECONDITION safety timer setting value in minutes.
If 0, it means to disable this timer.
Defaults to 40 minutes.
enum: [ 0, 40, 60, 80 ]

active-semi,total-timeout:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Specifies the charger's total safety timer setting value in hours;
If 0, it means to disable this timer;
Defaults to 3 hours.
enum: [ 0, 3, 4, 5 ]

required:
- compatible
- interrupts
- active-semi,chglev-gpios
- active-semi,lbo-gpios

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
charger {
compatible = "active-semi,act8945a-charger";
interrupt-parent = <&pioA>;
interrupts = <45 IRQ_TYPE_LEVEL_LOW>;
active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
active-semi,input-voltage-threshold-microvolt = <6600>;
active-semi,precondition-timeout = <40>;
active-semi,total-timeout = <3>;
};
};
25 changes: 0 additions & 25 deletions Documentation/devicetree/bindings/power/supply/axp20x_ac_power.txt

This file was deleted.

20 changes: 0 additions & 20 deletions Documentation/devicetree/bindings/power/supply/axp20x_battery.txt

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions Documentation/devicetree/bindings/power/supply/battery.txt

This file was deleted.

47 changes: 0 additions & 47 deletions Documentation/devicetree/bindings/power/supply/bq2415x.txt

This file was deleted.

Loading

0 comments on commit 5a69e9b

Please sign in to comment.