summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/soc_button_array.c
Commit message (Collapse)AuthorAgeFilesLines
* Input: soc_button_array - debounce the buttonsHans de Goede2017-01-211-0/+2
| | | | | | | | | | | | | | The soc_button_array driver was initializing (kzalloc) the debounce_interval value to 0, leading to no debouncing at all, while the buttons are simple mechanical switches. This commit sets debounce_interval to 50ms to avoid spurious button press reports both on press and release of the button. Note 50ms may seem like a lot but soc_button_array is typically used with cheap tablets, with not so great buttons. I tried 10ms on my tablet and it is not enough, where as 50ms works well. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - use 'dev' instead of dereferencing itGuenter Roeck2017-01-181-3/+3
| | | | | | Use local variable 'dev' instead of dereferencing it several times. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - bail out earlier if gpiod_count is zeroBenjamin Tissoires2016-11-251-0/+5
| | | | | | | | The PNP0C40 device of the Surface 3 doesn't have any GPIO attached to it. Instead of trying to access the GPIO, request the count beforehand and bail out if it is null or if an error is returned. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - use gpio_is_valid()Benjamin Tissoires2016-11-251-1/+2
| | | | | | | gpio_keys will later use gpio_is_valid(). To match the actual behavior, we should use it here too. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - remove duplicated includeWei Yongjun2015-05-131-1/+0
| | | | | | | Remove duplicated include for acpi.h. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - use "Windows" key for "Home"Bastien Nocera2015-02-101-1/+1
| | | | | | | | | | | | | | | KEY_HOME is the key to go back to the beginning of the line, not the key to get into an overview mode, as Windows does. GNOME can already make use of the Windows key on multiple form factors, and other desktop environments can use it depending on the form factor. Using "Windows" as the emitted key also means that the keycode sent out matches the symbol on the key itself. So switch KEY_HOME to KEY_LEFTMETA ("Windows" key). Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Merge branch 'platform/remove_owner' of ↵Greg Kroah-Hartman2014-11-031-1/+0
|\ | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next Remove all .owner fields from platform drivers
| * input: misc: drop owner assignment from platform_driversWolfram Sang2014-10-201-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>
* | Input: soc_button_array - update calls to gpiod_get*()Alexandre Courbot2014-10-241-1/+1
|/ | | | | | | | | | | | Add the new flags argument to calls of (devm_)gpiod_get*(). Currently both forms (with or without the flags argument) are valid thanks to transitional macros in <linux/gpio/consumer.h>. These macros will be removed once all consumers are updated and the flags argument will become compulsory. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - convert to platform busJin Yao2014-09-241-29/+31
| | | | | | | | | | | | | | ACPI device enumeration mechanism changed a lot since 3.16-rc1. ACPI device objects with _HID will be enumerated to platform bus by default. For the existing PNP drivers that probe the PNPACPI devices, the device ids are listed explicitly in drivers/acpi/acpi_pnp.c. But ACPI folks will continue their effort on shrinking this id list by converting the PNP drivers to platform drivers, for the devices that don't belong to PNP bus in nature. Signed-off-by: Jin Yao <yao.jin@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - add missing memory allocation checkPramod Gurav2014-07-251-0/+3
| | | | | Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - remove duplicate inclusion of input.hSachin Kamat2014-05-281-1/+0
| | | | | | | input.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: soc_button_array - fix a crash during rmmodLejun Zhu2014-04-221-0/+1
| | | | | | | | | When the system has zero or one button available, trying to rmmod soc_button_array will cause crash. Fix this by properly handling -ENODEV in probe(). Signed-off-by: Lejun Zhu <lejun.zhu@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: add driver for SOC button arrayLejun Zhu2014-03-301-0/+218
This patch adds support for the GPIO buttons on some Intel Bay Trail tablets originally running Windows 8. The ACPI description of these buttons follows "Windows ACPI Design Guide for SoC Platforms". Signed-off-by: Lejun Zhu <lejun.zhu@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>