summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/nspire-keypad.c
AgeCommit message (Collapse)Author
2021-04-28Input: nspire-keypad - enable interrupts only when openedFabian Vogt
[ Upstream commit 69d5ff3e9e51e23d5d81bf48480aa5671be67a71 ] The driver registers an interrupt handler in _probe, but didn't configure them until later when the _open function is called. In between, the keypad can fire an IRQ due to touchpad activity, which the handler ignores. This causes the kernel to disable the interrupt, blocking the keypad from working. Fix this by disabling interrupts before registering the handler. Additionally, disable them in _close, so that they're only enabled while open. Fixes: fc4f31461892 ("Input: add TI-Nspire keypad support") Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de> Link: https://lore.kernel.org/r/3383725.iizBOSrK1V@linux-e202.suse.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2014-10-20input: keyboard: 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-10-15Input: nspire-keypad - add missing clk_disable_unprepare() on error pathWei Yongjun
Add the missing clk_disable_unprepare() before return from nspire_keypad_open() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-06Input: nspire-keypad - remove redundant of_match_ptrSachin Kamat
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-15Input: keyboard, serio - simplify use of devm_ioremap_resourceJulia Lawall
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-07-06Input: nspire-keypad - replace magic offset with defineDaniel Tang
Signed-off-by: Daniel Tang <dt.tangr@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-27Input: nspire-keypad - remove redundant dev_err call in nspire_keypad_probe()Wei Yongjun
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-04Input: add TI-Nspire keypad supportDaniel Tang
This is a driver for the keypads found on the TI-Nspire series calculators. Signed-off-by: Daniel Tang <dt.tangr@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>