aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/wm97xx-core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-03-31Fix common misspellingsLucas De Marchi1-2/+2
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-09-05Input: wm97xx-core - add retries to wm97xx_read_aux_adcEric Millbrandt1-2/+13
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>
2010-09-05Input: wm97xx-core - simplify error path in wm97xx_probe()Axel Lin1-2/+1
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>
2010-05-19Input: wm9712 - fix wm97xx_set_gpio() logicManuel Lauss1-1/+1
WM97XX_GPIO_HIGH is not a bitmap and should to be treated as such. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
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>
2009-09-23Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Anton Vorontsov1-2/+4
Conflicts: drivers/power/wm97xx_battery.c
2009-09-04wm97xx-core: Pass platform_data to batteryMarek Vasut1-0/+3
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2009-07-20Input: wm97xx - add possibility to control the GPIO_STATUS shiftMarek Vasut1-2/+4
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>
2009-06-15input: remove driver_data direct access of struct deviceGreg Kroah-Hartman1-1/+1
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. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-05-01Input: wm97xx - do not access dev->driver_data directlyGreg Kroah-Hartman1-1/+1
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>
2009-04-11Input: wm97xx - don't specify IRQF_SAMPLE_RANDOMMark Brown1-2/+1
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>
2009-03-08Input: wm97xx - add BTN_TOUCH event to wm97xx to use it with AndroidMike Rapoport1-4/+9
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>
2008-10-15Merge branch 'next' into for-linusDmitry Torokhov1-3/+2
2008-10-13Input: wm97xx - update email address for Liam GirdwoodLiam Girdwood1-3/+2
This updates the email address for Liam Girdwood as my old address is no longer valid. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-08-18Input: remove version.h from drivers that don't need itHuang Weiyi1-1/+0
If a driver dies not use LINUX_VERSION_CODE nor KERNEL_VERSION then it does not need to include version.h Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27Input: wm97xx-core - fix race on PHY initMark Brown1-11/+11
The chip phy_init() function must be called before the dig_enable() function but dig_enable() is called when the device is opened and we only call phy_init() after having reigstered the device, meaning the two can race. Fix this by doing the phy_init() before we register the input device. Thanks to Rodolfo Giometti <giometti@enneenne.com> for the report. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27Input: wm97xx-core - fix driver nameMark Brown1-1/+1
Fix driver name - thanks to Guennadi Liakhovetski <g.liakhovetski@gmx.de> for reporting this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-05-27Input: wm97xx-core - report a phys for WM97xx touchscreensMark Brown1-0/+1
phys is displayed in diagnostic output like that from evbug so ensure that it is set to something. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-17Input: wm97xx-core - support use as a wakeup sourceMark Brown1-0/+39
The WM97xx touch screen controllers can be used to generate a wakeup event when the system is suspended. Provide a new core API call wm97xx_set_suspend_mode() allowing machine drivers to enable this. If no suspend_mode is provided then the touch panel will be powered down when the system is suspended. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-17Input: wm97xx-core - use IRQF_SAMPLE_RANDOMMark Brown1-1/+2
The touchscreen interrupt is driven by human input which can reasonably be used to provide entropy. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-17Input: wm97xx-core - only schedule interrupt handler if not already scheduledMark Brown1-7/+7
As well as clarifying the fact that the driver can cope if a second interrupt occurs before the IRQ work is scheduled this also ensures that calls to the machine irq_enable() are balanced, making that easier to implement. Normally this is redundant due to the interrupt disabling but some unusal board configurations can trigger it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-04-02Input: add support for WM97xx familty touchscreensMark Brown1-0/+789
Add support for the touchscreen controllers provided by Wolfson Microelectronics WM97xx series chips in both polled and streaming modes. These drivers have been maintained out of tree since 2003. During that time the driver the primary maintainer was Liam Girdwood and a number of people have made contributions including Dmitry Baryshkov, Stanley Cai, Rodolfo Giometti, Russell King, Marc Kleine-Budde, Ian Molton, Vincent Sanders, Andrew Zabolotny, Graeme Gregory, Mike Arthur and myself. Apologies to anyone I have omitted. Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com> Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com> Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>