[PATCH v3 2/4] iio: adc: add STMPE ADC driver using IIO framework
From: Lee Jones <hidden>
Date: 2018-11-28 09:05:01
Also in:
linux-iio, linux-input, lkml
On Fri, 23 Nov 2018, Philippe Schenker wrote:
From: Stefan Agner <stefan@agner.ch> This adds an ADC driver for the STMPE device using the industrial input/output interface. The driver supports raw reading of values. The driver depends on the MFD STMPE driver. If the touchscreen block is enabled too, only four of the 8 ADC channels are available. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Max Krummenacher <redacted> Signed-off-by: Philippe Schenker <redacted> --- Changes in v3: - Undo ADC-settings related code-deletions in stmpe-ts.c that the code is backwards-compatible to older devicetrees. Changes in v2: - Code formatting - Move code to setup ADC to MFD device, as it is used by both drivers adc and touchscreen - Removed unused includes - Defined the macro STMPE_START_ONE_TEMP_CONV with other macros. - Added new macro that defines the channel of the temperature sensor. Took new name for STMPE_MAX_ADC->STMPE_ADC_LAST_NR and used it throughout the code for better readability. - Added mutex_unlock where missing. drivers/iio/adc/Kconfig | 7 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/stmpe-adc.c | 326 +++++++++++++++++++++++++++ drivers/input/touchscreen/stmpe-ts.c | 36 +--
drivers/mfd/Kconfig | 3 +- drivers/mfd/stmpe.c | 81 +++++++ include/linux/mfd/stmpe.h | 9 +
The MFD changes should be contained in a separate patch. I don't see anything which ties the changes together.
7 files changed, 437 insertions(+), 26 deletions(-) create mode 100644 drivers/iio/adc/stmpe-adc.c
-- Lee Jones [???] Linaro Services Technical Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog