]> git.baikalelectronics.ru Git - kernel.git/commit
Input: tsc2007 - add iio interface to read external ADC input and temperature
authorH. Nikolaus Schaller <hns@goldelico.com>
Fri, 17 Feb 2017 20:53:32 +0000 (12:53 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 17 Feb 2017 21:21:55 +0000 (13:21 -0800)
commitb12e0617c6f2ff39d4fb7feaf81621bf46c07857
tree4a71433235f43fcc05c64688abcdeccf97277dfa
parentb0a77e5c9095c49883c8cfd723febe9aeac1df80
Input: tsc2007 - add iio interface to read external ADC input and temperature

The tsc2007 chip not only has a resistive touch screen controller but
also an external AUX adc imput which can be used for an ambient
light sensor, battery voltage monitoring or any general purpose.

Additionally it can measure the chip temperature.

This extension provides an iio interface for these adc channels.

Since it is not wasting much resources and is very straightforward,
we simply provide all other adc channels as optional iio interfaces
as weel. This can be used for debugging or special applications.

This patch also splits the tsc2007 driver in several source files:
tsc2007.h -- constants, structs and stubs
tsc2007_core.c -- functional parts of the original driver
tsc2007_iio.c -- the optional iio stuff

Makefile magic allows to conditionally link the iio stuff
if CONFIG_IIO=y or =m in a way that it works with
CONFIG_TOUCHSCREEN_TSC2007=m.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/input/touchscreen/tsc2007.c [deleted file]
drivers/input/touchscreen/tsc2007.h [new file with mode: 0644]
drivers/input/touchscreen/tsc2007_core.c [new file with mode: 0644]
drivers/input/touchscreen/tsc2007_iio.c [new file with mode: 0644]