History log of /linux-master/drivers/input/touchscreen/ti_am335x_tsc.c
Revision Date Author Comments
# 0f82d108 08-Feb-2024 Colin Ian King <colin.i.king@gmail.com>

Input: ti_am335x_tsc - remove redundant assignment to variable config

The variable config is being initialized with a value that is never
read, it is being re-assigned in the next statement. The initialization
is redundant and can be removed.

Cleans up clang scan build warning:
drivers/input/touchscreen/ti_am335x_tsc.c:160:2: warning: Value stored
to 'config' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240205215940.1851349-1-colin.i.king@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# d722a702 20-Sep-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Input: ti_am335x_tsc - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

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


# dbce1a7d 17-Jul-2023 Rob Herring <robh@kernel.org>

Input: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230714174633.4058096-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# f8401643 02-Jan-2023 Jonathan Cameron <Jonathan.Cameron@huawei.com>

Input: ti_am335x_tsc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()

SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection
against unused function warnings. The new combination of pm_sleep_ptr()
and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions,
thus suppressing the warning, but still allowing the unused code to be
removed. Thus also drop the __maybe_unused markings.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230102181842.718010-63-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# b6e43ddd 10-Jan-2022 Qinghua Jin <qhjin.dev@gmail.com>

Input: ti_am335x_tsc - fix a typo in a comment

change 'postion' to 'position'

Signed-off-by: Qinghua Jin <qhjin.dev@gmail.com>
Link: https://lore.kernel.org/r/20220106084215.355295-1-qhjin.dev@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 23dee6c6 12-Dec-2021 Dario Binacchi <dariobin@libero.it>

Input: ti_am335x_tsc - lower the X and Y sampling time

The open delay time has to be applied only on the first sample of the
X/Y coordinates because on the following samples the ADC channel is not
changed. Removing this time from the samples after the first one,
"ti,coordinate-readouts" greater than 1, decreases the total acquisition
time, allowing to increase the number of acquired coordinates in the time
unit.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Link: https://lore.kernel.org/r/20211212125358.14416-4-dariobin@libero.it
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 6bfeb6c2 12-Dec-2021 Dario Binacchi <dariobin@libero.it>

Input: ti_am335x_tsc - fix STEPCONFIG setup for Z2

The Z2 step configuration doesn't erase the SEL_INP_SWC_3_0 bit-field
before setting the ADC channel. This way its value could be corrupted by
the ADC channel selected for the Z1 coordinate.

Fixes: 8c896308feae ("input: ti_am335x_adc: use only FIFO0 and clean up a little")
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Link: https://lore.kernel.org/r/20211212125358.14416-3-dariobin@libero.it
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 73cca71a 12-Dec-2021 Dario Binacchi <dariobin@libero.it>

Input: ti_am335x_tsc - set ADCREFM for X configuration

As reported by the STEPCONFIG[1-16] registered field descriptions of the
TI reference manual, for the ADC "in single ended, SEL_INM_SWC_3_0 must
be 1xxx".

Unlike the Y and Z coordinates, this bit has not been set for the step
configuration registers used to sample the X coordinate.

Fixes: 1b8be32e6914 ("Input: add support for TI Touchscreen controller")
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Link: https://lore.kernel.org/r/20211212125358.14416-2-dariobin@libero.it
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 44466306 18-Feb-2019 YueHaibing <yuehaibing@huawei.com>

Input: ti_am335x_tsc - remove set but not used variable 'tscadc_dev'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/input/touchscreen/ti_am335x_tsc.c: In function 'titsc_suspend':
drivers/input/touchscreen/ti_am335x_tsc.c:510:24: warning:
variable 'tscadc_dev' set but not used [-Wunused-but-set-variable]

drivers/input/touchscreen/ti_am335x_tsc.c: In function 'titsc_resume':
drivers/input/touchscreen/ti_am335x_tsc.c:527:24: warning:
variable 'tscadc_dev' set but not used [-Wunused-but-set-variable]

It's not used any more after 333e07ec4b33 ("Input: ti_am335x_tsc: Mark TSC
device as wakeup source")

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


# 7a39915b 30-Jun-2018 Vignesh R <vigneshr@ti.com>

Input: ti_am335x_tsc: Mark IRQ as wakeup capable

On AM335x, ti_am335x_tsc can wake up the system from suspend, mark the
IRQ as wakeup capable, so that device irq is not disabled during system
suspend.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 333e07ec 30-Jun-2018 Vignesh R <vigneshr@ti.com>

Input: ti_am335x_tsc: Mark TSC device as wakeup source

Instead of TSCADC MFD device, mark TSC as wakeup source and change all
wakeup related PM calls to operate on TSC device.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 22a844b8 30-May-2018 Grygorii Strashko <grygorii.strashko@ti.com>

Input: ti_am335x_tsc - prevent system suspend when TSC is in use

Prevent system suspend while user has finger on touch screen,
because TSC is wakeup source and suspending device while in use will
result in failure to disable the module.
This patch uses pm_stay_awake() and pm_relax() APIs to prevent and
resume system suspend as required.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 46850420 30-May-2018 Grygorii Strashko <grygorii.strashko@ti.com>

Input: ti_am335x_tsc - ack pending IRQs at probe and before suspend

It is seen that just enabling the TSC module triggers a HW_PEN IRQ
without any interaction with touchscreen by user. This results in first
suspend/resume sequence to fail as system immediately wakes up from
suspend as soon as HW_PEN IRQ is enabled in suspend handler due to the
pending IRQ. Therefore clear all IRQs at probe and also in suspend
callback for sanity.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# cf5dd489 18-Oct-2017 Jeff Lance <j-lance1@ti.com>

Input: ti_am335x_tsc - fix incorrect step config for 5 wire touchscreen

Step config setting for 5 wire touchscreen is incorrect for Y coordinates.
It was broken while we moved to DT. If you look close at the offending
commit bb76dc09ddfc ("input: ti_am33x_tsc: Order of TSC wires, made
configurable"), the change was:

- STEPCONFIG_XNP | STEPCONFIG_YPN;
+ ts_dev->bit_xn | ts_dev->bit_yp;

while bit_xn = STEPCONFIG_XNN and bit_yp = STEPCONFIG_YNN. Not quite the
same.

Fixes: bb76dc09ddfc ("input: ti_am33x_tsc: Order of TSC wires, made configurable")
Signed-off-by: Jeff Lance <j-lance1@ti.com>
[vigneshr@ti.com: Rebase to v4.14-rc1]
Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 520d8267 01-Jun-2016 Andrew F. Davis <afd@ti.com>

Input: ti_am335x_tsc - use variable name for sizeof() operator

Fix the code formatting to use the kernel preferred style
of using the actual variables to determize the size using
the sizeof() operator.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 20aa787e 07-Jan-2016 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: ti_am335x_tsc - use SIMPLE_DEV_PM_OPS

Instead of doing the dance with macro that either resolves to a pointer or
NULL, let's switch to using SIMPLE_DEV_PM_OPS().

Also let's mark suspend and resume methods as __maybe_unused instead of
guarding them with an #ifdef and rely on linker to drop unused code. Doing
so should allow better compile coverage.

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


# 3b7474ec 07-Jan-2016 Dave Gerlach <d-gerlach@ti.com>

Input: ti_am335x_tsc - fix HWPEN interrupt handling

Remove write to REG_IRQCLR and REG_IRQWAKEUP in interrupt handler for
IRQENB_HW_PEN as the resume handler should and does clear REG_IRQWAKEUP.
IRQENB_HW_PEN bit is set in irqclr so that all interrupts get cleared
later so let IRQENB_HW_PEN be cleared by that.

Without this patch wakeup events from TSC_ADC do not work because pending
interrupts in TSC_ADC were causing HW_PEN interrupt, needed for wake from
suspend modes, to get disabled immediately by IRQ handler after being
enabled and preventing wake from happening.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 83edfdf3 03-Feb-2015 Vignesh R <vigneshr@ti.com>

Input: ti_am335x_tsc - replace delta filtering with median filtering

Previously, delta filtering was applied TSC co-ordinate readouts before
reporting a single value to user space. This patch replaces delta filtering
with median filtering. Median filtering sorts co-ordinate readouts, drops
min and max values, and reports the average of remaining values. This
method is more sensible than delta filtering. Median filtering is applied
only if number of readouts is greater than 3 else just average of
co-ordinate readouts is reported.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# bf223612 03-Feb-2015 Vignesh R <vigneshr@ti.com>

Input: ti_am335x_tsc - read charge delay from DT

This patch reads charge delay from tsc DT node and writes to
REG_CHARGEDELAY register. If the charge delay is not specified in DT then
default value of 0x400(CHARGEDLY_OPENDLY) is used.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 344d635b 03-Feb-2015 Brad Griffis <bgriffis@ti.com>

Input: ti_am335x_tsc - remove udelay in interrupt handler

TSC interrupt handler had udelay to avoid reporting of false pen-up
interrupt to user space. This patch implements workaround suggesting in
Advisory 1.0.31 of silicon errata for am335x, thus eliminating udelay and
touchscreen lag. This also improves performance of touchscreen and
eliminates sudden jump of cursor at touch release.

IDLECONFIG and CHARGECONFIG registers are to be configured with same values
in order to eliminate false pen-up events. This workaround may result in
false pen-down to be detected, hence considerable charge step delay needs
to be added. The charge delay is set to 0xB000 (in terms of ADC clock
cycles) by default.

TSC steps are disabled at the end of every sampling cycle and EOS bit is
set. Once the EOS bit is set, the TSC steps need to be re-enabled to begin
next sampling cycle.

Signed-off-by: Brad Griffis <bgriffis@ti.com>
[vigneshr@ti.com: Ported the patch from v3.12 to v3.19rc1]
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 3a59684c 03-Feb-2015 Brad Griffis <bgriffis@ti.com>

Input: ti_am335x_tsc - interchange touchscreen and ADC steps

This patch makes the initial changes required to workaround TSC-false
pen-up interrupts. It is required to implement these changes in order to
remove udelay in the TSC interrupt handler and false pen-up events. The
charge step is to be executed immediately after sampling X+. Hence TSC is
made to use higher numbered steps (steps 5 to 16 for 5 co-ordinate
readouts, 4 wire TSC configuration) and ADC to use lower ones. Further X
co-ordinate readouts must be the last to be sampled, thus co-ordinates are
sampled in the order Y-Z-X.

Signed-off-by: Brad Griffis <bgriffis@ti.com>
[vigneshr@ti.com: Ported the patch from v3.12 to v3.19rc1]
Signed-off-by: Vignesh R <vigneshr@ti.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 7b8f16c2 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

input: touchscreen: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 31972f6e 15-Jun-2014 Felipe Balbi <balbi@ti.com>

Input: ti_am335x_tsc - warn about incorrect spelling

In the hopes that people run new kernels on their devices, let's add a
warning message asking users to have their DTS file fixed.

The goal is that by Linux 4.0 we will be able to remove support for the
bogus version of our touchscreen's DTS.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 7e170c6e 19-Dec-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

mfd: ti_am335x_tscadc: Don't read back REG_SE

The purpose of reg_se_cache has been defeated. It should avoid the
read-back of the register to avoid the latency and the fact that the
bits are reset to 0 after the individual conversation took place.

The reason why this is required like this to work, is that read-back of
the register removes the bits of the ADC so they do not start another
conversation after the register is re-written from the TSC side for the
update.
To avoid the not required read-back I introduce a "set once" variant which
does not update the cache mask. After the conversation completes, the
bit is removed from the SE register anyway and we don't plan a new
conversation "any time soon". The current set function is renamed to
set_cache to distinguish the two operations.
This is a small preparation for a larger sync-rework.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# bf9a9f8e 06-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com>

Input: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# c9aeb249 11-Nov-2013 Felipe Balbi <balbi@ti.com>

Input: ti_am335x_tsc - fix spelling mistake in TSC/ADC DT binding

There was a spelling mistake on TSC/ADC binding where "coordinate" was
spelled as "coordiante".

We can't simply fix the error due to DT being an ABI, the approach taken
was to first use correct spelling and if that fails, fall back to
miss-spelled version.

It's unfortunate that has creeped into the tree.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 8e6146bf 06-Oct-2013 Sachin Kamat <sachin.kamat@linaro.org>

Input: ti_am335x_tsc - remove redundant of_match_ptr

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# baee5399 19-Sep-2013 Zubair Lutfullah <zubair.lutfullah@gmail.com>

input: ti_am335x_tsc: Enable shared IRQ for TSC

Enable shared IRQ to allow ADC to share IRQ line from
parent MFD core. Only FIFO0 IRQs are for TSC and handled
on the TSC side.

Step mask would be updated from cached variable only previously.
In rare cases when both TSC and ADC are used, the cached
variable gets mixed up.
The step mask is written with the required mask every time.

Rachna Patil (TI) laid ground work for shared IRQ.

Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>


# 9a28b883 05-Jun-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

input: ti_am335x_tsc: return IRQ_NONE if there was no IRQ for us

The previous patch ("input/ti_am335x_tsc: ACK the HW_PEN irq in ISR")
acked the interrupt so we don't freeze if we don't handle an enabled
interrupt source. The interrupt core has a mechanism for this and to get
it work one should only say that it handled an interrupt if it is
actually the case.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# 00789e5d 05-Jun-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

input: ti_am335x_tsc: ACK the HW_PEN irq in ISR

The interrupt source IRQENB_HW_PEN is enabled in suspend and suposed to
be used as a wake up source. Once this interrupt source is unmaksed, the
devices ends up in ISR and never continues.
This change ACKs the interrupt and disables it so the system does not
freeze.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# 8c896308 29-May-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

input: ti_am335x_adc: use only FIFO0 and clean up a little

The driver programs a threshold of "coordinate_readouts" say 5. The
REG_FIFO0THR registers says it should it be programmed to "threshold
minus one". The driver does not expect just 5 coordinates but 5 * 2 + 2.
Multiplied by two because 5 for X and 5 for Y and plus 2 because we have
two Z.
The whole thing kind of works because It reads the 5 coordinates for X
and Y from FIFO0 and FIFO1 and the last element in each FIFO is ignored
within the loop and read later.
Nothing guaranties that FIFO1 is ready by the time it is read. In fact I
could see that that FIFO1 reaturns for Y channels 8,9, 10, 12, 6 and for
Y channel 7 for Z. The problem is that channel 7 and channel 12 got
somehow mixed up.
The other Problem is that FIFO1 is also used by the IIO part leading to
wrong results if both (tsc & adc) are used.

The patch tries to clean up the whole thing a little:
- Remove the +1 and -1 in REG_STEPCONFIG, REG_STEPDELAY and its counter
part in the for loop. This is just confusing.

- Use only FIFO0 in TSC. The fifo has space for 64 entries so should be
fine.

- Read the whole FIFO in one function and check the channel.

- in case we dawdle around, make sure we only read a multiple of our
coordinate set. On the second interrupt we will cleanup the remaining
enties.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# 5f184e63 27-May-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

mfd: input: ti_am335x_tsc: rename device from tsc to TI-am335x-tsc

tsc is a very generic name. This patch adds a TI and HW prefix to it
less generic.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# b9194fdf 21-May-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

input: ti_am33x_tsc: remove platform_data support

This patch removes access to platform data mfd_tscadc_board because the
platform is DT only.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# 0396310b 23-Jan-2013 Patil, Rachna <rachna@ti.com>

input: ti_am33x_tsc: Add DT support

This patch adds DT support to touch driver. It also provides a binding
document which is used by the MFD and IIO part of the device.
This patch also renames steps_to_configure to coordinate_readouts
because the original name misleads the purpose of the variable.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# af9c2fe3 23-Jan-2013 Patil, Rachna <rachna@ti.com>

input: ti_am33x_tsc: remove unwanted fifo flush

When touchscreen and ADC are used together, this
unwanted fifo flush leads to loss of ADC data.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# bb76dc09 23-Jan-2013 Patil, Rachna <rachna@ti.com>

input: ti_am33x_tsc: Order of TSC wires, made configurable

The current driver expected touchscreen input
wires(XP,XN,YP,YN) to be connected in a particular order.
Making changes to accept this as platform data.

Sebastian reworked the original patch and removed a lot of the not
required pieces.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# abeccee4 23-Jan-2013 Patil, Rachna <rachna@ti.com>

input: ti_am33x_tsc: Step enable bits made configurable

Current code has hard coded value written to
step enable bits. Now the bits are updated based
on how many steps are needed to be configured got
from platform data.

The user needs to take care not to exceed
the count more than 16. While using ADC and TSC
one should take care to set this parameter correctly.

Sebastian added the common lock and moved the code, that manipulates the
steps, from into the mfd module.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# a9bce1b0 05-Jun-2013 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

mfd: input: iio: ti_am335x_adc: use one structure for ti_tscadc_dev

The mfd driver creates platform data for the child devices and it is the
ti_tscadc_dev struct. This struct is copied for the two devices.
The copy of the structure makes a common lock in this structure a little
less usefull. Therefore the platform data is not a pointer to the
structure and the same structure is used.
While doing the change I noticed that the suspend/resume code assumes
the wrong pointer for ti_tscadc_dev and this has been fixed as well.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>


# 12aa9357 05-May-2013 Sachin Kamat <sachin.kamat@linaro.org>

Input: ti_am335x_tsc - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 2b99bafa 15-Oct-2012 Patil, Rachna <rachna@ti.com>

input: TSC: ti_tsc: Convert TSC into a MFDevice

This patch converts touchscreen into a MFD client.
All the register definitions, clock initialization,
etc has been moved to MFD core driver.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 55c04de5 15-Oct-2012 Patil, Rachna <rachna@ti.com>

input: TSC: ti_tscadc: Rename the existing touchscreen driver

Make way for addition of MFD driver.
The existing touchsreen driver is a MFD client.
For better readability we rename the file to
indicate its functionality as only touchscreen.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>