Not all penabled devices support touch. The same holds true for touch
devices, so we should be setting up devices according to the results
returned when we query the hardware.
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The drivers using the type B protocol all report tracking information
the same way. The contact id is semantically equivalent to
ABS_MT_SLOT, and the handling of ABS_MT_TRACKING_ID only complicates
the driver. The situation can be improved upon by providing a common
pointer emulation code, thereby removing the need for the tracking id
in the driver. This patch moves all tracking event handling over to
the input core, simplifying both the existing drivers and the ones
currently in preparation.
Acked-by: Ping Cheng <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
The MT slots devices all follow the same initialization pattern
of creating slots and hinting about buffer size. Let drivers call
an initialization function instead, and make sure it can be called
repeatedly without side effects.
Signed-off-by: Henrik Rydberg <[email protected]>
In preparation for common code to handle a larger set of MT slots
devices, move the slots handling over to a separate file.
Signed-off-by: Henrik Rydberg <[email protected]>
This patch introduces support for Sitronix ST1232 integrated capacitive
touchscreen with LCD module. The touchscreen is multitouch capable and
can report coordinates of up to two contact points.
Signed-off-by: Tony SIM <[email protected]>
Reviewed-by: Trilok Soni <[email protected]>
Acked-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
I've recently got my hands on a LG Flatron T1710B touchscreen.
As other LG products, this seems to use the ITM panel.
Signed-off-by: Glenn Sommer <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The kcalloc call for the object table is using sizeof(struct qt602240_data)
when it should be using sizeof(struct qt6602240_object), resulting in a larger
allocation than is required.
Signed-off-by: Chris Leech <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: appletouch - remove extra KERN_DEBUG use from dprintk
Input: bu21013_ts - fix null dereference in error handling
Input: ad7879 - prevent invalid finger data reports
bu21013_data could be NULL so better not reference it.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Considering following scenario - the touch is present on the screen
at the beginning of the last conversion sequence, but by the time
the last sequence is finished, the finger is lift off. The AD7879 data
available interrupt signals (DAV) completion, however some X,Y values
are not valid because the screen inputs were floating during the
acquisition.
The AD7877 acts differently here, since it only asserts DAV if the
touch is still present when the conversion sequence finished.
Based on the fact that this can only happen in the last sample of the
repeated conversion sequence, we simply skip the last (short glitches
are filtered by the AD7879 internal median and average filters).
This doesn't cause noticeable side effects, since the minimum conversion
interval is 9.44ms. We receive ~100 waypoint samples per second, so we
simply delay the result by 9.44ms.
We also reject samples where pressure is greater than pressure_max.
Signed-off-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (50 commits)
davinci: fix remaining board support after io_pgoffst removal
davinci: mityomapl138: make file local data static
arm/davinci: remove duplicated include
davinci: Initial support for Omapl138-Hawkboard
davinci: MityDSP-L138/MityARM-1808 read MAC address from I2C Prom
davinci: add tnetv107x touchscreen platform device
input: add driver for tnetv107x touchscreen controller
davinci: add keypad config for tnetv107x evm board
davinci: add tnetv107x keypad platform device
input: add driver for tnetv107x on-chip keypad controller
net: davinci_emac: cleanup unused cpdma code
net: davinci_emac: switch to new cpdma layer
net: davinci_emac: separate out cpdma code
net: davinci_emac: cleanup unused mdio emac code
omap: cleanup unused davinci mdio arch code
davinci: cleanup mdio arch code and switch to phy_id
net: davinci_emac: switch to new mdio
omap: add mdio platform devices
davinci: add mdio platform devices
net: davinci_emac: separate out davinci mdio
...
Fix up trivial conflict in drivers/input/keyboard/Kconfig (two entries
added next to each other - one from the davinci merge, one from the
input merge)
Instead of using asynchronous SPI API and then spinning waiting for SPI
transfer to complete when disabling the device, let's use threaded IRQ
model and spi_sync().
Acked-by: Michael Hennerich <[email protected]>
Tested-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Instead of manually creating one set of attributes or another set up
is_visible method in attribute group structure to control whether
aux3 or gpio3 attribute is presented to userspace.
Acked-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Suppress events where pressure > pressure_max.
These events come typically along with inaccurate X and Y samples.
Signed-off-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Without this the jitter on the touchscreen makes it hard to use for
most GUI toolkits.
Signed-off-by: James Ketrenos<[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
It is forbidden to call input_free_device() after input_unregister_device().
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Once device is registered we should call input_unregister_device()
instead of input_free_device().
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Use input_free_device() to free devices that have not been registered.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The driver is in reasonable shape now so let's move it out of staging.
Acked-by: Alan Cox <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Durgesh Pattamatta <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Acked-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
platform_get_irq_byname() can return negative results, it is not seen to
unsigned ts_irq. Make it signed.
Signed-off-by: Kulikov Vasiliy <[email protected]>
Acked-By: Luotao Fu <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This one adds a driver for STMPE touchscreen controllers.
This driver depends on the stmpexxx mfd core driver.
Signed-off-by: Luotao Fu <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Add support for the cy8ctmg110 capacitive touchscreen used on some
embedded devices.
(Some clean up by Alan Cox)
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>