diff options
author | Jan Luebbe <jlu@pengutronix.de> | 2013-07-03 18:09:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:08:06 -0400 |
commit | c5dbcf8b70b50b1f6ef4850f61d79204ea46d761 (patch) | |
tree | 6c161151b513d5543d4c635cf91d5c8cd77efbe2 /Documentation/devicetree/bindings/pps | |
parent | 05212be363363efbc003d4fa1eaf8e48dfbe425a (diff) |
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 <jlu@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/devicetree/bindings/pps')
-rw-r--r-- | Documentation/devicetree/bindings/pps/pps-gpio.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.txt b/Documentation/devicetree/bindings/pps/pps-gpio.txt new file mode 100644 index 000000000000..40bf9c3564a5 --- /dev/null +++ b/Documentation/devicetree/bindings/pps/pps-gpio.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Device-Tree Bindings for a PPS Signal on GPIO | ||
2 | |||
3 | These properties describe a PPS (pulse-per-second) signal connected to | ||
4 | a GPIO pin. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: should be "pps-gpio" | ||
8 | - gpios: one PPS GPIO in the format described by ../gpio/gpio.txt | ||
9 | |||
10 | Optional properties: | ||
11 | - assert-falling-edge: when present, assert is indicated by a falling edge | ||
12 | (instead of by a rising edge) | ||
13 | |||
14 | Example: | ||
15 | pps { | ||
16 | compatible = "pps-gpio"; | ||
17 | gpios = <&gpio2 6 0>; | ||
18 | |||
19 | assert-falling-edge; | ||
20 | }; | ||