forked from raspberrypi/linux
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an overlay to activate a hog on a specified pin. Note that hogged GPIOs are not available for other uses, i.e. drivers or gpioset/gpioget. Inspired by a Forum thread here: https://forums.raspberrypi.com/viewtopic.php?t=334286 Signed-off-by: Phil Elwell <[email protected]>
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 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
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,27 @@ | ||
// Configure a "hog" on the specified GPIO | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
|
||
/ { | ||
compatible = "brcm,bcm2835"; | ||
|
||
fragment@0 { | ||
target = <&gpio>; | ||
__overlay__ { | ||
hog: hog@1a { | ||
gpio-hog; | ||
gpios = <26 GPIO_ACTIVE_HIGH>; | ||
output-high; | ||
}; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
gpio = <&hog>,"reg:0", | ||
<&hog>,"gpios:0"; | ||
active_low = <&hog>,"output-high!", | ||
<&hog>,"output-low?"; | ||
}; | ||
}; |