From: Piyush Patle <piyushpatle228@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Andreas Klinger <ak@it-klinger.de>,
Andy Shevchenko <andy@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Rob Herring <robh@kernel.org>
Subject: [PATCH v9 00/11] iio: adc: Add support for AVIA HX710B ADC
Date: Tue, 19 May 2026 03:32:16 +0530 [thread overview]
Message-ID: <20260518220228.63322-1-piyushpatle228@gmail.com> (raw)
The HX710B is a 24-bit ADC from AVIA Semiconductor, related to the
HX711 already supported in this driver. Unlike the HX711 (which has
selectable gain and two input channels), the HX710B has a fixed gain
of 128 and two operating modes selected by the trailing PD_SCK pulse
count after each conversion:
25 pulses (1 trailing): differential input at 10 SPS
26 pulses (2 trailing): DVDD-AVDD supply monitor at 40 SPS
27 pulses (3 trailing): differential input at 40 SPS
This series first extends the existing HX711 binding and driver with
preparatory refactoring, then adds HX710B support on top.
The differential input is exposed as a single IIO channel with
IIO_CHAN_INFO_SAMP_FREQ, allowing userspace to select 10 or 40 SPS
without needing two separate channels for the same physical input.
The supply monitor is a second channel at fixed 40 SPS.
Patches 01/11, 02/11, 03/11, and 05/11 have already been applied to
the iio.git testing branch. They are re-included here so the series
applies cleanly as a unit.
Changes from v8:
- 04/11: Dropped a misleading sentence from the commit message that
suggested HX711-only binding extensions live in earlier patches
(they do not; the earlier patches extend the shared binding).
- 06/11: No code change. Added a note below the --- line clarifying
that __counted_by_ptr() is available since 6.12 (this tree is
6.17), so the annotation is well-defined.
- 11/11: Redesigned HX710B channel layout per Jonathan's v8 review.
Modes 1 and 3 both read the same physical differential input, so
they are now a single IIO channel with IIO_CHAN_INFO_SAMP_FREQ
instead of two separate channels. Added hx710b_write_raw() and
hx710b_read_avail() to let userspace control the sample rate.
Introduced hx710b_trailing_pulses() helper so .address is no longer
needed in the channel spec. Fixed hx711_trigger() to check the
return value of hx711_reset_read() and bail out on error. Fixed
channel_set update ordering in hx711_set_hx710b_channel() so the
field is written immediately after hx711_read() commits the new
hardware mode, before waiting for the chip to be ready.
Piyush Patle (11):
dt-bindings: iio: adc: hx711: clean up existing binding text
dt-bindings: iio: adc: hx711: add VSUP supply property
dt-bindings: iio: adc: hx711: add RATE GPIO property
dt-bindings: iio: adc: hx711: add HX710B support
iio: adc: hx711: move scale computation to per-device storage
iio: adc: hx711: introduce hx711_chip_info structure
iio: adc: hx711: pass trailing pulse count into hx711_read
iio: adc: hx711: split variable assignments in hx711_read and
hx711_reset
iio: adc: hx711: localize loop iterators in hx711_read
iio: adc: hx711: pass iio_chan_spec to hx711_reset_read
iio: adc: hx711: add support for HX710B
.../bindings/iio/adc/avia-hx711.yaml | 77 +++-
drivers/iio/adc/Kconfig | 8 +-
drivers/iio/adc/hx711.c | 362 ++++++++++++++----
3 files changed, 362 insertions(+), 85 deletions(-)
--
2.43.0
next reply other threads:[~2026-05-18 22:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 22:02 Piyush Patle [this message]
2026-05-18 22:02 ` [PATCH v9 01/11] dt-bindings: iio: adc: hx711: clean up existing binding text Piyush Patle
2026-05-18 22:02 ` [PATCH v9 02/11] dt-bindings: iio: adc: hx711: add VSUP supply property Piyush Patle
2026-05-20 10:09 ` Jonathan Cameron
2026-05-24 2:42 ` Piyush Patle
2026-05-26 12:31 ` Jonathan Cameron
2026-05-18 22:02 ` [PATCH v9 03/11] dt-bindings: iio: adc: hx711: add RATE GPIO property Piyush Patle
2026-05-18 22:02 ` [PATCH v9 04/11] dt-bindings: iio: adc: hx711: add HX710B support Piyush Patle
2026-05-20 10:19 ` Jonathan Cameron
2026-05-24 2:45 ` Piyush Patle
2026-05-26 12:32 ` Jonathan Cameron
2026-05-18 22:02 ` [PATCH v9 05/11] iio: adc: hx711: move scale computation to per-device storage Piyush Patle
2026-05-18 22:02 ` [PATCH v9 06/11] iio: adc: hx711: introduce hx711_chip_info structure Piyush Patle
2026-05-20 10:23 ` Jonathan Cameron
2026-05-18 22:02 ` [PATCH v9 07/11] iio: adc: hx711: pass trailing pulse count into hx711_read Piyush Patle
2026-05-18 22:02 ` [PATCH v9 08/11] iio: adc: hx711: split variable assignments in hx711_read and hx711_reset Piyush Patle
2026-05-20 10:24 ` Jonathan Cameron
2026-05-24 2:47 ` Piyush Patle
2026-05-18 22:02 ` [PATCH v9 09/11] iio: adc: hx711: localize loop iterators in hx711_read Piyush Patle
2026-05-18 22:02 ` [PATCH v9 10/11] iio: adc: hx711: pass iio_chan_spec to hx711_reset_read Piyush Patle
2026-05-18 22:02 ` [PATCH v9 11/11] iio: adc: hx711: add support for HX710B Piyush Patle
2026-05-20 10:31 ` Jonathan Cameron
2026-05-24 2:55 ` Piyush Patle
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=20260518220228.63322-1-piyushpatle228@gmail.com \
--to=piyushpatle228@gmail.com \
--cc=ak@it-klinger.de \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®