aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/gpio_keys.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-13input: use %*pb[l] to print bitmaps including cpumasks and nodemasksTejun Heo1-1/+1
printk and friends can now format bitmaps using '%*pb[l]'. cpumask and nodemask also provide cpumask_pr_args() and nodemask_pr_args() respectively which can be used to generate the two printf arguments necessary to format the specified cpu/nodemask. * Line termination only requires one extra space at the end of the buffer. Use PAGE_SIZE - 1 instead of PAGE_SIZE - 2 when formatting. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-30Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-57/+57
Pull input layer fixes from Dmitry Torokhov: "Fixes for v7 protocol for ALPS devices and few other driver fixes. Also users can request input events to be stamped with boot time timestamps, in addition to real and monotonic timestamps" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: hil_kbd - fix incorrect use of init_completion Input: alps - v7: document the v7 touchpad packet protocol Input: alps - v7: fix finger counting for > 2 fingers on clickpads Input: alps - v7: sometimes a single touch is reported in mt[1] Input: alps - v7: ignore new packets Input: evdev - add CLOCK_BOOTTIME support Input: psmouse - expose drift duration for IBM trackpoints Input: stmpe - bias keypad columns properly Input: stmpe - enforce device tree only mode mfd: stmpe: add pull up/down register offsets for STMPE Input: optimize events_per_packet count calculation Input: edt-ft5x06 - fixed a macro coding style issue Input: gpio_keys - replace timer and workqueue with delayed workqueue Input: gpio_keys - allow separating gpio and irq in device tree
2014-12-17Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-16/+21
Pull input subsystem updates from Dmitry Torokhov: "Two new drivers for Elan hardware (for I2C touchpad and touchscreen found in several Chromebooks and other devices), a driver for Goodix touch panel, and small fixes to Cypress I2C trackpad and other input drivers. Also we switched to use __maybe_unused instead of gating suspend/ resume code with #ifdef guards to get better compile coverage" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (27 commits) Input: gpio_keys - fix warning regarding uninitialized 'button' variable Input: add support for Elan eKTH I2C touchscreens Input: gpio_keys - fix warning regarding uninitialized 'irq' variable Input: cyapa - use 'error' for error codes Input: cyapa - fix resuming the device Input: gpio_keys - add device tree support for interrupt only keys Input: amikbd - allocate temporary keymap buffer on the stack Input: amikbd - fix build if !CONFIG_HW_CONSOLE Input: lm8323 - missing error check in lm8323_set_disable() Input: initialize device counter variables with -1 Input: initialize input_no to -1 to avoid subtraction Input: i8042 - do not try to load on Intel NUC D54250WYK Input: atkbd - correct MSC_SCAN events for force_release keys Input: cyapa - switch to using managed resources Input: lifebook - use "static inline" instead of "inline" in lifebook.h Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resume Input: mouse - use __maybe_unused instead of ifdef around suspend/resume Input: misc - use __maybe_unused instead of ifdef around suspend/resume Input: cap11xx - support for irq-active-high option Input: cap11xx - add support for various cap11xx devices ...
2014-12-15Input: gpio_keys - replace timer and workqueue with delayed workqueueDmitry Torokhov1-34/+31
We do not need to roll our own implementation of delayed work now that we have proper implementation of mod_delayed_work. For interrupt-only driven buttons we retain the timer, but we rename it to release_timer to better reflect its purpose. Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-15Input: gpio_keys - allow separating gpio and irq in device treeDmitry Torokhov1-23/+26
This change allows specify interrupt for buttons separately form gpio, potentially allowing to form several "clusters" of buttons on different interrupts. Button defined without both gpio and irq in device tree is a hared error instead of a warning now. Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-14Input: gpio_keys - fix warning regarding uninitialized 'button' variableFabio Estevam1-2/+3
Commit af906faabcf91eb1 ("Input: gpio_keys - fix warning regarding uninitialized 'irq' variable") introduced the following build warning: drivers/input/keyboard/gpio_keys.c:625:16: warning: 'button' may be used uninitialized in this function [-Wmaybe-uninitialized] Move the 'button' initialization to a proper location to avoid such warning. Reported-by: Olof's autobuilder <build@lixom.net> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-07Input: gpio_keys - fix warning regarding uninitialized 'irq' variableDmitry Torokhov1-4/+2
Commit f2d347ff70be453e ("Input: gpio_keys - add device tree support for interrupt only keys") caused the following build warning: drivers/input/keyboard/gpio_keys.c: In function 'gpio_keys_probe': drivers/input/keyboard/gpio_keys.c:647:15: warning: 'irq' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/input/keyboard/gpio_keys.c:622:7: note: 'irq' was declared here Move button->irq initialization into proper branch and get rid of the temporary. Reported-by: Olof's autobuilder <build@lixom.net> Reported-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03Input: gpio_keys - add device tree support for interrupt only keysAlexander Stein1-14/+20
This features already exists for board config setups. Add support for device tree based systems. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-20input: keyboard: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-05-14Input: gpio_keys - more conversions to devm-* APIAlexander Shiyan1-35/+34
Replace existing gpio resource handling in the driver with managed resources, this ensures more consistent error values and simplifies error paths. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: gpio_keys - make of_device_id array constJingoo Han1-1/+1
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: gpio_keys - convert to use devm_*Andy Shevchenko1-49/+25
This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-06Input: gpio_keys - include linux/of.h headerSachin Kamat1-0/+1
'of_match_ptr' is defined in linux/of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-08Input: gpio_keys - remove redundant platform_set_drvdata()Sachin Kamat1-1/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-24Input: gpio_keys - defer probing if GPIO probing is deferredDmitry Torokhov1-1/+12
If of_get_gpio_flags() returns an error (as in case when GPIO probe is deferred) the driver would attempt to claim invalid GPIO. It should propagate the error code up the stack instead so that the probe either fails or will be retried later (in case of -EPROBE_DEFER). Cc: stable@vger.kernel.org Reported-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-03Input: gpio_keys - switch to using gpio_request_one()Dmitry Torokhov1-9/+1
This saves us a few lines of code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27Input: gpio_keys - disable hardware on suspendJonas Aaberg1-5/+22
Disable hardware if active when suspending if the hw can not wake the system from suspend. [Dmitry Torokhov: use input_dev->users instead of a separate flag] Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org> Reviewed-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-27Input: gpio_keys - report initial state when opening the deviceDmitry Torokhov1-13/+26
Instead of reporting the initial stage when the device is registered we should do it when the device is opened (so there are users). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24Input: remove use of __devexitBill Pemberton1-1/+1
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 Pemberton1-6/+6
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 Pemberton1-1/+1
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-08-21Input: gpio_keys - report a wakeup_event for a button pressNeilBrown1-0/+8
In order to avoid races with suspend, a wakeup event must register as such by calling pm_wakeup_event() or pm_stay_awake(). This will ensure that the current suspend cycle aborts. When the user-space visible event is created in the interrupt handler (gpio_keys_irq_isr), a simple pm_wakeup_event() with no delay is sufficient as suspend will synchronise with all interrupt delivery. When the user-space visible event is created later (gpio_keys_gpio_isr), we need to bracket the event with pm_stay_awake() and pm_relax(). Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-08-21Input: gpio_keys - clean up device tree parserAlexandre Pereira da Silva1-81/+80
- fix sizeof in memset; - clean up dt properties extraction; - use for_each_chil_of_node macro; - use of_get_child_count(); - use of_match_ptr macro. Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Acked-by: Rob Herring <rob.herring@calxeda.com> [Fabio Estevam <fabio.estevam@freescale.com>: fix fix NULL pointer dereference for dt case - pdata->buttons wasn't initialized] Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-06-12Input: gpio_keys - remove useless reinitialization of pdata->nbuttonsTobias Klauser1-1/+0
pdata is zeroed using memset just a few lines before, so there is no need to set the nbuttons member to 0 again. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-19Input: gpio_keys - add support for interrupt only keysLaxman Dewangan1-66/+148
Some of buttons, like power-on key or onkey, may only generate interrupts when pressed and not actually be mapped as gpio in the system. Allow setting gpio to invalid value and specify IRQ instead to support such keys. The debounce timer is used not to debounce but to ignore new IRQs coming while button is kept pressed. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-19Input: gpio_keys - consolidate key destructor codeDmitry Torokhov1-16/+14
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-19Input: revert "gpio_keys - switch to using threaded IRQs"David Jander1-1/+1
request_any_context_irq() should handle the case when using GPIO expanders that themselves use threaded IRQs, and so the premise of change 7e2ecdf438bb479e2b4667fc16b1a84d6348da04 is incorrect. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-19Input: gpio_keys - constify platform dataDmitry Torokhov1-16/+15
The platform data should not be altered and therefore should be accessed through const pointers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-20Input: gpio_keys - use of_property_read_u32()Tobias Klauser1-11/+13
Use the of_property_read_u32() helper function to retrieve u32 values from the device tree. Also do not pass the len parameter to of_get_property if it isn't checked afterwards. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-30Input: gpio_keys - return proper error code if memory allocation failsTobias Klauser1-1/+1
Return -ENOMEM if kzalloc fails in gpio_keys_get_devtree_pdata(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-10Input: gpio_keys - switch to using SIMPLE_DEV_PM_OPSDmitry Torokhov1-8/+3
This reduces amount #ifdeds in the code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-10Input: gpio_keys - add support for device-tree platform dataDavid Jander1-16/+132
This patch enables fetching configuration data, which is normally provided via platform_data, from the device-tree instead. If the device is configured from device-tree data, the platform_data struct is not used, and button data needs to be allocated dynamically. Big part of this patch deals with confining pdata usage to the probe function, to make this possible. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-29Input: gpio_keys - fix a memory leakAxel Lin1-0/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27Input: gpio_keys - move to late_initcallDavid Jander1-1/+1
Initialize gpio_keys driver at late_initcall level, to give it a chance to work with GPIO expanders that might not be ready yet if we initialize the driver at module_init time. This is strictly a band-aid until there is a better way to specify inter-device dependencies. Signed-off-by: David Jander <david@protonic.nl> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-21Input: gpio_keys - switch to using threaded IRQsDavid Jander1-2/+2
Use a threaded interrupt handler in order to permit the handler to use a GPIO driver that causes things like I2C transactions being done inside the handler context. Signed-off-by: David Jander <david@protonic.nl> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11Input: gpio-keys - add support for setting device nameAlexander Stein1-1/+1
This patch allows to set a device name which helps distinguishing several gpio-keys devices. Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11Input: gpio_keys - add support for EV_ABSAlexander Stein1-2/+7
With this patch you can setup a group of GPIOs representing a specific position on an EV_ABS axis. Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-20Input: gpio_keys - switch to using request_any_context_irqPhilippe Langlais1-3/+3
The driver does not require hardirq context and can work with threaded interrupts as well, so let's switch to request_any_context_irq which will select the context that is available for us. Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-08-03Input: gpio_keys - add hooks to enable/disable deviceShubhrajyoti D1-0/+22
Allow platform code to specify callbcks that will be invoked when input device is opened or closed, allowing, for example, to enable the device. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-28Input: gpio-keys - add gpiolib debounce supportGrazvydas Ignotas1-5/+14
gpiolib now has debounce support added in .35, so let's make use of it. This allows to use hardware GPIO debouncing on some platforms like OMAP. In case gpiolib debounce setup fails for some GPIO, the driver will fall back to timer based debouncing, which is what it used before. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> 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>
2010-02-04Input: gpio-keys - add support for disabling gpios through sysfsMika Westerberg1-11/+307
Now gpio-keys input driver exports 4 new attributes to userland through sysfs: /sys/devices/platform/gpio-keys/keys [ro] /sys/devices/platform/gpio-keys/switches [ro] /sys/devices/platform/gpio-keys/disabled_keys [rw] /sys/devices/platform/gpio-keys/disables_switches [rw] With these attributes, userland program can read which keys and switches can be disabled and then disable/enable them as needed. Keys and switches are exported as stringified bitmap of codes (keycodes or switch codes). For example keys 15, 89, 100, 101, 102 are exported as: '15,89,100-102'. Description of the attributes: keys - bitmap of keys which can be disabled switches - bitmap of switches which can be disabled disabled_keys - bitmap of currently disabled keys (bit 1 means disabled, 0 enabled) disabled_switches - bitmap of currently disabled switches (bit 1 means disabled, 0 enabled) Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-30Input: gpio_keys - scan gpio state at probe and resume timeDaniel Mack1-11/+25
We need to read and report gpio state when we bind the driver to the device and upon resume so that userspace has correct state of the switches (and keys but they are less important since, even if they are happened to be pressed, we'd expect them to be released fairly soon). Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-20Input: gpio_keys - seperate individual button setup to make code neaterBen Dooks1-40/+53
Move the code that deals with setting up each individual button out into a new function to reduce the indentation and allow us to common up some of the error recovery code. 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>
2009-11-20Input: gpio_keys - use <linux/gpio.h> instead of <asm/gpio.h>Ben Dooks1-2/+1
The gpio keys driver should be using <linux/gpio.h> instead of <asm/gpio.h> 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>
2009-11-20Input: gpio_keys - use dev_ macros to report informationBen Dooks1-7/+9
The gpio_keys driver is binding to a platform device but using pr_err() to report errors. Change to using dev_err() so that all messages are prefixed by the device name. 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>
2009-11-02Input: gpio-keys - use IRQF_SHAREDDmitry Eremin-Solenikov1-0/+1
There is nothing that disallows gpio-keys to share it's IRQ line w/ other drivers. Make it use IRQF_SHARED in request_irq(). An example of other driver with which I'd like to share IRQ line for GPIO buttons is ledtrig-gpio. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-24Input: gpio_keys - swtich to dev_pm_opsMike Rapoport1-7/+12
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-06-28Input: gpio-keys - avoid possibility of sleeping in timer functionJani Nikula1-5/+12
The gpio_get_value function may sleep, so it should not be called in a timer function. Move gpio_get_value calls to workqueue. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-06-28Input: gpio-keys - revert 'change timer to workqueue'Jani Nikula1-12/+20
This reverts commit 0b346838c5862bfe911432956a106d602535d030. This commit breaks GPIO debouncing by replacing the original mod_timer with schedule_delayed_work in the interrupt handler. The latter does not kick the timer further on GPIO line changes as it should to perform debouncing. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>