Re: [RFC PATCH 2/3] dt-bindings: iio: proximity: Add Cytron HC-SR04
From: Jonathan Cameron
Date: Sat Jul 18 2026 - 18:45:37 EST
On Thu, 16 Jul 2026 19:35:55 +0200
Paweł Wiśniewski <pawel.wis.me@xxxxxxxxx> wrote:
> The Cytron HC-SR04 starts a ranging cycle with an active-high trigger
> pulse of at least 10 us and reports the acoustic round-trip time as
> the width of an active-high echo pulse.
>
> Add the cytron,hc-sr04 compatible and a reference to the product
> manual. Update the trigger GPIO description to account for the pulse
> durations used by the supported devices.
>
> The interface matches the two-GPIO protocol implemented by the
> existing SRF04 driver.
Is it suited to using a fallback compatible to one of those already
supported parts? This should say where things are different.
>
> Assisted-by: ChatGPT:GPT-5.6 Thinking
> Signed-off-by: Paweł Wiśniewski <pawel.wis.me@xxxxxxxxx>
> ---
> .../devicetree/bindings/iio/proximity/devantech-srf04.yaml | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> index ce795279839e..f4237ae612ab 100644
> --- a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> +++ b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> @@ -4,7 +4,7 @@
> $id: http://devicetree.org/schemas/iio/proximity/devantech-srf04.yaml#
> $schema: http://devicetree.org/meta-schemas/core.yaml#
>
> -title: Devantech SRF04 and Maxbotix mb1000 ultrasonic range finder
> +title: Devantech SRF04 and Maxbotix mb1000 and Cytron HC-SR04 ultrasonic range finder
If we were going to keep the list going it would need to be:
title: Devantech SRF04, Maxbotix mb1000 and Cytron HC-SR04 ultrasonic range finder
However, previous experience suggests that sooner or later it is better to just
jump to Devantech SRF04 and similar.
>
> maintainers:
> - Andreas Klinger <ak@xxxxxxxxxxxxx>
> @@ -21,9 +21,12 @@ description: |
>
> https://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf
>
> + https://botland.com.pl/index.php?controller=attachment&id_attachment=476
> +
> properties:
> compatible:
> enum:
> + - cytron,hc-sr04
> - devantech,srf04
> - maxbotix,mb1000
> - maxbotix,mb1010