aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/snvs_pwrkey.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-08-14Input: remove dev_err() usage after platform_get_irq()Stephen Boyd1-3/+1
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-10Merge tag 'v5.1' into nextDmitry Torokhov1-3/+3
Sync up with mainline to bring in the latest APIs.
2019-04-04Input: snvs_pwrkey - use dev_pm_set_wake_irq() to simplify codeAnson Huang1-26/+4
With calling dev_pm_set_wake_irq() to set SNVS ON/OFF button as wakeup source for suspend, generic wake irq mechanism will automatically enable it as wakeup source when suspend, then the enable_irq_wake()/disable_irq_wake() can be removed in suspend/resume callback, it simplifies the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-04-03Input: snvs_pwrkey - initialize necessary driver data before enabling IRQAnson Huang1-3/+3
SNVS IRQ is requested before necessary driver data initialized, if there is a pending IRQ during driver probe phase, kernel NULL pointer panic will occur in IRQ handler. To avoid such scenario, just initialize necessary driver data before enabling IRQ. This patch is inspired by NXP's internal kernel tree. Fixes: d3dc6e232215 ("input: keyboard: imx: add snvs power key driver") Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-06-21Input: snvs_pwrkey - switch to SPDX identifierFabio Estevam1-11/+4
Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-24Input: keyboard - convert timers to use timer_setup()Kees Cook1-4/+3
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-09-26Input: snvs_pwrkey - drop input_free_device call if input_register_device failsAxel Lin1-1/+0
Current code uses devm_input_allocate_device() so don't explicitly call input_free_device if input_register_device fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-11Input: snvs_pwrkey - fix returned value check of syscon_regmap_lookup_by_phandle()Vladimir Zapolskiy1-2/+2
On error syscon_regmap_lookup_by_phandle() returns ERR_PTR() value, which makes a check for NULL invalid and may lead to oops on error path. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-02Input: snvs_pwrkey - use __maybe_unused to hide pm functionsArnd Bergmann1-2/+2
The SNVS power key driver has suspend/resume functions that are accessed using SIMPLE_DEV_PM_OPS, which hide the reference when CONFIG_PM_SLEEP is not set, resulting in a warning about unused functions: drivers/input/keyboard/snvs_pwrkey.c:183:12: error: 'imx_snvs_pwrkey_suspend' defined but not used [-Werror=unused-function] drivers/input/keyboard/snvs_pwrkey.c:194:12: error: 'imx_snvs_pwrkey_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-26Input: snvs_pwrkey - remove duplicated semicolonJavier Martinez Canillas1-2/+1
Remove the unneded semicolon since it is clearly a typo error. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-18input: snvs_pwrkey: use "wakeup-source" as deivce tree property nameShawn Guo1-1/+1
Instead of inventing a new property name, let's use "wakeup-source" to be consistent with other driver and subsystem bindings. Signed-off-by: Shawn Guo <shawnguo@kernel.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-15input: keyboard: imx: add snvs power key driverRobin Gong1-0/+227
add snvs power key driver. It work in imx chips after i.mx6sx ON/OFF key used power on/off whole system. This driver make it wakeup from suspend state when short press ON/OFF key. Long time press will trig SNVS power off chip without software intervention. Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Frank Li <Frank.Li@freescale.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>