summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'next' into for-linusDmitry Torokhov2017-02-2126-630/+115Star
|\ | | | | | | Prepare input updates for 4.11 merge window.
| * Input: delete MPU3050 driverLinus Walleij2017-01-313-492/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | The MPU3050 driver in the input subsystem has been superseded by a proper IIO driver found in drivers/iio/gyro/mpu3050*. Patches have been submitted to remove all defconfig and related references to the old driver and replace this input driver with the IIO driver. So delete the input driver. Input was never a good fit for sensors anyway. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * Merge tag 'v4.10-rc5' into nextDmitry Torokhov2017-01-246-29/+26Star
| |\ | | | | | | | | | Sync up with mainline to bring up improvements in various subsystems.
| * | Input: dm355evm_keys - drop unnecessary call to input_set_drvdataGuenter Roeck2017-01-231-2/+0Star
| | | | | | | | | | | | | | | | | | | | | Since there is no call to dev_get_drvdata() or input_get_drvdata(), the call to input_set_drvdata() is unnecessary and can be dropped. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: pwm-beeper - switch to using "atomic" PWM APIDmitry Torokhov2017-01-221-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | The "atomic" API allows us to configure PWM period and duty cycle and enable it in one call. Reviewed-by: Thierry Reding <thierry.reding@gmail.com> Tested-by: David Lechner <david@lechnology.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: pwm-beeper - add optional amplifier regulatorDavid Lechner2017-01-221-13/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an optional regulator to the pwm-beeper device. This regulator acts as an amplifier. The amplifier is only enabled while beeping in order to reduce power consumption. Tested on LEGO MINDSTORMS EV3, which has a speaker connected to PWM through an amplifier. Signed-off-by: David Lechner <david@lechnology.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: pwm-beeper - suppress error message on probe deferDavid Lechner2017-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This suppress printing an error message when pwm_get returns -EPROBE_DEFER. Otherwise you get a bunch of noise in the kernel log. Signed-off-by: David Lechner <david@lechnology.com> Reviewed-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: pwm-beeper - fix race when suspendingDmitry Torokhov2017-01-221-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually userspace sends SND_BELL and SND_TONE events, and by the time pwm_beeper_suspend() runs userpsace is already frozen, but theoretically in-kernel users may send these events too, and that may cause pwm_beeper_event() scheduling another work after we canceled it. Let's introduce a "suspended" flag and check it in pwm_beeper_event() to avoid this race. Reviewed-by: Thierry Reding <thierry.reding@gmail.com> Tested-by: David Lechner <david@lechnology.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: pwm-beeper - use input_set_capability()Dmitry Torokhov2017-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Instead of manipulating capability bits directly, let's use input_set_capability() API. Reviewed-by: Thierry Reding <thierry.reding@gmail.com> Tested-by: David Lechner <david@lechnology.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: pwm-beeper - switch to using managed resourcesDmitry Torokhov2017-01-221-34/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | Use of managed resources (devm) simplifies error handling and tear down of the driver. Reviewed-by: Thierry Reding <thierry.reding@gmail.com> Tested-by: David Lechner <david@lechnology.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: pwm-beeper - remove calls to legacy pwm_request APIDmitry Torokhov2017-01-221-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | There are no more users of pwm-beeper driver in mainline relying on this legacy API, so let's remove it and simplify the driver code. Acked-by: Thierry Reding <thierry.reding@gmail.com> Tested-by: David Lechner <david@lechnology.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: misc - drop empty remove functionsGuenter Roeck2017-01-225-30/+0Star
| | | | | | | | | | | | | | | | | | Empty remove functions don't serve a useful purpose and can be removed. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: misc - drop unnecessary calls to device_init_wakeupGuenter Roeck2017-01-227-11/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling device_init_wakeup in the remove function is unnecessary since the device is going away, and thus won't be able to cause any wakeups under any circumstances. Besides, the driver cleanup code already handles the necessary cleanup. Similarly, disabling wakeup in the probe error path is unnecessary, as is disabling wakeup in the probe function in the first place. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: misc - use local variables consistentlyGuenter Roeck2017-01-223-7/+6Star
| | | | | | | | | | | | | | | | | | | | | If a function declares a variable to access a structure element, use it consistently. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: misc - drop calls to platform_set_drvdata and i2c_set_clientdataGuenter Roeck2017-01-225-6/+0Star
| | | | | | | | | | | | | | | | | | | | | 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>
| * | 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: ab8500-ponkey - drop unnecessary call to platform_set_drvdataGuenter Roeck2017-01-181-1/+0Star
| | | | | | | | | | | | | | | | | | | | | There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: tps65218-pwrbutton - drop unnecessary call to platform_set_drvdataGuenter Roeck2017-01-181-5/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Also use existing 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 - 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: mma8450 - drop unnecessary call to i2c_set_clientdataGuenter Roeck2017-01-181-2/+0Star
| | | | | | | | | | | | | | | | | | | | | There is no call to i2c_get_clientdata() or dev_get_drvdata(). Drop the unnecessary call to i2c_set_clientdata(). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: gpio_decoder - drop unnecessary call to platform_set_drvdataGuenter Roeck2017-01-181-1/+0Star
| | | | | | | | | | | | | | | | | | | | | There is no call to platform_get_drvdata() or dev_get_drvdata(). Drop the unnecessary call to platform_set_drvdata(). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: bfin_rotary - switch to using devm_add_action_or_reset()Guenter Roeck2017-01-181-6/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | Use local variable 'dev' instead of dereferencing it several times and replace devm_add_action() and manual error handling with devm_add_action_or_reset(). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: bma150 - switch to using usleep_range instead of msleepAniroop Mathur2016-12-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | msleep (1~20) may not do what the caller intends, and will often sleep longer. (~20 ms actual sleep for any value given in the 1~20ms range) This is not the desired behaviour for many cases like device resume time, device suspend time, device enable time, etc. Thus, change msleep to usleep_range for precise wakeups. Signed-off-by: Aniroop Mathur <a.mathur@samsung.com> Acked by: Albert Zhang <xu.zhang@bosch-sensortec.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: uinput - fix crash when mixing old and new init styleDmitry Torokhov2017-02-011-6/+14
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If user tries to initialize uinput device mixing old and new style initialization (i.e. using old UI_SET_ABSBIT instead of UI_ABS_SETUP, we forget to allocate input->absinfo and will crash when trying to send absolute events: ioctl(ui, UI_DEV_SETUP, &us); ioctl(ui, UI_SET_PHYS, "Test"); ioctl(ui, UI_SET_EVBIT, EV_ABS); ioctl(ui, UI_SET_ABSBIT, ABS_X); ioctl(ui, UI_SET_ABSBIT, ABS_Y); ioctl(ui, UI_DEV_CREATE, 0); Reported-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191811 Fixes: fbae10db0940 ("Input: uinput - rework ABS validation") Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Merge branch 'for-linus' of ↵Linus Torvalds2017-01-131-3/+1Star
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "Small driver fixups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elants_i2c - avoid divide by 0 errors on bad touchscreen data Input: adxl34x - make it enumerable in ACPI environment Input: ALPS - fix TrackStick Y axis handling for SS5 hardware Input: synaptics-rmi4 - fix F03 build error when serio is module Input: xpad - use correct product id for x360w controllers Input: synaptics_i2c - change msleep to usleep_range for small msecs Input: i8042 - add Pegatron touchpad to noloop table Input: joydev - remove unused linux/miscdevice.h include
| * | Input: adxl34x - make it enumerable in ACPI environmentAndy Shevchenko2017-01-031-3/+1Star
| |/ | | | | | | | | | | | | | | | | | | The ACPI-enabled platform may contain _DSD method to enable this driver using compatible string. Remove OF specifics to re-use existing code on ACPI-enabled platforms. Suggested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds2016-12-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge tag 'mfd-for-linus-4.10' of ↵Linus Torvalds2016-12-191-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support - Add support for Ricoh RC5T619 PMIC to rn5t618 - Add support for PM8821 PMIC to qcom-pm8xxx New Functionality: - Add support for GPIO to lpc_ich - Add support for GPADC to sun4i - Add ability for rk808 to shutdown Fix-ups: - Simplify/strip unnecessary code; tps65218, palmas, tps65217 - Device Tree binding updates; tps65218, altera-a10sr - Provide/export device ID info; tps65218, axp20x-i2c, hi655x-pmic, fsl-imx25-tsadc, intel_soc_pmic_bxtwc - Use MFD API instead of of_platform_populate(); tps65218 - Generalise name-space; pm8xxx - Supply/edit regmap configuration; axp20x, cs47l24-tables, axp20x - Enable compile testing; max77620, max77686, exynos-lpass, abx500-core - Coding style issues; wm8994-core, wm5102-tables - Supply endian support; syscon - Remove module support; ab3100-core, ab8500-debugfs, ab8500-gpadc, abx500-core Bug Fixes: - Fix ordering issues; wm8994 - Fix dependencies (build-time/run-time); exynos_lpass, sun4i-gpadc - Fix compiler warnings; sun4i-gpadc - Fix leaks; mfd-core - Fix page fault during module unload; tps65217" * tag 'mfd-for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (49 commits) mfd: tps65217: Support an interrupt pin as the system wakeup mfd: tps65217: Make an interrupt handler simpler mfd: tps65217: Update register interrupt mask bits instead of writing operation mfd: tps65217: Specify the IRQ name mfd: tps65217: Fix page fault on unloading modules mfd: palmas: Remove redundant check in palmas_power_off mfd: arizona: Disable IRQs during driver remove mfd: pm8xxx: add support to pm8821 mfd: intel-lpss: Try to enable Memory-Write-Invalidate mfd: rn5t618: Add Ricoh RC5T619 PMIC support mfd: axp20x: Add address extension registers for AXP806 regmap mfd: intel_soc_pmic_bxtwc: Fix a typo in MODULE_DEVICE_TABLE() mfd: core: Fix device reference leak in mfd_clone_cell mfd: bcm590xx: Simplify a test mfd: sun4i-gpadc: Select regmap-irq mfd: abx500-core: drop unused MODULE_ tags from non-modular code mfd: ab8500: make sysctrl explicitly non-modular mfd: ab8500-gpadc: Make it explicitly non-modular mfd: ab8500-debugfs: Make it explicitly non-modular mfd: ab8500-core: Make it explicitly non-modular ...
| * | input: tps65218-pwrbutton: Add platform_device_id tableKeerthy2016-10-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | platform_device_id table is needed for adding the tps65218-pwrbutton module to the mfd_cell array. Signed-off-by: Keerthy <j-keerthy@ti.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2016-12-187-100/+62Star
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem updates from Dmitry Torokhov: - updated support for Synaptics RMI4 devices, including support for SMBus controllers, firmware update support, sensor tuning, and PS/2 guest support - ALPS driver now supports tracksticks on SS5 controllers - i8042 now uses chassis info to skip selftest on Asus laptops as list of individual models became too unwieldy - miscellaneous fixes to other drivers * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (67 commits) Input: imx6ul_tsc - generalize the averaging property Input: drv260x - use generic device properties Input: drv260x - use temporary for &client->dev Input: drv260x - fix input device's parent assignment Input: synaptics-rmi4 - add support for F34 V7 bootloader Input: drv260x - fix initializing overdrive voltage Input: ALPS - fix protcol -> protocol Input: i8042 - comment #else/#endif of CONFIG_PNP Input: lpc32xx-keys - fix invalid error handling of a requested irq Input: synaptics-rmi4 - fix debug for sensor clip Input: synaptics-rmi4 - store the attn data in the driver Input: synaptics-rmi4 - allow to add attention data Input: synaptics-rmi4 - f03 - grab data passed by transport device Input: synaptics-rmi4 - add support for F03 Input: imx6ul_tsc - convert int to u32 Input: imx6ul_tsc - add mask when set REG_ADC_CFG Input: synaptics-rmi4 - have only one struct platform data Input: synaptics-rmi4 - remove EXPORT_SYMBOL_GPL for internal functions Input: synaptics-rmi4 - remove mutex calls while updating the firmware Input: drv2667 - fix misuse of regmap_update_bits ...
| * | Input: drv260x - use generic device propertiesJingkui Wang2016-12-121-64/+19Star
| | | | | | | | | | | | | | | | | | | | | | | | Update driver drv260x to use generic device properties so that it can be used on non-DT systems. We also remove platform data as generic device properties work on static board code as well. Signed-off-by: Jingkui Wang <jkwang@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: drv260x - use temporary for &client->devDmitry Torokhov2016-12-121-22/+15Star
| | | | | | | | | | | | | | | | | | Let's introduce a temporary for "client->dev" is probe() as we use it quite a few times and "dev" is shorter. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: drv260x - fix input device's parent assignmentJingkui Wang2016-12-121-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were assigning I2C bus controller instead of client as parent device. Besides being logically wrong, it messed up with devm handling of input device. As a result we were leaving input device and event node behind after rmmod-ing the driver, which lead to a kernel oops if one were to access the event node later. Let's remove the assignment and rely on devm_input_allocate_device() to set it up properly for us. Signed-off-by: Jingkui Wang <jkwang@google.com> Fixes: 7132fe4f5687 ("Input: drv260x - add TI drv260x haptics driver") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: drv260x - fix initializing overdrive voltageDmitry Torokhov2016-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | We were accidentally initializing haptics->rated_voltage twice, and did not initialize overdrive voltage. Acked-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: drv2667 - fix misuse of regmap_update_bitsFlorian Vaussard2016-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using regmap_update_bits(..., mask, 1) with 'mask' following (1 << k) and k greater than 0 is wrong. Indeed, _regmap_update_bits will perform (mask & 1), which results in 0 if LSB of mask is 0. Thus the call regmap_update_bits(..., mask, 1) is in reality equivalent to regmap_update_bits(..., mask, 0). In such a case, the correct use is regmap_update_bits(..., mask, mask). This driver is performing such a mistake with the DRV2667_STANDBY mask, which equals (1 << 6). Fix the driver to make it consistent with the API, and fix the alignment problem at the same time. Please note that this change is untested, as I do not have this piece of hardware. Testers are welcome! Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: drv2665 - fix misuse of regmap_update_bitsFlorian Vaussard2016-11-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using regmap_update_bits(..., mask, 1) with 'mask' following (1 << k) and k greater than 0 is wrong. Indeed, _regmap_update_bits will perform (mask & 1), which results in 0 if LSB of mask is 0. Thus the call regmap_update_bits(..., mask, 1) is in reality equivalent to regmap_update_bits(..., mask, 0). In such a case, the correct use is regmap_update_bits(..., mask, mask). This driver is performing such a mistake with the DRV2665_STANDBY mask, which equals BIT(6). Fix the driver to make it consistent with the API, and fix the alignment problem at the same time. Please note that this change is untested, as I do not have this piece of hardware. Testers are welcome! Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> 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: bma150 - avoid binding to bma180 if IIO bma180 driver presentHans de Goede2016-11-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit ef3714fdbc8d ("Input: bma150 - extend chip detection for bma180"), adds bma180 chip-ids to the input bma150 driver, assuming that they are 100% compatible, but the bma180 is not compatible with the bma150 at all, it has 14 bits resolution instead of 10, and it has quite different control registers too. Treating the bma180 as a bma150 wrt its data registers will just result in throwing away the lowest 4 bits, which is not too bad. But the ctrl registers are a different story. Things happen to just work but supporting that certainly does not make treating the bma180 the same as the bma150 right. Since some setups depend on the evdev interface the bma150 driver offers on top of the bma180, we cannot simply remove the bma180 ids. So this commit only removes the bma180 id when the bma180 iio driver, which does treat the bma180 properly, is enabled. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: da9063 - fix module autoload when registered via OFJavier Martinez Canillas2016-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/input/misc/da9063_onkey.ko | grep alias alias: platform:da9063-onkey After this patch: $ modinfo drivers/input/misc/da9063_onkey.ko | grep alias alias: platform:da9063-onkey alias: of:N*T*Cdlg,da9062-onkeyC* alias: of:N*T*Cdlg,da9062-onkey alias: of:N*T*Cdlg,da9063-onkeyC* alias: of:N*T*Cdlg,da9063-onkey Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: da9061 - onkey driverSteve Twiss2016-10-272-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copyright header is updated to add DA9061 in its description and the module description macro is extended to include DA9061. Minor change to the code, alters dev_dbg() statements to report a generic "PMIC" instead of DA9063. This device driver is compatible with DA9061, DA9062 and DA9063. Kconfig is updated to reflect support for DA9061/62/63. Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Merge tag 'v4.8' into nextDmitry Torokhov2016-10-143-3/+26
| |\ \ | | | | | | | | | | | | | | | | Sync up with mainline to bring in I2C host notify changes and other updates.
* | \ \ Merge tag 'sound-4.10-rc1' of ↵Linus Torvalds2016-12-141-4/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "No dramatic changes are found in this development cycle, but as usual, many commits are applied in a wide range of drivers. Most of big changes are in ASoC, where a few bits of framework work and quite a lot of cleanups and improvements to existing code have been done. The rest are usual stuff, a few HD-audio and USB-audio quirks and fixes, as well as the drop of kthread usages in the whole subsystem. Below are some highlights: ASoC: - support for stereo DAPM controls - some initial work on the of-graph sound card - regmap conversions of the remaining AC'97 drivers - a new version of the topology ABI; this should be backward compatible - updates / cleanups of rsnd, sunxi, sti, nau8825, samsung, arizona, Intel skylake, atom-sst - new drivers for Cirrus Logic CS42L42, Qualcomm MSM8916-WCD, and Realtek RT5665 USB-audio: - yet another race fix at disconnection - tolerated packet size calculation for some Android devices - quirks for Axe-Fx II, QuickCam, TEAC 501/503 HD-audio: - improvement of Dell pin fixup mapping - quirks for HP Z1 Gen3, Alienware 15 R2 2016 and ALC622 headset mic Misc: - replace all kthread usages with simple works" * tag 'sound-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (296 commits) ALSA: hiface: Fix M2Tech hiFace driver sampling rate change ALSA: usb-audio: Eliminate noise at the start of DSD playback. ALSA: usb-audio: Add native DSD support for TEAC 501/503 DAC ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path ASoC: topology: avoid uninitialized kcontrol_type ALSA: usb-audio: Add QuickCam Communicate Deluxe/S7500 to volume_control_quirks ALSA: usb-audio: add implicit fb quirk for Axe-Fx II ASoC: zte: spdif: correct ZX_SPDIF_CLK_RAT define ASoC: zte: spdif and i2s drivers are not zx296702 specific ASoC: rsnd: setup BRGCKR/BRRA/BRRB when starting ASoC: rsnd: enable/disable ADG when suspend/resume timing ASoC: rsnd: tidyup ssi->usrcnt counter check in hw_params ALSA: cs46xx: add a new line ASoC: Intel: update bxt_da7219_max98357a to support quad ch dmic capture ASoC: nau8825: disable sinc filter for high THD of ADC ALSA: usb-audio: more tolerant packetsize ALSA: usb-audio: avoid setting of sample rate multiple times on bus ASoC: cs35l34: Simplify the logic to set CS35L34_MCLK_CTL setting ALSA: hda - Gate the mic jack on HP Z1 Gen3 AiO ALSA: hda: when comparing pin configurations, ignore assoc in addition to seq ...
| * | | | Input: arizona-haptics - Use SoC component pin control functionsRichard Fitzgerald2016-12-011-4/+9
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name of a codec pin can have an optional prefix string, which is defined by the SoC machine driver. The snd_soc_dapm_x_pin functions take the fully-specified name including the prefix and so the existing code would fail to find the pin if the audio machine driver had added a prefix. Switch to using the snd_soc_component_x_pin equivalent functions that take a specified SoC component and automatically add the name prefix to the provided pin name. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / | | xen: make use of xenbus_read_unsigned() in xen-kbdfrontJuergen Gross2016-11-071-8/+5Star
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use xenbus_read_unsigned() instead of xenbus_scanf() when possible. This requires to change the type of the reads from int to unsigned, but these cases have been wrong before: negative values are not allowed for the modified cases. Cc: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: David Vrabel <david.vrabel@citrix.com>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2016-10-075-31/+219
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input subsystem updates from Dmitry Torokhov: "You will get - a new driver for Elan eKTF2127 touchscreen controllers - a new "gpio-decoder" driver to read and report state of several GPIO lines - an ADC resistor ladder driver - the ft6326 driver is removed because edt-ft5x06 handles the same devices just fine. .. plus the regular slew of driver fixes/enhancements" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (26 commits) Input: elan_i2c - fix return tests of i2c_smbus_read_block_data() Input: ektf2127 - mark PM functions as __maybe_unused Input: snvs_pwrkey - drop input_free_device call if input_register_device fails Input: add support for Elan eKTF2127 touchscreen controller Input: serio - add hangup support Input: tps65218-pwrbutton - add support for tps65217 variant Input: jornada720_ts - get rid of mach/irqs.h and mach/hardware.h includes Input: jornada720_kbd - remove unneeded mach/hardware.h include Input: focaltech - mark focaltech_set_resolution() static Input: wdt87xx_i2c - fix the flash erase issue Input: gpio-keys-polled - don't use unit-address with button nodes Input: add generic input driver to read encoded GPIO lines Input: add ADC resistor ladder driver Input: pegasus_notetaker - directly include workqueue header Input: elants_i2c - get product id on recovery mode for FW update Input: wm97xx - remove deprecated create_singletheread_workqueue Input: mc13783_ts - remove deprecated create_singletheread_workqueue Input: psmouse - remove deprecated create_singletheread_workqueue Input: jornada720_kbd - switch to using dev_dbg Input: jornada720_kbd - get rid of mach/irqs.h include ...
| * | Input: tps65218-pwrbutton - add support for tps65217 variantMarcin Niestroj2016-09-102-29/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The power button found in tps65217 device is very similar to the tps65218, so let's enhance the driver to support both variants. This driver enables us to use tps65217's power button as KEY_POWER on am335x boards (directly connected button in chiliboard, accessible pin via expansion header in beaglebone). This patch has been tested with chiliboard. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: add generic input driver to read encoded GPIO linesVignesh R2016-08-303-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a driver to read group of GPIO lines and provide its status as a numerical value as input event to the system. This will help in interfacing devices, that can be connected over GPIOs, that provide input to the system by driving GPIO lines connected to them like a rotary dial or a switch. For example, a rotary switch can be connected to four GPIO lines. The status of the GPIO lines reflect the actual position of the rotary switch dial. For example, if dial points to 9, then the four GPIO lines connected to the switch will read HLLH(0b'1001 = 9). This value can be reported as an ABS_* event to the input subsystem. Signed-off-by: Vignesh R <vigneshr@ti.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: max77693-haptic - change Krzysztof Kozlowski's email to kernel.orgKrzysztof Kozlowski2016-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change my email address to kernel.org instead of Samsung one for the purpose of any future contact. The copyrights remain untouched and are attributed to Samsung. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | miscdevice: Add helper macro for misc device boilerplatePrasannaKumar Muralidharan2016-08-311-13/+2Star
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many modules call misc_register and misc_deregister in its module init and exit methods without any additional code. This ends up being boilerplate. This patch adds helper macro module_misc_device(), that replaces module_init()/ module_exit() with template functions. This patch also converts drivers to use new macro. Change since v1: Add device.h include in miscdevice.h as module_driver macro was not available from other include files in some architectures. Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>