forked from torvalds/linux
-
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.3' of git://git.kernel.org/pub/scm/linux/kernel/git…
…/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Nothing special for the power-supply subystem this time. - power-supply core: remove faulty cooling logic - convert all sysfs show() handlers from *printf() use sysfs_emit() - bq25890: add dual-charger support required by Lenovo Yoga Tab 3 Pro - bq27xxx: fix reporting critical level - syscon-reboot: add priority property support - new rt9467 charger driver - new rt9471 charger driver - new Odroid Go Ultra poweroff driver - misc minor fixes and cleanups" * tag 'for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (32 commits) power: reset: odroid-go-ultra: fix I2C dependency power: supply: leds: explicitly include linux/leds.h dt-bindings: power: supply: pm8941-coincell: Don't require charging properties dt-bindings: power: supply: pm8941-coincell: Add PM8998 compatible power: reset: add Odroid Go Ultra poweroff driver power: supply: rt9467: Fix spelling mistake "attache" -> "attach" power: supply: rt9471: fix using wrong ce_gpio in rt9471_probe() power: supply: max77650: Make max77650_charger_disable() return void Documentation: power: rt9467: Document exported sysfs entries power: supply: rt9467: Add Richtek RT9467 charger driver dt-bindings: power: supply: Add Richtek RT9467 battery charger Documentation: power: rt9471: Document exported sysfs entries power: supply: rt9471: Add Richtek RT9471 charger driver dt-bindings: power: supply: Add Richtek RT9471 battery charger power: supply: max1721x: Use strscpy() is more robust and safer power: supply: test-power: use strscpy() instead of strncpy() power: supply: bq27xxx: fix reporting critical level power: supply: bq256xx: Init ichg/vbat value with chip default value power: supply: collie_battery: Convert to GPIO descriptors (part 2) power: supply: remove faulty cooling logic ...
- Loading branch information
Showing
42 changed files
with
2,909 additions
and
233 deletions.
There are no files selected for viewing
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,19 @@ | ||
What: /sys/class/power_supply/rt9467-*/sysoff_enable | ||
Date: Feb 2023 | ||
KernelVersion: 6.3 | ||
Contact: ChiaEn Wu <[email protected]> | ||
Description: | ||
This entry allows enabling the sysoff mode of rt9467 charger | ||
devices. | ||
If enabled and the input is removed, the internal battery FET | ||
is turned off to reduce the leakage from the BAT pin. See | ||
device datasheet for details. It's commonly used when the | ||
product enter shipping stage. After entering shipping mode, | ||
only 'VBUS' or 'Power key" pressed can make it leave this mode. | ||
'Disable' also can help to leave it, but it's more like to | ||
abort the action before the device really enter shipping mode. | ||
|
||
Access: Read, Write | ||
Valid values: | ||
- 1: enabled | ||
- 0: disabled |
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,32 @@ | ||
What: /sys/class/power_supply/rt9471-*/sysoff_enable | ||
Date: Feb 2023 | ||
KernelVersion: 6.3 | ||
Contact: ChiYuan Huang <[email protected]> | ||
Description: | ||
This entry allows enabling the sysoff mode of rt9471 charger devices. | ||
If enabled and the input is removed, the internal battery FET is turned | ||
off to reduce the leakage from the BAT pin. See device datasheet for details. | ||
It's commonly used when the product enter shipping stage. After entering | ||
shipping mode, only 'VBUS' or 'Power key" pressed can make it leave this | ||
mode. 'Disable' also can help to leave it, but it's more like to abort | ||
the action before the device really enter shipping mode. | ||
|
||
Access: Read, Write | ||
Valid values: | ||
- 1: enabled | ||
- 0: disabled | ||
|
||
What: /sys/class/power_supply/rt9471-*/port_detect_enable | ||
Date: Feb 2023 | ||
KernelVersion: 6.3 | ||
Contact: ChiYuan Huang <[email protected]> | ||
Description: | ||
This entry allows enabling the USB BC12 port detect function of rt9471 charger | ||
devices. If enabled and VBUS is inserted, device will start to do the BC12 | ||
port detect and report the usb port type when port detect is done. See | ||
datasheet for details. Normally controlled when TypeC/USBPD port integrated. | ||
|
||
Access: Read, Write | ||
Valid values: | ||
- 1: enabled | ||
- 0: disabled |
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
82 changes: 82 additions & 0 deletions
82
Documentation/devicetree/bindings/power/supply/richtek,rt9467-charger.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,82 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/power/supply/richtek,rt9467-charger.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Richtek RT9467 Switching Battery Charger with Power Path Management | ||
|
||
maintainers: | ||
- ChiYuan Huang <[email protected]> | ||
- ChiaEn Wu <[email protected]> | ||
|
||
description: | | ||
RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for | ||
portable applications. It integrates a synchronous PWM controller, power | ||
MOSFETs, input current sensing and regulation, high-accuracy voltage | ||
regulation, and charge termination. The charge current is regulated through | ||
integrated sensing resistors. | ||
The RT9467 also features USB On-The-Go (OTG) support. It also integrates | ||
D+/D- pin for USB host/charging port detection. | ||
Datasheet is available at | ||
https://www.richtek.com/assets/product_file/RT9467/DS9467-01.pdf | ||
properties: | ||
compatible: | ||
const: richtek,rt9467-charger | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
wakeup-source: true | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
charge-enable-gpios: | ||
description: GPIO is used to turn on and off charging. | ||
maxItems: 1 | ||
|
||
usb-otg-vbus-regulator: | ||
type: object | ||
description: OTG boost regulator. | ||
unevaluatedProperties: false | ||
$ref: /schemas/regulator/regulator.yaml# | ||
|
||
properties: | ||
enable-gpios: true | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- wakeup-source | ||
- interrupts | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
#include <dt-bindings/gpio/gpio.h> | ||
i2c { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
charger@5b { | ||
compatible = "richtek,rt9467-charger"; | ||
reg = <0x5b>; | ||
wakeup-source; | ||
interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>; | ||
charge-enable-gpios = <&gpio26 1 GPIO_ACTIVE_LOW>; | ||
rt9467_otg_vbus: usb-otg-vbus-regulator { | ||
regulator-name = "rt9467-usb-otg-vbus"; | ||
regulator-min-microvolt = <4425000>; | ||
regulator-max-microvolt = <5825000>; | ||
regulator-min-microamp = <500000>; | ||
regulator-max-microamp = <3000000>; | ||
}; | ||
}; | ||
}; |
73 changes: 73 additions & 0 deletions
73
Documentation/devicetree/bindings/power/supply/richtek,rt9471.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,73 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/power/supply/richtek,rt9471.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Richtek RT9471 3A Single Cell Switching Battery charger | ||
|
||
maintainers: | ||
- Alina Yu <[email protected]> | ||
- ChiYuan Huang <[email protected]> | ||
|
||
description: | | ||
RT9471 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for | ||
portable applications. It supports USB BC1.2 port detection, current and | ||
voltage regulations in both charging and boost mode. | ||
Datasheet is available at | ||
https://www.richtek.com/assets/product_file/RT9471=RT9471D/DS9471D-02.pdf | ||
properties: | ||
compatible: | ||
const: richtek,rt9471 | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
charge-enable-gpios: | ||
description: GPIO used to turn on and off charging. | ||
maxItems: 1 | ||
|
||
wakeup-source: true | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
usb-otg-vbus-regulator: | ||
type: object | ||
$ref: /schemas/regulator/regulator.yaml# | ||
unevaluatedProperties: false | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- wakeup-source | ||
- interrupts | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
#include <dt-bindings/gpio/gpio.h> | ||
i2c { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
charger@53 { | ||
compatible = "richtek,rt9471"; | ||
reg = <0x53>; | ||
charge-enable-gpios = <&gpio26 1 GPIO_ACTIVE_LOW>; | ||
wakeup-source; | ||
interrupts-extended = <&gpio_intc 32 IRQ_TYPE_EDGE_FALLING>; | ||
usb-otg-vbus-regulator { | ||
regulator-name = "usb-otg-vbus"; | ||
regulator-min-microvolt = <4850000>; | ||
regulator-max-microvolt = <5300000>; | ||
regulator-min-microamp = <500000>; | ||
regulator-max-microamp = <1200000>; | ||
}; | ||
}; | ||
}; |
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.