This simplifies error handling path and allows us get rid of
tsc2007_remove().
Tested-by: Denis Carikli <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The driver does not use poll_delay parameter, so let's remove it.
Tested-by: Denis Carikli <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Acked-by: Mark Brown <[email protected]>
Acked-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Acked-by: Russell King <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This patch converts the drivers in drivers/input/* to use the
module_i2c_driver() macro which makes the code smaller and a bit
simpler.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Abort driver initialization if X plate resistance was not specified in
platform data as it will cause pressure to be always calculated as 0,
and making userspace ignore touch coordinates.
Signed-off-by: Philip Rakity <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This will ensure that the device delivers input events only when there
are users.
Tested-by: Thierry Reding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Instead of using hard IRQ and workqueue solution switch to using threaded
interrupt handler to simplify the code and locking rules.
Tested-by: Thierry Reding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
These new platform-specific values can be used to set the fuzz parameter
passed to the input_set_abs_params() function for the ABS_X, ABS_Y and
ABS_PRESSURE axes.
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This new parameter allows the polling frequency to be configured while
keeping the default of once every millisecond.
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Depending on the quality of the touch panel, the time for the X-, X+, Y-
and Y+ inputs to settle may vary. The poll_delay parameter can be used
to override the default of 1 millisecond.
Cc: Dmitry Torokhov <[email protected]>
Cc: Kwangwoo Lee <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Finger touch events or very quick stylus events on low-quality panels
can cause the tsc2007 to read bogus values. Looking at oscilloscope
snapshots, this seems to be caused by the touch event disappearing
during the measurements. These bogus values result in misclicks, where
the X and Y values deviate from the real position.
Most of these misclicks can be filtered out by setting a low enough
threshold for the maximum resistance (which is loosely the inverse of
the pressure) allowed to consider a set of values valid. Since this
behaviour is largely dependent on the type and quality of the panel,
this commit introduces the max_rt parameter. The default value is kept
at MAX_12BIT.
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
When the controller signals a pen-down event via the platform-specific
GPIO, while the sample values indicate an invalid measurement, the
measurement needs to be repeated.
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Acked-by: Mark Brown <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Richard Purdie <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Do not leave dangling client data pointers when unbinding device from the
driver.
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Check the result when sending the power down command to the controller.
Signed-off-by: Richard Röjfors <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Don't read coordinates during probe of the driver, just power down
the controller and wait for interrupts.
Signed-off-by: Richard Röjfors<[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Make init_platform_hw and exit_platform_hw callbacks optional since
they are not needed on all platforms.
Signed-off-by: Richard Röjfors <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The platform codes must provide get_pendown_state() for the driver
to work properly.
Signed-off-by: Kwangwoo Lee <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Kwangwoo Lee <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>