linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] iio: adc: Add Intel Dollar Cove TI PMIC ADC driver
@ 2025-07-27 21:06 Hans de Goede
  2025-07-27 21:06 ` [PATCH v3 1/2] iio: Improve iio_read_channel_processed_scale() precision Hans de Goede
  2025-07-27 21:06 ` [PATCH v3 2/2] iio: adc: Add Intel Dollar Cove TI PMIC ADC driver Hans de Goede
  0 siblings, 2 replies; 13+ messages in thread
From: Hans de Goede @ 2025-07-27 21:06 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner
  Cc: Hans de Goede, Nuno Sá, Andy Shevchenko, linux-iio

Hi,

Here is v3 of my patch to add an IIO driver for the Intel Dollar Cove TI
PMIC ADC.

Changes in v3:
- "iio: Improve iio_read_channel_processed_scale() precision"
  - Use div_s64() instead of div_u64() to fix -1.0 - 0.0 range
  - Directly return IIO_VAL_INT from valid cases and drop the final
    return ret after the switch-case
- "iio: adc: Add Intel Dollar Cove TI PMIC ADC driver"
  - Use new more compact DC_TI_ADC_DATA_REG_CH(x) macro
  - Use regmap_set_bits() regmap_clear_bits() where applicable
  - Use regmap_bulk_read() + be16_to_cpu() to read ADC value
  - Use sign_extend32() for vbat_zse and vbat_ge reading in probe()

Changes in v2:
- Add new "iio: Improve iio_read_channel_processed_scale() precision"
  patch to the series
- Add IIO_CHAN_INFO_SCALE and provide ADC scale info for Vbat
- Add IIO_CHAN_INFO_PROCESSED which applies calibration and
  scaling for the VBat channel
- Address some other small review remarks

Regards,

Hans


Hans de Goede (2):
  iio: Improve iio_read_channel_processed_scale() precision
  iio: adc: Add Intel Dollar Cove TI PMIC ADC driver

 drivers/iio/adc/Kconfig           |  11 +
 drivers/iio/adc/Makefile          |   1 +
 drivers/iio/adc/intel_dc_ti_adc.c | 327 ++++++++++++++++++++++++++++++
 drivers/iio/inkern.c              |  24 ++-
 4 files changed, 359 insertions(+), 4 deletions(-)
 create mode 100644 drivers/iio/adc/intel_dc_ti_adc.c

-- 
2.49.0


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

end of thread, other threads:[~2025-08-11 14:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-27 21:06 [PATCH v3 0/2] iio: adc: Add Intel Dollar Cove TI PMIC ADC driver Hans de Goede
2025-07-27 21:06 ` [PATCH v3 1/2] iio: Improve iio_read_channel_processed_scale() precision Hans de Goede
2025-07-29 17:26   ` David Lechner
2025-08-10 19:25     ` Hans de Goede
2025-08-10 21:12       ` Hans de Goede
2025-08-11 12:37         ` Andy Shevchenko
2025-08-11 14:35           ` Hans de Goede
2025-08-11 14:50             ` Andy Shevchenko
2025-07-27 21:06 ` [PATCH v3 2/2] iio: adc: Add Intel Dollar Cove TI PMIC ADC driver Hans de Goede
2025-07-28 18:41   ` Jonathan Cameron
2025-07-29 17:50   ` David Lechner
2025-07-31 11:12     ` Jonathan Cameron
2025-08-02 11:46       ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).