summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ad7877.c
AgeCommit message (Collapse)Author
2013-04-07Input: ad7877 - use spi_get_drvdata() and spi_set_drvdata()Jingoo Han
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24Input: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24Input: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24Input: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-03-16Input: convert SPI drivers to use module_spi_driver()Axel Lin
This patch converts the drivers in drivers/input/* to use the module_spi_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-01-10Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits) Input: tc3589x-keypad - add missing kerneldoc Input: ucb1400-ts - switch to using dev_xxx() for diagnostic messages Input: ucb1400_ts - convert to threaded IRQ Input: ucb1400_ts - drop inline annotations Input: usb1400_ts - add __devinit/__devexit section annotations Input: ucb1400_ts - set driver owner Input: ucb1400_ts - convert to use dev_pm_ops Input: psmouse - make sure we do not use stale methods Input: evdev - do not block waiting for an event if fd is nonblock Input: evdev - if no events and non-block, return EAGAIN not 0 Input: evdev - only allow reading events if a full packet is present Input: add driver for pixcir i2c touchscreens Input: samsung-keypad - implement runtime power management support Input: tegra-kbc - report wakeup key for some platforms Input: tegra-kbc - add device tree bindings Input: add driver for AUO In-Cell touchscreens using pixcir ICs Input: mpu3050 - configure the sampling method Input: mpu3050 - ensure we enable interrupts Input: mpu3050 - add of_match table for device-tree probing Input: sentelic - document the latest hardware ... Fix up fairly trivial conflicts (device tree matching conflicting with some independent cleanups) in drivers/input/keyboard/samsung-keypad.c
2012-01-03switch ->is_visible() to returning umode_tAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-11-29Input: remove redundant spi driver bus initializationLars-Peter Clausen
In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register(), so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // <smpl> @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-29Merge commit 'v3.2-rc3' into nextDmitry Torokhov
2011-11-09Input: convert obsolete strict_strtox to kstrtoxJJ Ding
With commit 67d0a0754455f89ef3946946159d8ec9e45ce33a we mark strict_strtox as obsolete. Convert all remaining such uses in drivers/input/. Also change long to appropriate types, and return error conditions from kstrtox separately, as Dmitry sugguests. Signed-off-by: JJ Ding <dgdunix@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-31drivers/input: Add module.h to modular drivers implicitly using itPaul Gortmaker
A pending cleanup will mean that module.h won't be implicitly everywhere anymore. Make sure the modular drivers in input dir are actually calling out for <module.h> explicitly in advance. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-01-20Input: ad7877 - convert to dev_pm_opsMark Brown
There is a move to deprecate bus-specific PM operations and move to using dev_pm_ops instead in order to reduce the amount of boilerplate code in buses and facilitate updates to the PM core. Do this move for the ad7879 SPI driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Michael Hennerich <Michael.Hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-18Input: ad7877 - switch to using threaded IRQDmitry Torokhov
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 <michael.hennerich@analog.com> Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-18Input: ad7877 - use attribute group to control visibility of attributesDmitry Torokhov
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 <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-17Input: ad7877 - filter events where pressure is beyond the maximumMichael Hennerich
Suppress events where pressure > pressure_max. These events come typically along with inaccurate X and Y samples. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-17Input: ad7877 - implement EV_KEY:BTN_TOUCH reportingMichael Hennerich
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>
2010-10-17Input: ad7877 - implement specified chip select behaviorMichael Hennerich
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>
2010-06-08Input: ad7877 - fix spi word size to 16 bitOskar Schirmer
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>
2010-05-13Input: ad7877 - keep dma rx buffers in seperate cache linesOskar Schirmer
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>
2010-03-09Input: ad7877 - increase pen up imeoutMichael Hennerich
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>
2009-09-23spi: prefix modalias with "spi:"Anton Vorontsov
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>
2009-04-15Input: ad7877, ad7879 - remove depreciated IRQF_SAMPLE_RANDOM flagMichael Hennerich
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>
2009-03-09Input: add AD7877 touchscreen driverMichael Hennerich
[dtor@mail.ru: locking and other fixups] Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>