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.
pps-gpio: add device-tree binding and support
Instead of allocating a struct pps_gpio_platform_data in the DT case, store the necessary information in struct pps_gpio_device_data itself. This avoids an additional allocation and the ifdef. It also gets rid of some indirection. Also use dev_err instead of pr_err in the changed code. Signed-off-by: Jan Luebbe <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Rodolfo Giometti <[email protected]> Cc: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Showing
2 changed files
with
93 additions
and
54 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,20 @@ | ||
Device-Tree Bindings for a PPS Signal on GPIO | ||
|
||
These properties describe a PPS (pulse-per-second) signal connected to | ||
a GPIO pin. | ||
|
||
Required properties: | ||
- compatible: should be "pps-gpio" | ||
- gpios: one PPS GPIO in the format described by ../gpio/gpio.txt | ||
|
||
Optional properties: | ||
- assert-falling-edge: when present, assert is indicated by a falling edge | ||
(instead of by a rising edge) | ||
|
||
Example: | ||
pps { | ||
compatible = "pps-gpio"; | ||
gpios = <&gpio2 6 0>; | ||
|
||
assert-falling-edge; | ||
}; |
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