Devicetree
 help / color / mirror / Atom feed
From: "Paweł Wiśniewski" <pawel.wis.me@gmail.com>
To: jic23@kernel.org
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	ak@it-klinger.de, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/3] iio: proximity: Add Cytron HC-SR04 support
Date: Thu, 16 Jul 2026 19:35:53 +0200	[thread overview]
Message-ID: <cover.1784221074.git.pawel.wis.me@gmail.com> (raw)

Add Device Tree binding and driver match support for the Cytron
HC-SR04 ultrasonic distance sensor.

The HC-SR04 uses separate trigger and echo GPIOs. A trigger pulse of
at least 10 us starts a measurement, and the echo pulse width reports
the ultrasonic round-trip time. This matches the protocol already
implemented by the SRF04 IIO driver.

The series adds the Cytron vendor prefix, documents the
cytron,hc-sr04 compatible, and uses the existing SRF04 configuration
in the driver.

The Cytron vendor attribution is based on the HC-SR04 Product User's
Manual V1.0 supplied by the retailer. The manual was prepared by
Cytron Technologies Sdn. Bhd. and contains Cytron warranty and
support information.

This is sent as an RFC because the vendor attribution and compatible
name should be reviewed.

Testing:
- make dt_binding_check: PASS
- srf04 module build: PASS
- Tested on Raspberry Pi 3 Model B+
- Kernel: 6.18.34+rpt-rpi-v8
- Device instantiated using only cytron,hc-sr04
- Trigger connected to GPIO17
- Echo connected to GPIO27 through a 5 V to 3.3 V resistor divider
- Driver bound and registered an IIO device
- in_distance_raw returned changing distance readings

Paweł Wiśniewski (3):
  dt-bindings: vendor-prefixes: Add Cytron Technologies
  dt-bindings: iio: proximity: Add Cytron HC-SR04
  iio: proximity: srf04: Add Cytron HC-SR04 support

 .../devicetree/bindings/iio/proximity/devantech-srf04.yaml   | 5 ++++-
 Documentation/devicetree/bindings/vendor-prefixes.yaml       | 2 ++
 drivers/iio/proximity/Kconfig                                | 1 +
 drivers/iio/proximity/srf04.c                                | 1 +
 4 files changed, 8 insertions(+), 1 deletion(-)


base-commit: 37e2f878a7a660a216cc7a60459995fefd150f25
-- 
2.47.3


             reply	other threads:[~2026-07-16 17:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 17:35 Paweł Wiśniewski [this message]
2026-07-16 17:35 ` [RFC PATCH 1/3] dt-bindings: vendor-prefixes: Add Cytron Technologies Paweł Wiśniewski
2026-07-16 17:35 ` [RFC PATCH 2/3] dt-bindings: iio: proximity: Add Cytron HC-SR04 Paweł Wiśniewski
2026-07-16 17:45   ` sashiko-bot
2026-07-16 17:35 ` [RFC PATCH 3/3] iio: proximity: srf04: Add Cytron HC-SR04 support Paweł Wiśniewski
2026-07-16 17:46   ` sashiko-bot
2026-07-16 18:22 ` [RFC PATCH 0/3] iio: proximity: " Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1784221074.git.pawel.wis.me@gmail.com \
    --to=pawel.wis.me@gmail.com \
    --cc=ak@it-klinger.de \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox