aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/tsc2007_core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-05-22Input: tsc2007 - move header file out of I2C realmWolfram Sang1-1/+1
include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-22Input: tsc2007 - correctly report pressure and not resistance to user spaceH. Nikolaus Schaller1-0/+2
Previously, tsc2007 would report as ABS_PRESSURE: 0 for no pressure (resistance infinite) high value for soft pressure (high resistance) low value for firm pressure (lower resistance) This does not matter for most applications (e.g. GUI, Menu, Scrolling etc.) where the ABS_PRESSURE is ignored and only BTN_TOUCH is processed to detect screen taps. Only some special graphics applications read the pressure channel and they will be mixed up by this non-monotonic relation. So we fix it to become: 0 for no pressure (resistance infinite) low value for soft pressure (high resistance) high value for firm pressure (lower resistance) While this patch changes the values reported to userspace, ABS_PRESSURE is used rarely by userspace. Most software only relies on BTN_TOUCH (boolean), which is not affected by this patch. Some graphics software makes use of the interface and does not work correctly with the currently used inverted behaviour. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Reviewed-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-22Input: tsc2007 - rename function tsc2007_calculate_pressureH. Nikolaus Schaller1-4/+4
Rename tsc2007_calculate_pressure to tsc2007_calculate_resistance because that is what it does. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-22Input: tsc2007 - switch to using input_set_capability()Dmitry Torokhov1-2/+1
Do not manipulate evbits/keybits directly, use helper for that. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-17Input: tsc2007 - add iio interface to read external ADC input and temperatureH. Nikolaus Schaller1-0/+457
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>