-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'for-v6.4' 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 support for automatic handling of constant battery data supplied by firmware - generic-adc-battery: major cleanup - axp288_charger: fix ACPI issues on x86 Android tablets - rk817: cleanup and fix handling for low state of charge * tag 'for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (26 commits) power: supply: rk817: Fix low SOC bugs power: supply: rk817: Drop unneeded debugging code power: supply: axp288_charger: Use alt usb-id extcon on some x86 android tablets power: supply: generic-adc-battery: style fixes power: supply: generic-adc-battery: improve error message power: supply: generic-adc-battery: update copyright info power: supply: generic-adc-battery: add DT support power: supply: generic-adc-battery: add temperature support power: supply: generic-adc-battery: simplify read_channel logic power: supply: generic-adc-battery: use simple-battery API power: supply: generic-adc-battery: drop memory alloc error message power: supply: generic-adc-battery: drop charge now support power: supply: generic-adc-battery: drop jitter delay support power: supply: generic-adc-battery: fix unit scaling power: supply: generic-adc-battery: convert to managed resources power: supply: core: auto-exposure of simple-battery data dt-bindings: power: supply: adc-battery: add binding power: supply: bq256xx: Support to disable charger power: supply: charger-manager: Use of_property_read_bool() for boolean properties power: reset: qcom-pon: drop of_match_ptr for ID table ...
- Loading branch information
Showing
17 changed files
with
412 additions
and
253 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
Documentation/devicetree/bindings/power/supply/adc-battery.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/power/supply/adc-battery.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: ADC battery | ||
|
||
maintainers: | ||
- Sebastian Reichel <sre@kernel.org> | ||
|
||
description: | ||
Basic battery capacity meter, which only reports basic battery data | ||
via ADC channels and optionally indicate that the battery is full by | ||
polling a GPIO line. | ||
|
||
The voltage is expected to be measured between the battery terminals | ||
and mandatory. The optional current/power channel is expected to | ||
monitor the current/power flowing out of the battery. Last but not | ||
least the temperature channel is supposed to measure the battery | ||
temperature. | ||
|
||
allOf: | ||
- $ref: power-supply.yaml# | ||
|
||
properties: | ||
compatible: | ||
const: adc-battery | ||
|
||
charged-gpios: | ||
description: | ||
GPIO which signals that the battery is fully charged. The GPIO is | ||
often provided by charger ICs, that are not software controllable. | ||
maxItems: 1 | ||
|
||
io-channels: | ||
minItems: 1 | ||
maxItems: 4 | ||
|
||
io-channel-names: | ||
minItems: 1 | ||
items: | ||
- const: voltage | ||
- enum: [ current, power, temperature ] | ||
- enum: [ power, temperature ] | ||
- const: temperature | ||
|
||
monitored-battery: true | ||
|
||
required: | ||
- compatible | ||
- io-channels | ||
- io-channel-names | ||
- monitored-battery | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/gpio/gpio.h> | ||
fuel-gauge { | ||
compatible = "adc-battery"; | ||
charged-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; | ||
io-channels = <&adc 13>, <&adc 37>; | ||
io-channel-names = "voltage", "current"; | ||
power-supplies = <&charger>; | ||
monitored-battery = <&battery>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.