History log of /linux-master/drivers/input/touchscreen/tsc2007_core.c
Revision Date Author Comments
# d8bde56d 17-May-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Input: Switch i2c drivers back to use .probe()

After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230517164645.162294-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 1661f60a 02-Apr-2023 Benjamin Bara <benjamin.bara@skidata.com>

Input: tsc2007 - enable cansleep pendown GPIO

When a hard IRQ is triggered, the soft IRQ, which decides if an actual
pen down happened, should always be triggered. This enables the usage of
"can_sleep" GPIO chips as "pen down" GPIO, as the value is not read
during the hard IRQ anymore. This might be the case if the GPIO chip is
an expander behind i2c.

Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Link: https://lore.kernel.org/r/20230328-tsc2007-sleep-v5-1-fc55e76d0ced@skidata.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 4e9d70a9 18-Nov-2022 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Input: tsc2007_core - Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-264-uwe@kleine-koenig.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# e512a9e9 15-Mar-2021 Andy Shevchenko <andy.shevchenko@gmail.com>

Input: tsc2007 - make use of device properties

Device property API allows to gather device resources from different sources,
such as ACPI. Convert the drivers to unleash the power of device property API.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210314210951.645783-2-andy.shevchenko@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# cee451c9 15-Mar-2021 Andy Shevchenko <andy.shevchenko@gmail.com>

Input: tsc2007 - convert to GPIO descriptors

This converts the driver to use GPIO descriptors.

Note that it now uses logical polarity and thus nagation has been dropped.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210314210951.645783-1-andy.shevchenko@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

Based on 2 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8fd70815 22-May-2017 Wolfram Sang <wsa@kernel.org>

Input: tsc2007 - move header file out of I2C realm

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>


# db4572ff 23-Feb-2017 H. Nikolaus Schaller <hns@goldelico.com>

Input: tsc2007 - correctly report pressure and not resistance to user space

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>


# deec586d 23-Feb-2017 H. Nikolaus Schaller <hns@goldelico.com>

Input: tsc2007 - rename function tsc2007_calculate_pressure

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>


# c61ebe83 17-Feb-2017 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: tsc2007 - switch to using input_set_capability()

Do not manipulate evbits/keybits directly, use helper for that.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# f1443404 17-Feb-2017 H. Nikolaus Schaller <hns@goldelico.com>

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>