iio: adc: add Nuvoton NCT7201 ADC driver
From: | Eason Yang <j2anfernee-AT-gmail.com> | |
To: | avifishman70-AT-gmail.com, tmaimon77-AT-gmail.com, tali.perry1-AT-gmail.com, venture-AT-google.com, yuenn-AT-google.com, benjaminfair-AT-google.com, jic23-AT-kernel.org, lars-AT-metafoo.de, robh-AT-kernel.org, krzk+dt-AT-kernel.org, conor+dt-AT-kernel.org, nuno.sa-AT-analog.com, dlechner-AT-baylibre.com, javier.carrasco.cruz-AT-gmail.com, andriy.shevchenko-AT-linux.intel.com, gstols-AT-baylibre.com, olivier.moysan-AT-foss.st.com, mitrutzceclan-AT-gmail.com, tgamblin-AT-baylibre.com, matteomartelli3-AT-gmail.com, marcelo.schmitt-AT-analog.com, alisadariana-AT-gmail.com, joao.goncalves-AT-toradex.com, thomas.bonnefille-AT-bootlin.com, ramona.nechita-AT-analog.com, herve.codina-AT-bootlin.com, chanh-AT-os.amperecomputing.com, KWLIU-AT-nuvoton.com, yhyang2-AT-nuvoton.com | |
Subject: | [PATCH v4 0/2] iio: adc: add Nuvoton NCT7201 ADC driver | |
Date: | Fri, 21 Feb 2025 17:09:16 +0800 | |
Message-ID: | <20250221090918.1487689-1-j2anfernee@gmail.com> | |
Cc: | openbmc-AT-lists.ozlabs.org, linux-iio-AT-vger.kernel.org, devicetree-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, Eason Yang <j2anfernee-AT-gmail.com> | |
Archive-link: | Article |
Change since version 4: - Fix comments - Add interrupts and reset-gpios to the DT example - Use the FIELD_PREP and FIELD_GET - Add use_single_write in regmap_config - Use regmap_access_table Change since version 3: - Fix comments - Don't put nct720"x" in the name, just call it nct7201 - Remove differential inputs until conversions are finished - Add NCT7201_ prefix in all macros and avoid the tables - Correct event threshold values in raw units - Add with and without interrupt callback function to have the event config part and one that doesn't - Remove print an error message if regmap_wirte failed case Change since version 2: - Remvoe read-vin-data-size property, default use read word vin data - Use regmap instead of i2c smbus API - IIO should be IIO_CHAN_INFO_RAW and _SCALE not _PROCESSED - Use dev_xxx_probe in probe function and dev_xxx in other functions - Use devm_iio_device_register replace of iio_device_register - Use guard(mutex) replace of mutex_lock - Use get_unaligned_le16 conversion API Changes since version 1: - Add new property in iio:adc binding document - Add new driver for Nuvoton NCT720x driver Eason Yang (2): dt-bindings: iio: adc: add NCT7201 ADCs iio: adc: add support for Nuvoton NCT7201 .../bindings/iio/adc/nuvoton,nct7201.yaml | 57 ++ MAINTAINERS | 2 + drivers/iio/adc/Kconfig | 11 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/nct7201.c | 487 ++++++++++++++++++ 5 files changed, 558 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton,nct7201.yaml create mode 100644 drivers/iio/adc/nct7201.c -- 2.34.1