iio: adc: Add support for AVIA HX710B ADC
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v11 Latest11 patches 5 repliesIn review
- v1011 patches 10 repliesSuperseded
- v911 patches 12 repliesSuperseded
Earlier versions · 8
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v8 | 11 patches | 13 replies | Superseded | |
| v7 | 11 patches | 14 replies | Superseded | |
| v6 | 11 patches | 14 replies | Superseded | |
| v5 | 11 patches | 11 replies | Superseded | |
| v4 | 7 patches | 25 replies | Superseded | |
| v3 | 3 patches | 9 replies | Superseded | |
| v2 | 2 patches | 8 replies | Superseded | |
| v1 | 2 patches | 7 replies | Superseded |
Changes in v11 from the cover letter
- 02/11: Retitled to "add VSUP and DVDD supply properties"; the commit message now documents both supplies (the patch already added both; only the title/text were out of sync). [Jonathan]
- 04/11: Reworded commit message so DVDD is no longer described as HX710B-specific (it is added for both parts in 02/11). The compatible match now uses "contains: const: avia,hx710b" so the constraints still apply if the compatible is later used as a fallback. dvdd-supply is now required for HX710B (in the HX710B branch only, so existing HX711 device trees are unaffected) and added to the HX710B example. [Jonathan, Conor, Sashiko]
- 11/11: Kconfig title and file header use "similar" instead of "compatible". Simplified the tail of hx711_set_hx710b_channel() to "return hx711_wait_for_ready()". Dropped an unrelated reindentation of the iio_push_to_buffers_with_timestamp() call. Converted hx710b_write_raw() to the new iio_device_claim_direct() API (see above). [Jonathan]
Patches in v11 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | dt-bindings: iio: adc: hx711: clean up existing binding textDocumentation/ | +10 | 0 replies | |
| 2/11 | dt-bindings: iio: adc: hx711: add VSUP and DVDD supply propertiesDocumentation/ | +13 | 0 replies | |
| 3/11 | dt-bindings: iio: adc: hx711: add RATE GPIO propertyDocumentation/ | +8 | 0 replies | |
| 4/11 | dt-bindings: iio: adc: hx711: add HX710B supportDocumentation/ | +37 | 1 reply | |
| 5/11 | iio: adc: hx711: move scale computation to per-device storagedrivers/ | +16 | 0 replies | |
| 6/11 | iio: adc: hx711: introduce hx711_chip_info structuredrivers/ | +36 | 0 replies | |
| 7/11 | iio: adc: hx711: pass trailing pulse count into hx711_readdrivers/ | +11 | 0 replies | |
| 8/11 | iio: adc: hx711: split variable assignments in hx711_read and hx711_resetdrivers/ | +4 | 0 replies | |
| 9/11 | iio: adc: hx711: localize loop iterators in hx711_readdrivers/ | +5 | 0 replies | |
| 10/11 | iio: adc: hx711: pass iio_chan_spec to hx711_reset_readdrivers/ | +21 | 0 replies | |
| 11/11 | iio: adc: hx711: add support for HX710Bdrivers/ drivers/ | +205 | 1 reply |
Reviews trailers per patch
All 11 patches have a Reviewed-by or Acked-by.
| Patch | Andy Shevchenko | Conor Dooley |
|---|---|---|
| 1/11 | R-b | A-b |
| 2/11 | R-b | A-b |
| 3/11 | R-b | A-b |
| 4/11 | R-b | A-b |
| 5/11 | R-b | |
| 6/11 | R-b | |
| 7/11 | R-b | |
| 8/11 | R-b | |
| 9/11 | R-b | |
| 10/11 | R-b | |
| 11/11 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v11 00/11] iio: adc: Add support for AVIA HX710B ADC
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.
This revision is rebased onto current mainline. Note that iio_device_claim_direct_mode() / iio_device_release_direct_mode() were removed from the IIO core since v10, so 11/11 now uses the replacement iio_device_claim_direct() / iio_device_release_direct() API.
Tested on a PocketBeagle2 (TI AM625): the avia,hx710b node probes and the driver registers its two IIO channels.
Changes from v10:
- 02/11: Retitled to "add VSUP and DVDD supply properties"; the commit message now documents both supplies (the patch already added both; only the title/text were out of sync). [Jonathan]
- 04/11: Reworded commit message so DVDD is no longer described as HX710B-specific (it is added for both parts in 02/11). The compatible match now uses "contains: const: avia,hx710b" so the constraints still apply if the compatible is later used as a fallback. dvdd-supply is now required for HX710B (in the HX710B branch only, so existing HX711 device trees are unaffected) and added to the HX710B example. [Jonathan, Conor, Sashiko]
- 11/11: Kconfig title and file header use "similar" instead of "compatible". Simplified the tail of hx711_set_hx710b_channel() to "return hx711_wait_for_ready()". Dropped an unrelated reindentation of the iio_push_to_buffers_with_timestamp() call. Converted hx710b_write_raw() to the new iio_device_claim_direct() API (see above). [Jonathan]
The Reviewed-by (Andy Shevchenko) and Acked-by (Conor Dooley) tags on 02/11 and 04/11 are carried over although those patches changed; please re-confirm if you disagree with the reworked constraints.
Patches 01/11, 03/11, and 05/11 are unchanged from v10.
Piyush Patle (11):
dt-bindings: iio: adc: hx711: clean up existing binding text
dt-bindings: iio: adc: hx711: add VSUP and DVDD supply properties
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 | 82 ++++- drivers/iio/adc/Kconfig | 8 +- drivers/iio/adc/hx711.c | 343 +++++++++++++++--- 3 files changed, 359 insertions(+), 74 deletions(-)
Signature · 1 line
2.43.0