iio: adc: add support for pac1921
authorMatteo Martelli <matteomartelli3@gmail.com>
Wed, 24 Jul 2024 09:08:33 +0000 (11:08 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 3 Aug 2024 09:13:44 +0000 (10:13 +0100)
commit371f778b83cd94467852efb466d74dc84eddd11e
tree04ce5fb67de539853f2cf9fa2678fd03831c927a
parente5535ccf44040f05c3926468182ded7954d64cf7
iio: adc: add support for pac1921

Add support for Microchip PAC1921 Power/Current monitor.

Implemented features:
* capture of bus voltage, sense voltage, current and power measurements
  in free-run integration mode
* support for both raw and triggered buffer reading
* support for overflow events
* scale attributes to control voltage and current gains
* oversampling ratio attribute to control the number of integration
  samples
* sampling rate attribute that reflects the integration period
* userspace attribute and DT parameter to control shunt resistor
* simple power management support

Limitations:
* operation mode fixed to free-run integration
* READ/INT pin and OUT pin not supported
* no controls for measurement resolutions and filters

Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
Link: https://patch.msgid.link/20240724-iio-pac1921-v4-3-723698e903a3@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
MAINTAINERS
drivers/iio/adc/Kconfig
drivers/iio/adc/Makefile
drivers/iio/adc/pac1921.c [new file with mode: 0644]