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-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git…
…/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - introduce reboot mode driver - add DT support to max8903 - add power supply support for axp221 - misc fixes * tag 'for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: reset: add reboot mode driver dt-bindings: power: reset: add document for reboot-mode driver power_supply: fix return value of get_property power: qcom_smbb: Make an extcon for usb cable detection max8903: adds support for initiation via device tree max8903: adds documentation for device tree bindings. max8903: remove unnecessary 'out of memory' error message. max8903: removes non zero validity checks on gpios. max8903: adds requesting of gpios. max8903: cleans up confusing relationship between dc_valid, dok and dcm. max8903: store pointer to pdata instead of copying it. power_supply: bq27xxx_battery: Group register mappings into one table docs: Move brcm,bcm21664-resetmgr.txt power/reset: make syscon_poweroff() static power: axp20x_usb: Add support for usb power-supply on axp22x pmics power_supply: bq27xxx_battery: Index register numbers by enum power_supply: bq27xxx_battery: Fix copy/paste error in header comment MAINTAINERS: Add file patterns for power supply device tree bindings power: reset: keystone: Enable COMPILE_TEST
- Loading branch information
Showing
22 changed files
with
775 additions
and
243 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
Documentation/devicetree/bindings/power/max8903-charger.txt
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,25 @@ | ||
Maxim Semiconductor MAX8903 Battery Charger bindings | ||
|
||
Required properties: | ||
- compatible: "maxim,max8903" for MAX8903 Battery Charger | ||
- dok-gpios: Valid DC power has been detected (active low, input), optional if uok-gpios is provided | ||
- uok-gpios: Valid USB power has been detected (active low, input), optional if dok-gpios is provided | ||
|
||
Optional properties: | ||
- cen-gpios: Charge enable pin (active low, output) | ||
- chg-gpios: Charger status pin (active low, input) | ||
- flt-gpios: Fault pin (active low, output) | ||
- dcm-gpios: Current limit mode setting (DC=1 or USB=0, output) | ||
- usus-gpios: USB suspend pin (active high, output) | ||
|
||
|
||
Example: | ||
|
||
max8903-charger { | ||
compatible = "maxim,max8903"; | ||
dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; | ||
flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; | ||
chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; | ||
cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; | ||
status = "okay"; | ||
}; |
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
Documentation/devicetree/bindings/power/reset/reboot-mode.txt
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,25 @@ | ||
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>; | ||
} |
35 changes: 35 additions & 0 deletions
35
Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt
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,35 @@ | ||
SYSCON reboot mode driver | ||
|
||
This driver gets reboot mode magic value form reboot-mode driver | ||
and stores it in a SYSCON mapped register. Then the bootloader | ||
can read it and take different action according to the magic | ||
value stored. | ||
|
||
This DT node should be represented as a sub-node of a "syscon", "simple-mfd" | ||
node. | ||
|
||
Required properties: | ||
- compatible: should be "syscon-reboot-mode" | ||
- offset: offset in the register map for the storage register (in bytes) | ||
|
||
Optional property: | ||
- mask: bits mask of the bits in the register to store the reboot mode magic value, | ||
default set to 0xffffffff if missing. | ||
|
||
The rest of the properties should follow the generic reboot-mode description | ||
found in reboot-mode.txt | ||
|
||
Example: | ||
pmu: pmu@20004000 { | ||
compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd"; | ||
reg = <0x20004000 0x100>; | ||
|
||
reboot-mode { | ||
compatible = "syscon-reboot-mode"; | ||
offset = <0x40>; | ||
mode-normal = <BOOT_NORMAL>; | ||
mode-recovery = <BOOT_RECOVERY>; | ||
mode-bootloader = <BOOT_FASTBOOT>; | ||
mode-loader = <BOOT_BL_DOWNLOAD>; | ||
}; | ||
}; |
3 changes: 2 additions & 1 deletion
3
Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9169,6 +9169,8 @@ M: David Woodhouse <[email protected]> | |
L: [email protected] | ||
T: git git://git.infradead.org/battery-2.6.git | ||
S: Maintained | ||
F: Documentation/devicetree/bindings/power/ | ||
F: Documentation/devicetree/bindings/power_supply/ | ||
F: include/linux/power_supply.h | ||
F: drivers/power/ | ||
X: drivers/power/avs/ | ||
|
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.