Path: blob/master/Documentation/devicetree/bindings/iio/proximity/parallax-ping.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/proximity/parallax-ping.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Parallax PING))) and LaserPING range finder78maintainers:9- Andreas Klinger <ak@it-klinger.de>1011description: |12Bit-banging driver using one GPIO:13- ping-gpios is raised by the driver to start measurement14- direction of ping-gpio is then switched into input with an interrupt15for receiving distance value as PWM signal1617Specifications about the devices can be found at:18http://parallax.com/sites/default/files/downloads/28041-LaserPING-2m-Rangefinder-Guide.pdf19http://parallax.com/sites/default/files/downloads/28015-PING-Documentation-v1.6.pdf2021properties:22compatible:23enum:24- parallax,ping25- parallax,laserping2627ping-gpios:28description:29Definition of the GPIO for the triggering and echo (output and input)30This GPIO is set for about 5 us by the driver to tell the device it31should initiate the measurement cycle. Afterwards the GPIO is switched32to input direction with an interrupt. The device sets it and the33length of the input signal corresponds to the measured distance.34It needs to be an GPIO which is able to deliver an interrupt because35the time between two interrupts is measured in the driver.36See Documentation/devicetree/bindings/gpio/gpio.txt for information37on how to specify a consumer gpio.38maxItems: 13940required:41- compatible42- ping-gpios4344additionalProperties: false4546examples:47- |48#include <dt-bindings/gpio/gpio.h>49proximity {50compatible = "parallax,laserping";51ping-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;52};535455