Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/proximity/parallax-ping.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Parallax PING))) and LaserPING range finder
0008 
0009 maintainers:
0010   - Andreas Klinger <ak@it-klinger.de>
0011 
0012 description: |
0013   Bit-banging driver using one GPIO:
0014   - ping-gpios is raised by the driver to start measurement
0015   - direction of ping-gpio is then switched into input with an interrupt
0016     for receiving distance value as PWM signal
0017 
0018   Specifications about the devices can be found at:
0019   http://parallax.com/sites/default/files/downloads/28041-LaserPING-2m-Rangefinder-Guide.pdf
0020   http://parallax.com/sites/default/files/downloads/28015-PING-Documentation-v1.6.pdf
0021 
0022 properties:
0023   compatible:
0024     enum:
0025       - parallax,ping
0026       - parallax,laserping
0027 
0028   ping-gpios:
0029     description:
0030       Definition of the GPIO for the triggering and echo (output and input)
0031       This GPIO is set for about 5 us by the driver to tell the device it
0032       should initiate the measurement cycle. Afterwards the GPIO is switched
0033       to input direction with an interrupt. The device sets it and the
0034       length of the input signal corresponds to the measured distance.
0035       It needs to be an GPIO which is able to deliver an interrupt because
0036       the time between two interrupts is measured in the driver.
0037       See Documentation/devicetree/bindings/gpio/gpio.txt for information
0038       on how to specify a consumer gpio.
0039     maxItems: 1
0040 
0041 required:
0042   - compatible
0043   - ping-gpios
0044 
0045 additionalProperties: false
0046 
0047 examples:
0048   - |
0049     #include <dt-bindings/gpio/gpio.h>
0050     proximity {
0051         compatible = "parallax,laserping";
0052         ping-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
0053     };