Some input users such as Android or X require BTN_TOUCH events.
Implement EV_KEY:BTN_TOUCH and make sure that the release event
is not erroneous scheduled without a preceding valid touch.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
According to the AD7877 datasheet:
Each transfer operation is 16-bit. If multiple read/write operations are
to be performed, CS must be taken high after the end of each read/write
operation before another read/write operation can be performed by
taking CS low again.
Make sure CS toggles after each transfer in the message.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Make hp680_ts_init/exit() call cancel_delayed_work_sync() instead of
calling cancel_delayed_work() followed by flush_scheduled_work().
This is to prepare for the deprecation and removal of
flush_scheduled_work().
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Commit 9114337 introduces regulator operations in ads7846 touchscreen
driver. Among these operations, some are called while holding a
spinlock. On many platforms regulators reside on slow buses, such as
I2C/SPI and require sleep while accessing them.
The touchscreen itself is also a SPI device and currently relies on
asynchronous SPI access to avoid sleeping in interrupt context. Let's
switch to using threaded IRQ to be able to access SPI bus
synchronously (which simplifies driver a bit); it also allows safe
access to the regulators as well.
This has been tested on the ti_omap3530evm board:
1) using ts_lib after normal boot
2) using ts_lib after "#echo 1/0 > /sys/bus/spi/devices/spi0.1/disable"
3) using ts_lib after "#echo mem > /sys/power/state" and "wake up"
Also tested on pandora.
Based on original patch by Dmitry Torokhov.
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Jason Wang <jason77.wang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Without this the jitter on the touchscreen makes it hard to use for
most GUI toolkits.
Signed-off-by: James Ketrenos<jketreno@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Add logic to wm97xx_read_aux_adc() to retry reading the adc if the
sample failed. This could occur if the previous sample was still in
the return register or the sample timed-out. Also avoid a pathologic
failure mode by disabling the digitizer and returning -EBUSY after 5
retries.
Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Use platform_device_del() instead of platform_device_unregister() in error
handling path.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensoruce.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
It is forbidden to call input_free_device() after input_unregister_device().
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Once device is registered we should call input_unregister_device()
instead of input_free_device().
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
We call platform_get_drvdata() in tps6507x_ts_remove(),
thus we should call platform_set_drvdata() in tps6507x_ts_probe().
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Use input_free_device() to free devices that have not been registered.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The driver is in reasonable shape now so let's move it out of staging.
Acked-by: Alan Cox <alan@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch set introduces support for the LPC32xx touchscreen
controller driver. The LPC32xx touchscreen controller supports
automated event detection and X/Y data conversion for resistive
touchscreens.
Signed-off-by: Kevin Wells <wellsk40@gmail.com>
Signed-off-by: Durgesh Pattamatta <durgesh.pattamatta@nxp.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Some serial wacom devices support two-finger touch. Test for this during
init and parse the touch packets accordingly. Touch packets are
processed using Protocol B (MT Slots).
Note: there are several wacom versions that do touch but not two-finger
touch. These are not catered for here, touch events for these are simply
discarded.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Tablets that support touch input may report different sized packages,
depending on the touch sensor in the tablet. For now, discard the
packages until we report them as touch input proper.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The protocol used by the w8001 supports status fields for tip, side
switch and eraser as well as a RDY field for proximity.
The protocol has a double usage for the f2 bit in the packet. If set,
the data is either pen + side2 button or eraser. Assume eraser if the
device comes into proximity with the f2 bit set, otherwise trigger the
side2 button. If the device comes into proximity with the f2 bit and
that bit disappears afterwards, fake proximity out for the eraser and
proximity in for the pen.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
platform_get_irq_byname() can return negative results, it is not seen to
unsigned ts_irq. Make it signed.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-By: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This one adds a driver for STMPE touchscreen controllers.
This driver depends on the stmpexxx mfd core driver.
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
"ret" should be signed here or the error handling doesn't work.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Add support for the cy8ctmg110 capacitive touchscreen used on some
embedded devices.
(Some clean up by Alan Cox)
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
No need to take address, w90p910_ts is already a pointer.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This implements reset_resume() by splitting init into allocations
of private data structures and device initializations. Device
initializations are repeated upon reset_resume.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Tested-by: Petr Štetiar <ynezz@true.cz>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This implement USB autosuspend while the device is opened for
devices that do remote wakeup with a fallback to open/close for
those devices that don't. Devices that require the host to
constantly poll them are never autosuspended.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Tested-by: Petr Štetiar <ynezz@true.cz>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This implements basic support for suspend & resume.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Tested-by: Petr Štetiar <ynezz@true.cz>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The chip's full name is AT42QT602240 or ATMXT224. This is a capacitive
touchscreen supporting 10-contact multitouch and using I2C interface.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
ADS7845 is a controller for 5-wire touch screens and somewhat
different from 7846. It requires three serial communications to
accomplish one complete conversion. Unlike 7846 it doesn't allow
Z1-/Z2- position measurement.
The patch extends the ads7846 driver to also support ads7845.
The packet struct is extended to contain needed command and
conversion buffers. ads7846_rx() and ads7846_rx_val() now
differentiate between 7845 and 7846 case. ads7846_probe() is
modified to setup ads7845 specific command and conversion
messages and to switch ads7845 into power-down mode, since
this is needed to be prepared to respond to pendown interrupts.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Some input events users such as Android require BTN_TOUCH events.
Implement EV_KEY/BTN_TOUCH and make sure that the release event
is not erroneous scheduled without a preceding valid touch.
Avoid duplicated BTN_TOUCH events, even though input core filters
them.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The ad7879 driver is using the old bus method of only supporting one
at a time (I2C or SPI). So refactor it like the other input drivers
that support multiple busses simultaneously.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch adds support for the ET&T TC4UM 4-wire USB touchscreen
controller and tries to reuse the bits for TC5UH controller in kernel
already. Data interface is same.
Tested-by: Roger Pueyo Centelles <rogerpueyo@rogerpueyo.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
On some platforms, for example with GPIO interrupts on mpc5121,
it is not possible to configure falling edge interrupts.
Specifying irq trigger type in platform data structure
allows using ads7846 driver on such platforms.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Stanse found that tsc is dereferenced earlier than checked for being
NULL in tps6507x_ts_remove. Remove the test because there is no way
for tsc to be NULL there.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Let's perform be16_to_cpu() conversions once for each received packet,
and then use cached values. Makes code a little bit easier to follow.
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
With no word size given in the users platform data, a generic spi host
controller driver will assume a default word size of eight bit. This
causes transmission to be performed bytewise, which will fail on little
endian machines for sure. Failure on big endian depends on usage
of slave select to mark word boundaries.
Anyway, ad7877 is specified to work with 16 bit per word, so
unconditionally set the word size accordingly. Flag an error where 16
bit per word is not available.
Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Oliver Schneidewind <osw@emlix.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04d to fix the faulty drivers.
As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
This patch fixes the follwing warning introduced by commit
067fb2f648 ("Input: ads7846 - return error on
regulator_get() failure"):
drivers/input/touchscreen/ads7846.c: In function 'ads7846_probe':
drivers/input/touchscreen/ads7846.c:1167: warning: format '%ld' expects
type 'long int', but argument 4 has type 'int'
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1) Use msecs_to_jiffies() instead of calculating by hand.
2) Call cancel_delayed_work_sync() instead of cancel_delayed_work()
followed by a separate flush_workqueue().
3) Remove the "tsc->wq = 0;" Sparse complains about that because
tsc->wq is a pointer, not an int. It's not needed because we just
free the pointer anyway.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The S3C touchscreen driver is logging at LOG_INFO on every stylus up
event which spams the console needlessly. Reduce the priority of the
message to debug level for some peace and quiet.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The name of the Kconfig symbol for the ADC has changed as a result of
application to more SoCs but the select statement has not been updated,
causing linker failures as the ADC core has not been built.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Add touch screen input driver for TPS6507x family of multi-function
chips. Uses the TPS6507x MFD driver. No interrupt support due to
testing limitations of current hardware.
Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: usbtouchscreen - support bigger iNexio touchscreens
Input: ads7846 - return error on regulator_get() failure
Input: twl4030-vibra - correct the power down sequence
Input: enable onkey driver of max8925
Input: use ABS_CNT rather than (ABS_MAX + 1)
Bigger Nexio touchscreens not only send more data but also the header
values are modified somewhat. Fix the header (it's a guesswork but
it works at least on one 46" touchscreen with 2.00SMS firmware) and
also increase rept_size.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
In probe(), if regulator_get() failed, an error code was not being
returned causing the driver to be successfully bound, even though
probe failed. This in turn caused the suspend, resume and remove
methods to be registered and accessed via the SPI core. Since these
functions all access private driver data using pointers that had been
freed during the failed probe, this would lead to unpredictable
behavior.
This patch ensures that probe() returns an error code in this failure
case so the driver is not bound.
Found using lockdep and noticing the lock used in the suspend/resum
path pointed to a bogus lock due to the freed memory.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
For more clearance what the functions actually do,
usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()
They should only be used in code which really needs DMA coherency.
All call sites have been changed accordingly, except for staging
drivers.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (224 commits)
ARM: remove 'select GENERIC_TIME'
ARM: 6136/1: ARCH_REQUIRE_GPIOLIB selects GENERIC_GPIO
ARM: 6074/1: oprofile: convert from sysdev to platform device
ARM: 6073/1: oprofile: remove old files and update KConfig
ARM: 6072/1: oprofile: use perf-events framework as backend
ARM: 6071/1: perf-events: allow modules to query the number of hardware counters
ARM: 6070/1: perf-events: add support for xscale PMUs
ARM: 6069/1: perf-events: use numeric ID to identify PMU
ARM: 6064/1: pmu: register IRQs at runtime
ARM: Optionally allow ARMv6 to use 'normal, bufferable' memory for DMA
ARM: 6134/1: Handle instruction cache maintenance fault properly
ARM: nwfpe: allow debugging output to be configured at runtime
ARM: rename mach_cpu_disable() to platform_cpu_disable()
ARM: 6132/1: PL330: Add common core driver
ARM: 6094/1: Extend cache-l2x0 to support the 16-way PL310
ARM: Move memory mapping into mmu.c
ARM: Ensure meminfo is sorted prior to sanity_check_meminfo
ARM: Remove useless linux/bootmem.h includes
ARM: convert /proc/cpu/aligment to seq_file
arm: use asm-generic/scatterlist.h
...
Use kmemdup when some other buffer is immediately copied into the
allocated region.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Make the driver depend on either ARCH_S3C2410 (as legacy) or the new
device selection of SAMSUNG_DEV_TS.
Change the menuconfig name to reflect this driver is now handling more
devices that just the s3c2410.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
This patch adds a feature bit field in the touchscreen driver for Samsung SoCs.
Which can be used to distinguish the TSADC module features.
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[ben-linux@fluff.org: minor fix to title]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
This patch implements generic GPIO configuration function in Samsung
touchscreen driver. And makes the touchscreen driver s3c24xx-ts.c
generic to all the Samsung SoCs.
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
[ben-linux@fluff.org: fixed title ]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
This moves mach-s3c2410/include/mach/ts.h to plat-samsung/include/plat/ts.h in
order to prepare for s3c64xx support in the touchscreen driver.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ad7877 - keep dma rx buffers in seperate cache lines
Input: psmouse - reset all types of mice before reconnecting
Input: elantech - use all 3 bytes when checking version
Input: iforce - fix Guillemot Jet Leader 3D entry
Input: iforce - add Guillemot Jet Leader Force Feedback
With dma based spi transmission, data corruption is observed
occasionally. With dma buffers located right next to msg and
xfer fields, cache lines correctly flushed in preparation for
dma usage may be polluted again when writing to fields in the
same cache line.
Make sure cache fields used with dma do not share cache lines
with fields changed during dma handling. As both fields are part
of a struct that is allocated via kzalloc, thus cache aligned,
moving the fields to the 1st position and insert padding for
alignment does the job.
Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Oliver Schneidewind <osw@emlix.com>
Signed-off-by: Johannes Weiner <jw@emlix.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
[dtor@mail.ru - changed to use ___cacheline_aligned as suggested
by akpm]
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The corgi touchscreen is now deprecated in favour of the generic ads7846.c
driver. The noise reduction technique used in corgi_ts.c, which is to wait
till vsync before ADC sampling, is also integrated into ads7846 driver now.
Provided that the original driver is not generic and is difficult to maintain,
it will be removed now.
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: joydev - allow binding to button-only devices
Input: elantech - ignore high bits in the position coordinates
Input: elantech - allow forcing Elantech protocol
Input: elantech - fix firmware version check
Input: ati_remote - add some missing devices from lirc_atiusb
Input: eeti_ts - cancel pending work when going to suspend
Input: Add support of Synaptics Clickpad device
Revert "Input: ALPS - add signature for HP Pavilion dm3 laptops"
Input: psmouse - ignore parity error for basic protocols
This fixes a race between the suspend code and input events.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Adds support for Hampshire TSHARC serial touchscreens. Implements
Hampshire's 4-byte communication protocol.
Signed-off-by: Adam Bennett <abennett72@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Do not leave dangling client data pointers when unbinding device from the
driver.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The corgi touchscreen is now deprecated in favour of the generic ads7846.c
driver. The noise reduction technique used in corgi_ts.c, which is to wait
till vsync before ADC sampling, is also integrated into ads7846 driver now.
Provided that the original driver is not generic and is difficult to maintain,
it will be removed now.
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Add wakeup support to the ads7846 driver. Platforms can enable wakeup
capability by setting the wakeup flag in ads7846_platform_data. With this
patch the ads7846 driver can be used to wake the system from suspend.
Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The time interval between consecutive interrupts depends on a number of
tunables: first_conversion_delay, acquisition_time, averaging and foremost
the pen_down_acc_interval.
Since the mod_timer() action for the PEN UP event happens in the
spi_async() callback function, latencies incurred by the spi bus drivers
also need to be taken into account.
So all in all, give the PEN UP event a bit more wiggle room and increase
timeout to 100ms.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The AD7873 is almost identical to the ADS7846; the only difference is
related to the Power Management bits PD0 and PD1. This results in a
slightly different PENIRQ enable behavior. For the AD7873, VREF should
be turned off during differential measurements.
So, add the AD7873/43 to the list of driver supported devices, and prevent
VREF usage during differential/ratiometric conversion modes.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Use genirq to simplify IRQ handling in 88pm860x. Remove the interface of
mask/free IRQs on 88pm860x. All these work is taken by genirq. Update the
touchscreen driver of 88pm860x since IRQ handling is changed.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Enable touchscreen driver for the 88pm860x multi function core.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
The ADS7846/TSC2046 touchscreen controllers can (and usually are)
connected to various regulators for power, so add regulator support.
Valid regulator will now be required, so boards without complete
regulator setup should either disable regulator framework or enable
CONFIG_REGULATOR_DUMMY.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Generaltouch protocol allows for coordinates in [0, 0xffff] range and
there are devices reporting coordinates as high as 0x7fff so let's update
the driver to reflect that.
Signed-off-by: Roy Yin <yhch@generaltouch.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Currently driver reports touches when it gets (1 << ts.shift) samples,
even if stylus is up, which is incorrect. We should only report coordinates
and touch condition when stylus is down.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Fix urb leak in error path of initialization and make sure we handle
errors from initial usb_submit_urb().
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Find input enpoint automatically instead of assuming that the first one is
OK. This is needed for devices with multiple endpoints such as iNexio
where the first endpoint might be output.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Convert usbtouchscreen from storing usb_device to usb_interface. This is
needed for multi-interface touchscreen devices such as iNexio.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Drop the simple fancy sysfs hooks for the aux GPIOs and expose these via
the gpiolib interface so that other drivers can use them.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The id_table field of the struct usb_device_id is constant in <linux/usb.h>
so it makes sense to mark the initialization data also constant.
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The id_table field of the struct i2c_driver is defined as constant
in <linux/i2c.h> so it makes sense to mark the initialization data also
constant.
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (22 commits)
Input: ALPS - add interleaved protocol support (Dell E6x00 series)
Input: keyboard - don't override beep with a bell
Input: altera_ps2 - fix test of unsigned in altera_ps2_probe()
Input: add mc13783 touchscreen driver
Input: ep93xx_keypad - update driver to new core support
Input: wacom - separate pen from express keys on Graphire
Input: wacom - add defines for data packet report IDs
Input: wacom - add support for new LCD tablets
Input: wacom - add defines for packet lengths of various devices
Input: wacom - ensure the device is initialized properly upon resume
Input: at32psif - do not sleep in atomic context
Input: i8042 - add Gigabyte M1022M to the noloop list
Input: i8042 - allow installing platform filters for incoming data
Input: i8042 - fix locking in interrupt routine
Input: ALPS - do not set REL_X/REL_Y capabilities on the touchpad
Input: document use of input_event() function
Input: sa1111ps2 - annotate probe() and remove() methods
Input: ambakmi - annotate probe() and remove() methods
Input: gscps2 - fix probe() and remove() annotations
Input: altera_ps2 - add annotations to probe and remove methods
...
This driver provides support for the touchscreen interface
integrated into the Freescale MC13783.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (51 commits)
Input: appletouch - give up maintainership
Input: dm355evm_kbd - switch to using sparse keymap library
Input: wistron_btns - switch to using sparse keymap library
Input: add generic support for sparse keymaps
Input: fix memory leak in force feedback core
Input: wistron - remove identification strings from DMI table
Input: psmouse - remove identification strings from DMI tables
Input: atkbd - remove identification strings from DMI table
Input: i8042 - remove identification strings from DMI tables
DMI: allow omitting ident strings in DMI tables
Input: psmouse - do not carry DMI data around
Input: matrix-keypad - switch to using dev_pm_ops
Input: keyboard - fix lack of locking when traversing handler->h_list
Input: gpio_keys - scan gpio state at probe and resume time
Input: keyboard - add locking around event handling
Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
Input: xpad - add two new Xbox 360 devices
Input: polled device - do not start polling if interval is zero
Input: polled device - schedule first poll immediately
Input: add S3C24XX touchscreen driver
...
This patch adds support for the ET&T TC5UH 5-wire USB touchscreen controller.
More info at http://www.etandt.com.tw/board_solution.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
S3C24XX touchscreen driver, originally written by Arnaud Patard and
other contributors. The driver has had substantial testing as well as
a number of tidying up passes done by Ben Dooks, as noted:
- added kernel-doc comments to most of the routines
- removed old code from pre adc framework days
- updated device probe code to use platform id list matching
- cleaned up debug, since printk() now has timestamp feature
- ensure code uses dev_() reporting macros where necessary
- remove ABS_PRESSURE reporting, tslib can be fixed
- ensure timer is removed on driver exit
- move to using dev_pmops for power management
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Zytronic USB-attached capacitive touchscreen support within the generic
USB touchscreen driver.
Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk>
Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
On Zaurus, hx4700 and others pressure is reported inverted -- the lighter
the pressure, the bigger numerical value.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
usb_kill_urb() in disconnect is not needed as unregistering will cause
close() to be called.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
New at91sam9g45ekes board provides a LCD with resistive touchscreen.
This is the support of this feature by atmel_tsadcc driver. This also
sets up platform parameters to be passed to the driver.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Add a number of plafrom dependent parameters to atmel_tsadcc. The
touchscreeen driver can now take into account the slight differences
that exist between IPs included in diferent products. This will also
allow to adapt its behaivior to the caracteristics of the resistive
panel used.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Tiny patch for setting capabilities using input API function.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch allows UCB1400 to get IRQ GPIO from platform data. In case
platform_data are not supplied or the IRQ supplied in the platform_data
is negative, fall back to the old IRQ detection algorithm.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This is a driver for Dynapro serial touchscreen, which used to be
supported in Xorg. The driver needs updated inputattach utility to
initialize serial port and create proper serio device before the
driver will be bound to it.
Signed-off-by: Tias Guns <tias@ulyssis.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
If the sub-probe functions fail, we need to pass up the error code to the
higher levels from the probe function. We currently always return 0 even
if there was an error so higher levels don't report problems.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* git://git.infradead.org/battery-2.6:
power_supply: Add driver for the PMU on WM831x PMICs
ds2760_battery: Fix integer overflow for time_to_empty_now
wm97xx_battery: Convert to dev_pm_ops
wm97xx_battery: Use irq to detect charger state
wm97xx_battery: Use platform_data
wm97xx-core: Pass platform_data to battery
ds2760_battery: implement set_charged() feature
power_supply: get_by_name and set_charged functionality
power_supply: EXPORT_SYMBOL cleanups
ds2760_battery: add current_accum module parameter
ds2760_battery: handle full_active_uAh == 0 case correctly
ds2760_battery: add rated_capacity module parameter
ds2760_battery: export more features
ds2760_battery: delay power supply registration
wm8350_power: Implement charge type property
power_supply: Add a charge_type property, and use it for olpc driver
olpc_battery: Add an 'error' sysfs device that displays raw errors
Revert "power: remove POWER_SUPPLY_PROP_CAPACITY_LEVEL"
This makes it consistent with other buses (platform, i2c, vio, ...). I'm
not sure why we use the prefixes, but there must be a reason.
This was easy enough to do it, and I did it.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Samuel Ortiz <sameo@openedhand.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Acked-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The MELPAS MCS-5000 is the touchscreen controller. The overview of this
controller can see at the following website:
http://www.melfas.com/product/product01.asp?k_r=eng_
This driver is tested on s3c6410 NCP board and supports only the i2c
interface.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The AD7889 is a new part but 100% software compatible with the AD7879, so
add it to the id_table and help text.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Touchscreen driver for the PCAP2 multi function device used in
Motorola EZX smartphones.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (52 commits)
Input: bcm5974 - silence uninitialized variables warnings
Input: wistron_btns - add keymap for AOpen 1557
Input: psmouse - use boolean type
Input: i8042 - use platform_driver_probe
Input: i8042 - use boolean type where it makes sense
Input: i8042 - try disabling and re-enabling AUX port at close
Input: pxa27x_keypad - allow modifying keymap from userspace
Input: sunkbd - fix formatting
Input: i8042 - bypass AUX IRQ delivery test on laptops
Input: wacom_w8001 - simplify querying logic
Input: atkbd - allow setting force-release bitmap via sysfs
Input: w90p910_keypad - move a dereference below a NULL test
Input: add twl4030_keypad driver
Input: matrix-keypad - add function to build device keymap
Input: tosakbd - fix cleaning up KEY_STROBEs after error
Input: joydev - validate axis/button maps before clobbering current ones
Input: xpad - add USB ID for the drumkit controller from Rock Band
Input: w90p910_keypad - rename driver name to match platform
Input: add new driver for Sentelic Finger Sensing Pad
Input: psmouse - allow defining read-only attributes
...
There is no need for locking when we send query and start commands
to the touchscreen since there is no concurrency.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Add the cpu.c and dev.c and modify w90p910 platform
to apply to use the common API(provided by cpu.c and dev.c)
at the same time, I renamed all w90x900 to nuc900 in every
c file of w90x900 platform and touchscreen's driver name.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Sometimes, when using the touchscreen, it stops working till next restart
and the following message is printed:
ucb1400: unexpected IE_STATUS = 0x0
The following patch retriggers the touchscreen interrupt unconditionally.
This prevents hanging of the touchscreen in case of bogus interrupt
occurence.
Signed-off-by: Pavel Revak <palo@bielyvlk.sk>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch enables ADC filtering on UCB1400 codec by default. The
benefit from this change is mostly on some Colibri boards where
the ADCSYNC pin of the UCB1400 codec isn't connected causing the
touchscreen to jitter very badly. This change has no visible
effect on boards where the ADCSYNC pin is connected.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Palo Revak <palo@bielyvlk.sk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This adds a struct eeti_ts_platform_data which currently holds only one
value to specify the interrupt polarity.
The driver has a fallback if no platform data is passed in via the
i2c_board_info, so no regression is caused.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Check the result when sending the power down command to the controller.
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
In cases when get_pendown_state callback is not available have
the driver to fallback on pressure calculation to determine if
the pen is up.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch adds support for the e2i touchscreen controller used in the
Mimo 740 (and probably in other e2i touchscreen products). Tested on
Mimo 740.
Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Don't read coordinates during probe of the driver, just power down
the controller and wait for interrupts.
Signed-off-by: Richard Röjfors<richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Make init_platform_hw and exit_platform_hw callbacks optional since
they are not needed on all platforms.
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Properly shut off interrupts/delayed work by free-ing IRQ first
and then ensuring that enable/disable is balanced. Also add
__devinit/__devexit markings, restore poll delay/period scheduling
logic, make sure we call exit_platform_hw() method when probe
fails.
Tested-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Since it's not allowed to do synchronous I2C in the HR timer callback
context we have to switch to using the global workqueue. The work is
scheduled every 1ms when polling rather than 5 us.
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch allows tweaking the behaviour of GPIO_STATUS register
shift quirk that's in wm97xx-core. The problem with GPIO_STATUS
register being shifted by one doesn't appear on all hardware it
seems and causes problems with accelerated touchscreen drivers on
Palm hardware. Therefore an accelerated touchscreen driver can select
if the shift is/isn't happening on the hardware.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch refactors the Mainstone accelerated touch code a little and
adds support for interrupt driven touchscreen on Palm LifeDrive, TX and
Tungsten T5.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Now that clk API is available on ARM we can use it in the driver.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The driver for UCB1400 touchscreen controllers contains a function named
ucb1400_ts_pen_down(), but it returns 0 if the pen is down and 1 if it's up.
This causes confusion, especially since it's used as a boolean truth value
later in the code. This patch renames it.
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Add support for the JASTEC/DigiTech DTR-02U USB touch screen
controllers.
Signed-off-by: Jim Persson <jim-linux@nurd.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Use the function resource_size, which reduces the chance of
introducing off-by-one errors in calculating the resource size.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
struct resource *res;
@@
- (res->end - res->start) + 1
+ resource_size(res)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Some SoCs support only pin change interrupts on GPIO pins used as irq
lines.
The ads7846 core is not affected from the additional irqs on the rising
edge because the code accounts touch bounce anyway by kicking in a timer
and disabling the irq after the first request and reenabling the irq after
a timeout when there is no longer pen down detected.
Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The touchscreen works in two modes, wait trigger mode and auto-semi
mode. The device starts in wait trigger mode and waits until pressure
is detected, then device sets WT_INT bit and raises an interrupt.
The driver should put the device into auto-semi mode and prepare for
reading first X and then Y coordinates. When coordinate data is ready
the driver sets ADC_INT bit and raises interrupt again.
[dtor@mail.ru: various cleanups]
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
platform_data != driver_data
driver data is actually the "correct" place of the struct however it is
not placed there due to the need of the ac97 struct. This is broken since
d9105c2b01 aka "[ARM] 5184/1: Split ucb1400_ts into core and touchscreen"
Signed-off-by: Manuel Traut <manut@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch adds a driver for EETI's I2C connected touchscreens.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Tested-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The platform codes must provide get_pendown_state() for the driver
to work properly.
Signed-off-by: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Now that hrtimers are always running in hard irq context we can't
unconditionally enable interrupts at the end of the timer function.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch adds an accelerated driver for Atmel AVR32 AT32AP700X
microprocessors. It uses interrupts on the channel B in the AC97
controller. Thus, offloading the work queue in the wm97xx-ts driver.
The driver has been tested with Atmel AVR32 AT32AP7000 and Wolfson
WM9712 codec.
The driver can also be easily modified to support Atmel AT91 devices, as
AT91 and AVR32 share the same AC97C module.
[Fixed leak of atmel_wm97xx when probe fails. -- broonie]
[dtor@mail.ru: do not report ABS_PRESSURE events when not measuring pressure]
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
disable_irq() waits for all running handlers to complete before
returning. As such, if it's used to disable an interrupt from
that interrupt's handler it will deadlock. This replaces the
dangerous instances with the _nosync() variant which doesn't have
this problem.
Signed-off-by: Ben Nizette <bn@niasdigital.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
disable_irq() waits for all running handlers to complete before
returning. As such, if it's used to disable an interrupt from
that interrupt's handler it will deadlock. This replaces the
dangerous instances with the _nosync() variant which doesn't have
this problem.
Signed-off-by: Ben Nizette <bn@niasdigital.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The use of disable_irq inside the handler for the interrupt being
disabled has always been dangerous. disable_irq should wait for that
handler to complete before returning -> deadlock.
For some reason this wasn't actually the case until 3aa551c9b was merged
but since this time, the ads7846 driver has deadlocked the system on
first interrupt.
Convert the driver to use the handler-safe _nosync variant.
Signed-off-by: Ben Nizette <bn@niasdigital.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The loop body was never executed, because the condition is
always false. Convert to for with more obvious condition.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch removes depreciated IRQF_SAMPLE_RANDOM flags from
ad7877 and ad7879 touchscreen drivers.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
PEN_{UP/DOWN} events are expected to be available soon after stopping
TSI auto measurement, but this is found not always be true. Work around
this by adding delay and simulating such an event (according to pen down
status bit).
Signed-off-by: Bin Yang <bin.yang@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Bin did a lot of work on this driver, without his help, this driver
will not be possible.
Signed-off-by: Bin Yang <bin.yang@marvell.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The input core will add entropy to the pool so this flag is not
needed.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Noises can be introduced when LCD signals are being driven, some platforms
provide a signal to assist the synchronization of this sampling procedure.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits)
sh: sh7785lcr: Map whole PCI address space.
sh: Fix up DSP context save/restore.
sh: Fix up number of on-chip DMA channels on SH7091.
sh: update defconfigs.
sh: Kill off broken direct-mapped cache mode.
sh: Wire up ARCH_HAS_DEFAULT_IDLE for cpuidle.
sh: Add a command line option for disabling I/O trapping.
sh: Select ARCH_HIBERNATION_POSSIBLE.
sh: migor: Fix up CEU use flags.
input: migor_ts: add wakeup support
rtc: rtc-sh: use set_irq_wake()
input: sh_keysc: use enable/disable_irq_wake()
sh: intc: set_irq_wake() support
sh: intc: install enable, disable and shutdown callbacks
clocksource: sh_cmt: use remove_irq() and remove clockevent workaround
sh: ap325 and Migo-R use new sh_mobile_ceu_info flags
sh: Fix up -Wformat-security whining.
sh: ap325rxa: Add ov772x support, again.
sh: Sanitize asm/mmu.h for assembly use.
sh: Tidy up sh7786 pinmux table.
...
Add wakeup support to the migor_ts driver. If user space has enabled
wakeup, use set_irq_wake() during suspend and resume. With this patch
the migor_ts driver can be used to wake the system from suspend.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
A few comments say "Celcius"; this fixes them. No code changes.
Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
[randy.dunlap@oracle.com: don't use bus_id]
[dtor@mail.ru: locking and other fixups]
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The remaining registers are separated into:
- <mach/regs-ost.h>
- <mach/regs-rtc.h>
- <mach/regs-intc.h>
and then we can remove pxa-regs.h completely. Instead of #include this
file, let's:
1. include the specific <mach/regs-*.h> with care (if that's absolutely
necessary)
2. define the registers in the driver, make cleanly defined API to expose
the register access to external with sufficient reason
Signed-off-by: Eric Miao <eric.miao@marvell.com>
This patch implements accelerated touchscreen support for the Marvell
Zylonite development platform, supporting pen down interrupts and
continuous mode data transfers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Add BTN_TOUCH event reporting to ucb1400_ts and accelerated mainstone-wm97xx
touchscreen drivers. Together with previously posted similar patch for
wm97xx-core this will make all touchscreen drivers behave consistently wrt.
BTN_TOUCH.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This should make no practical difference since the Mainstone can't be
SMP but it is more correct.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Android expects BTN_TOUCH events when pen state changes. Add BTN_TOUCH
event reporting to allow use of wm97xx touchscreen controller wiht
Android devices.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: elantech - touchpad driver miss-recognising logitech mice
Input: synaptics - ensure we reset the device on resume
Input: usbtouchscreen - fix eGalax HID ignoring
Input: ambakmi - fix timeout handling in amba_kmi_write()
Input: pxa930_trkball - fix write timeout handling
Input: struct device - replace bus_id with dev_name(), dev_set_name()
Input: bf54x-keys - fix debounce time validation
Input: spitzkbd - mark probe function as __devinit
Input: omap-keypad - mark probe function as __devinit
Input: corgi_ts - mark probe function as __devinit
Input: corgikbd - mark probe function as __devinit
Input: uvc - the button on the camera is KEY_CAMERA
Input: psmouse - make MOUSE_PS2_LIFEBOOK depend on X86
Input: atkbd - make forced_release_keys[] static
Input: usbtouchscreen - allow reporting calibrated data
Commit ec42d4481e broke usbtouchscreen for
some eGalax/EETI devices that claim to be HID, but are not.
Devices confirmed to be real HID have the class set to HID and the protocol
set to 'mouse'. Some have HID class but protocol set to 'none'. Those are
not HID and should be driven by usbtouchscreen.
Fix the device ignoring macro by adding match for the protocol too.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
A pointer to corgits_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
[dtor@mail.ru: fixed some more section markups]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This patch adds a module parameter to report either the raw
coordinate data or the hardware-calibrated coordinate data for
MicroTouch/3M touchscreens. The default is set to the raw
coordinates for backwards compatibilty.
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Missing an include and thus breaks the x86-64 build.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (29 commits)
Input: i8042 - add Dell Vostro 1510 to nomux list
Input: gtco - use USB endpoint API
Input: add support for Maple controller as a joystick
Input: atkbd - broaden the Dell DMI signatures
Input: HIL drivers - add MODULE_ALIAS()
Input: map_to_7segment.h - convert to __inline__ for userspace
Input: add support for enhanced rotary controller on pxa930 and pxa935
Input: add support for trackball on pxa930 and pxa935
Input: add da9034 touchscreen support
Input: ads7846 - strict_strtoul takes unsigned long
Input: make some variables and functions static
Input: add tsc2007 based touchscreen driver
Input: psmouse - add module parameters to control OLPC touchpad delays
Input: i8042 - add Gigabyte M912 netbook to noloop exception table
Input: atkbd - Samsung NC10 key repeat fix
Input: atkbd - add keyboard quirk for HP Pavilion ZV6100 laptop
Input: libps2 - handle 0xfc responses from devices
Input: add support for Wacom W8001 penabled serial touchscreen
Input: synaptics - report multi-taps only if supported by the device
Input: add joystick driver for Walkera WK-0701 RC transmitter
...
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (407 commits)
[ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices
[ARM] pxafb: cleanup of the timing checking code
[ARM] pxafb: cleanup of the color format manipulation code
[ARM] pxafb: add palette format support for LCCR4_PAL_FOR_3
[ARM] pxafb: add support for FBIOPAN_DISPLAY by dma braching
[ARM] pxafb: allow pxafb_set_par() to start from arbitrary yoffset
[ARM] pxafb: allow video memory size to be configurable
[ARM] pxa: add document on the MFP design and how to use it
[ARM] sa1100_wdt: don't assume CLOCK_TICK_RATE to be a constant
[ARM] rtc-sa1100: don't assume CLOCK_TICK_RATE to be a constant
[ARM] pxa/tavorevb: update board support (smartpanel LCD + keypad)
[ARM] pxa: Update eseries defconfig
[ARM] 5352/1: add w90p910-plat config file
[ARM] s3c: S3C options should depend on PLAT_S3C
[ARM] mv78xx0: implement GPIO and GPIO interrupt support
[ARM] Kirkwood: implement GPIO and GPIO interrupt support
[ARM] Orion: share GPIO IRQ handling code
[ARM] Orion: share GPIO handling code
[ARM] s3c: define __io using the typesafe version
[ARM] S3C64XX: Ensure CPU_V6 is selected
...
Add support for the built-in touchscreen controller in DA9034
(aka Micco), usually found on platforms with xscale processors.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This drive has been tested on ARM9 based SoC - MV86XX.
Signed-off-by: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The optimal change would be to move the AC97 register definitions into
the AC97 driver, unfortunately, the registers are shared between several
files. Move them into a dedicated regs-ac97.h first.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: wacom - add support for new USB Tablet PCs
Input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback
Input: i8042 - add Compal Hel80 laptop to nomux blacklist
Input: cm109 - add keymap for ATCom AU-100 phone
Input: fix the example of an input device driver
Input: psmouse - fix incorrect validate_byte check in OLPC protocol
Input: atkbd - cancel delayed work before freeing its structure
Input: atkbd - add keymap quirk for Inventec Symphony systems
Input: i8042 - add Dell XPS M1530 to nomux list
Input: elo - fix format string in elo driver