54 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/proximity/parallax-ping.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Parallax PING))) and LaserPING range finder8 9maintainers:10 - Andreas Klinger <ak@it-klinger.de>11 12description: |13 Bit-banging driver using one GPIO:14 - ping-gpios is raised by the driver to start measurement15 - direction of ping-gpio is then switched into input with an interrupt16 for receiving distance value as PWM signal17 18 Specifications about the devices can be found at:19 http://parallax.com/sites/default/files/downloads/28041-LaserPING-2m-Rangefinder-Guide.pdf20 http://parallax.com/sites/default/files/downloads/28015-PING-Documentation-v1.6.pdf21 22properties:23 compatible:24 enum:25 - parallax,ping26 - parallax,laserping27 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 it32 should initiate the measurement cycle. Afterwards the GPIO is switched33 to input direction with an interrupt. The device sets it and the34 length of the input signal corresponds to the measured distance.35 It needs to be an GPIO which is able to deliver an interrupt because36 the time between two interrupts is measured in the driver.37 See Documentation/devicetree/bindings/gpio/gpio.txt for information38 on how to specify a consumer gpio.39 maxItems: 140 41required:42 - compatible43 - ping-gpios44 45additionalProperties: false46 47examples:48 - |49 #include <dt-bindings/gpio/gpio.h>50 proximity {51 compatible = "parallax,laserping";52 ping-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;53 };54