forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for gpio-poweroff (torvalds#29)
Cherry picked from Raspberry Pi kernel source. Signed-off-by: Phil Elwell <phil@raspberrypi.com> Signed-off-by: Nick Bulleid <nedbulleid@fastmail.com>
- Loading branch information
1 parent
a7c603b
commit e80c9d3
Showing
4 changed files
with
43 additions
and
3 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
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
22 changes: 22 additions & 0 deletions
22
arch/arm64/boot/dts/amlogic/overlay/meson-g12a-gpio-poweroff.dts
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,22 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/gpio/meson-g12a-gpio.h> | ||
|
||
/ { | ||
compatible = "radxa,zero", "amlogic,g12a"; | ||
|
||
fragment@0 { | ||
target-path = "/"; | ||
__overlay__ { | ||
gpio-poweroff { | ||
compatible = "gpio-poweroff"; | ||
/* Sets poweroff pin to GPIOAO_9 as an example. Modify as needed. */ | ||
gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_LOW>; | ||
timeout-ms = <20000>; | ||
force; | ||
}; | ||
}; | ||
}; | ||
}; |
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