public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] iio: adc: add ad7606 calibration support
@ 2025-05-08 10:06 Angelo Dureghello
  2025-05-08 10:06 ` [PATCH v4 1/5] Documentation: ABI: IIO: add calibconv_delay documentation Angelo Dureghello
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Angelo Dureghello @ 2025-05-08 10:06 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-iio, linux-kernel, Michael Hennerich, devicetree,
	Angelo Dureghello, Conor Dooley

Add gain, offset and phase (as a delay) calibration support, for
ad7606b, ad7606c16 and ad7606c18.

Calibration is available for devices with software mode capability. 

Offset and phase calibration is configurable by sysfs attributes, while
gain calibration value in ohms must match the external RFilter value,
when an external RFilter is available, so implemented through a specific
devicetree "adi,rfilter-ohms" property.

This patchset depends on:
https://lore.kernel.org/linux-iio/20250505131544.0a7477a2@jic23-huawei/

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
---
Changes in v4:
- fix ad7606_chan_calib_gain_setup appropriately to be called once.
- Link to v3: https://lore.kernel.org/r/20250506-wip-bl-ad7606-calibration-v3-0-6eb7b6e72307@baylibre.com

Changes in v3:
- fix dt_bindings,
- change sysfs calib_delay to convdelay,
- fix sysfs documentation accordingly,
- used u32 for reg and r_gain,
- used DIV_ROUND_CLOSEST for setting r_gain,
- minor syntax fixes,
- Link to v2: https://lore.kernel.org/r/20250502-wip-bl-ad7606-calibration-v2-0-174bd0af081b@baylibre.com

Changes in v2:
- change phase_delay to calib_delay,
- fix dt_bindings,
- fix gain calibarion fdt parsing,
- fix ad7606c-18 calib offset range,
- fix calib offset calculation,
- fix calib gain range,
- Link to v1: https://lore.kernel.org/r/20250429-wip-bl-ad7606-calibration-v1-0-eb4d4821b172@baylibre.com

---
Angelo Dureghello (5):
      Documentation: ABI: IIO: add calibconv_delay documentation
      iio: core: add ADC delay calibration definition
      iio: adc: ad7606: add offset and phase calibration support
      dt-bindings: iio: adc: adi,ad7606: add gain calibration support
      iio: adc: ad7606: add gain calibration support

 Documentation/ABI/testing/sysfs-bus-iio            |  24 +++
 .../devicetree/bindings/iio/adc/adi,ad7606.yaml    |  29 +++
 drivers/iio/adc/ad7606.c                           | 221 +++++++++++++++++++++
 drivers/iio/adc/ad7606.h                           |  12 ++
 drivers/iio/industrialio-core.c                    |   1 +
 include/linux/iio/types.h                          |   1 +
 6 files changed, 288 insertions(+)
---
base-commit: 2f122cfb4c5d0ee7e44ed34ccb2d148d4146c0a5
change-id: 20250429-wip-bl-ad7606-calibration-20a396a60352

Best regards,
-- 
Angelo Dureghello <adureghello@baylibre.com>


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-05-22 12:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 10:06 [PATCH v4 0/5] iio: adc: add ad7606 calibration support Angelo Dureghello
2025-05-08 10:06 ` [PATCH v4 1/5] Documentation: ABI: IIO: add calibconv_delay documentation Angelo Dureghello
2025-05-08 18:35   ` Andy Shevchenko
2025-05-11 15:37   ` Jonathan Cameron
2025-05-08 10:06 ` [PATCH v4 2/5] iio: core: add ADC delay calibration definition Angelo Dureghello
2025-05-08 10:06 ` [PATCH v4 3/5] iio: adc: ad7606: add offset and phase calibration support Angelo Dureghello
2025-05-08 18:39   ` Andy Shevchenko
2025-05-08 10:06 ` [PATCH v4 4/5] dt-bindings: iio: adc: adi,ad7606: add gain " Angelo Dureghello
2025-05-08 11:11   ` Rob Herring (Arm)
2025-05-08 12:09     ` Angelo Dureghello
2025-05-08 14:48       ` Conor Dooley
2025-05-08 10:06 ` [PATCH v4 5/5] iio: adc: ad7606: " Angelo Dureghello
2025-05-08 19:00   ` Andy Shevchenko
2025-05-19  9:40     ` Angelo Dureghello
2025-05-19 10:14       ` Andy Shevchenko
2025-05-22 12:47         ` Angelo Dureghello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox