summaryrefslogtreecommitdiff
path: root/drivers/input/misc/twl4030-pwrbutton.c
AgeCommit message (Collapse)Author
2017-09-04mfd: twl: Move header file out of I2C realmWolfram Sang
include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-05-01Input: twl4030-pwrbutton - use input_set_capability() helperSebastian Reichel
Cleanup driver slightly by using input_set_capability() instead of manually setting the required bits. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-05-01Input: twl4030-pwrbutton - use correct device for irq requestSebastian Reichel
The interrupt should be requested for the platform device and not for the input device. Fixes: 7f9ce649d267 ("Input: twl4030-pwrbutton - simplify driver using devm_*") Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-21Input: misc - drop calls to platform_set_drvdata and i2c_set_clientdataGuenter Roeck
There is no call to i2c_get_clientdata(), platform_get_drvdata(), or dev_get_drvdata() in any of the drivers in this patch. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-05-15Input: twl4030-pwrbutton - pass the IRQF_ONESHOT flagFabio Estevam
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-11-08Input: twl4030-pwrbutton - ensure a wakeup event is recorded.NeilBrown
This button is treated as a wakeup source, so we need to initialise it correctly. Without the device_init_wakeup() call, dev->power.wakeup will be NULL, and pm_wakeup_event() will do nothing. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-20input: misc: drop owner assignment from platform_driversWolfram Sang
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>
2013-11-25Input: twl4030-pwrbutton - simplify driver using devm_*Sebastian Reichel
Use managed irq resource to simplify the driver. Signed-off-by: Sebastian Reichel <sre@debian.org> Reviewed-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-25Input: twl4030-pwrbutton - use dev_err for errorsSebastian Reichel
Use dev_err() to output errors instead of dev_dbg(). Signed-off-by: Sebastian Reichel <sre@debian.org> Reviewed-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-25Input: twl4030-pwrbutton - add device tree supportSebastian Reichel
Add device tree support for twl4030 power button driver. Adding device tree support involved converting the driver to module_platform_driver(). Signed-off-by: Sebastian Reichel <sre@debian.org> Acked-by: Kumar Gala <galak@codeaurora.org> Tested-by: Florian Vaussard <florian.vaussard@epfl.ch> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-03-17Input: twl4030-pwrbutton - use module_platform_driver_probe macroSachin Kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-11-24Input: twl4030-pwrbutton - switch to using TWL_MODULE_PM_MASTER definePeter Ujfalusi
To facilitate upcoming cleanup in twl stack switch from using TWL4030_MODULE_PM_MASTER define to usingTWL_MODULE_PM_MASTER. There are no functional changes. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-08-21Input: twl4030-pwrbutton - report a wakeup_event on button pressNeilBrown
As the power button causes a wake from suspend, we need to register the event with the pm sustem to avoid racing with suspend. As the input event is reported in the interrupt handler, as simple pm_wakeup_event() is sufficient. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-01-10Input: revert some over-zealous conversions to module_platform_driver()Dmitry Torokhov
Recent conversion to module_platform_driver() went a bit too far and converted not only drivers that used platform_driver_register() but also ones using platform_driver_probe(), breaking them in process. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-30Input: misc - use macro module_platform_driver()JJ Ding
Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to save some platform_driver boilerplate code. Use it. Signed-off-by: JJ Ding <dgdunix@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27Input: twl4030-pwrbutton - fix a leak of the IRQ during init failureAxel Lin
In twl4030_pwrbutton_probe error path, free_irq() was using NULL rather than the driver data as the data pointer so free_irq() wouldn't have matched. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-08Input: twl4030-pwrbutton - replace __devinit with __initMarkus Lehtonen
Power button is not hot-pluggable so we can save some memory by using __init. Signed-off-by: Markus Lehtonen <markus.lehtonen@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-12-29Input: twl4030-pwrbutton - switch to using threaded IRQFelipe Balbi
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-12-13mfd: Rename all twl4030_i2c*Balaji T K
This patch renames function names like twl4030_i2c_write_u8, twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8 and also common variable in twl-core.c Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-12-13mfd: Rename twl4030* driver files to enable re-useSantosh Shilimkar
The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030 for OMAP3. The common modules like RTC, Regulator creates opportunity to re-use the most of the code from twl4030. This patch renames few common drivers twl4030* files to twl* to enable the code re-use. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-04-19Input: add twl4030-pwrbutton driverFelipe Balbi
This is part of the twl4030 multifunction device driver that supports reporting KEY_POWER events via the input layer. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>