1 # SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/iio/proximity/parallax-ping.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Parallax PING))) and LaserPING range finder
10 - Andreas Klinger <ak@it-klinger.de>
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
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
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.
45 additionalProperties: false
49 #include <dt-bindings/gpio/gpio.h>
51 compatible = "parallax,laserping";
52 ping-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;