Skip to content

Commit b7f35e7

Browse files
it-klingerjic23
authored andcommitted
dt-bindings: add parallax ping sensors
Add dt-bindings for parallax PING))) and LaserPING iio sensors, which are used for measuring distances. Signed-off-by: Andreas Klinger <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 3e97696 commit b7f35e7

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/iio/proximity/parallax-ping.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Parallax PING))) and LaserPING range finder
8+
9+
maintainers:
10+
- Andreas Klinger <[email protected]>
11+
12+
description: |
13+
Bit-banging driver using one GPIO:
14+
- ping-gpios is raised by the driver to start measurement
15+
- direction of ping-gpio is then switched into input with an interrupt
16+
for receiving distance value as PWM signal
17+
18+
Specifications about the devices can be found at:
19+
http://parallax.com/sites/default/files/downloads/28041-LaserPING-2m-Rangefinder-Guide.pdf
20+
http://parallax.com/sites/default/files/downloads/28015-PING-Documentation-v1.6.pdf
21+
22+
properties:
23+
compatible:
24+
enum:
25+
- parallax,ping
26+
- parallax,laserping
27+
28+
ping-gpios:
29+
description:
30+
Definition of the GPIO for the triggering and echo (output and input)
31+
This GPIO is set for about 5 us by the driver to tell the device it
32+
should initiate the measurement cycle. Afterwards the GPIO is switched
33+
to input direction with an interrupt. The device sets it and the
34+
length of the input signal corresponds to the measured distance.
35+
It needs to be an GPIO which is able to deliver an interrupt because
36+
the time between two interrupts is measured in the driver.
37+
See Documentation/devicetree/bindings/gpio/gpio.txt for information
38+
on how to specify a consumer gpio.
39+
maxItems: 1
40+
41+
required:
42+
- compatible
43+
- ping-gpios
44+
45+
examples:
46+
- |
47+
#include <dt-bindings/gpio/gpio.h>
48+
proximity {
49+
compatible = "parallax,laserping";
50+
ping-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
51+
};

0 commit comments

Comments
 (0)