| Age | Commit message (Collapse) | Author | Files | Lines |
|
Add pm8xxx_regs for this PMIC and the device tree match table entry.
Signed-off-by: Damien Riegel <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Some PMIC vibrator IPs use a separate enable register to turn the
vibrator on and off. To detect if a vibrator uses this feature, rely on
the enable_mask being non-zero.
Signed-off-by: Damien Riegel <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
In order to prepare this driver to support other vibrators of the same
kind, move some hardcoded values to a structure holding register
parameters (address, mask, shit of the control register).
Signed-off-by: Damien Riegel <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Signed-off-by: Damien Riegel <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Sync up with mainline to bring in changes to input subsystem merged
through other trees.
|
|
This essentially reverts commit baf28d91e7b1 ("Input: bma150 - avoid
binding to bma180 if IIO bma180 driver present") and commit ef3714fdbc8d
("Input: bma150 - extend chip detection for bma180")
Rationale: initially (2012) the GTA04 device using a bma180 chip simply
referenced the bma150 platform driver in its board file [1] which happened
to work in all scenarios that were tested.
When conversion to DT started (2014), we needed to make the driver be still
recognised. Hence we introduced the compatibility to the bma180 chip in
Linux 3.15-rc5 [2] without further checks if it is really 100% compatible.
This worked flawlessly for years with the GTA04 device.
Recently (2016), Hans de Goede pointed out that the chips are not as
similar as they appeared and the driver works with the bma180 for the GTA04
only by good luck. He proposed to remove the bma180 support completely [3],
but we still did need it until we have a replacement. Thus, a conditional
compile was added.
We have now developed a generic iio-input-bridge which works with any 2 or
3 axis iio based accelerometer. It has been tested on GTA04 and Pyra and
works as expected. Therefore we can remove the bma180 support from this
driver completely. User-space API compatibility can be restored by using
the iio-input-bridge.
Maybe it is time to convert the bma150 driver to iio as well and retire the
accelerometer input drivers completely but this is a different story and
task.
[1]: https://github.com/neilbrown/linux/blob/gta04/3.2.y/arch/arm/mach-omap2/board-omap3gta04.c#L976
[2]: https://patchwork.kernel.org/patch/3961171/
[3]: https://patchwork.kernel.org/patch/9325481/
Signed-off-by: H. Nikolaus Schaller <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
To enable eventual removal of pr_warning
This makes pr_warn use consistent for drivers/input
Prior to this patch, there were 8 uses of pr_warning and
17 uses of pr_warn in drivers/input
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Windows 10 tablets with gpio buttons will typically use the ACPI 6.0
Generic Button Device with a HID of ACPI0011 for these buttons.
The ACPI description for these in the ACPI0011 devices _DSD object uses
something resembling HID descriptors, except that instead of indicating
a bit index into a HID input report, the index indicates the _CRS index
for the GPIO.
The use of 1 interrupt per button, some of which need to be wakeup
sources, instead of using input reports makes it impossible to use the
HID subsystem for this.
This really is just another gpio-keys input device with the platform
data described in ACPI, so this commit adds parsing for this new way
to describe gpio-keys to the soc_button_array driver.
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Count how much gpio_keys we actually need, this is a preparation patch
for adding support for the new Win10 / ACPI-6.0 "Generic Buttons Device"
support.
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer should a malicious device lack endpoints.
Fixes: aca951a22a1d ("[PATCH] input-driver-yealink-P1K-usb-phone")
Signed-off-by: Johan Hovold <[email protected]>
Cc: [email protected] # 2.6.14
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer should a malicious device lack control-interface endpoints.
Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
Signed-off-by: Johan Hovold <[email protected]>
Cc: [email protected] # 3.10
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer should a malicious device lack endpoints.
Fixes: c04148f915e5 ("Input: add driver for USB VoIP phones with CM109...")
Signed-off-by: Johan Hovold <[email protected]>
Cc: [email protected] # 2.6.28
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Since gpiod_count() does not return 0 anymore, we don't need to shadow
its error code and would safely propagate to the user.
While here, replace second parameter by NULL in order to prevent side
effects on _DSD enabled firmware.
Cc: Benjamin Tissoires <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Using devm_* APIs simpifies error handling and device teardown.
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Now that sparse keymap uses managed memory, we no longer need to clean it
up manually.
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Now that sparse keymap uses managed memory, we no longer need to clean it
up manually.
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
This brings in version of sparse keymap code that uses managed memory.
|
|
The gpiolib-acpi code is becoming more strict and connection-IDs
may only be used with devices which have a _DSD with matching IDs
in there. Since the soc_button_array ACPI binding is pure index
based pass in NULL as connection-ID to avoid the more strict cheks
resulting in gpiod_count and gpiod_get_index not returning any gpios.
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
On some systems (Intel tablets with axp288 pmic) the powerbutton is
also connected to a gpio pin of the SoC, advertised through the
"INTCFD9" / "PNP0C40" acpi device. This leads to double reporting
of powerbutton events, which is undesirable, so one driver needs
to not report input events in this case.
Since the soc_button_array driver for the "PNP0C40" acpi device
also handles wake from suspend on these tablets and since the
axp20x-pel driver requires relative expensive i2c accrsses,
it is best for the axp20x-pek driver to not register an input device
in this case.
Note that this commit leaves the axp20x-driver bound to the
device, rather then returning -ENODEV, this is done so that the
sysfs attributes it offers are kept around.
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Move all input device related initialization into a new
axp20x_pek_probe_input_device helper function.
This introduces one functional change, the input device is now
registered before the sysfs attr get registered. This is not a problem
as the sysfs attr are to configure some long press settings (forced
poweroff) in the hardware and do not interact with the input_device.
This is a preparation patch for not always registering the input dev.
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Before this commit axp20x-pek was mixing 2 style error reporting calls:
dev_err(&pdev->dev, ...);
dev_err(axp20x->dev, ...);
But the second is our parent device, not our own device, so switch to
using &pdev->dev everywhere.
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
As the driver is using generic device properties, it should work
properly when CONFIG_OF is turned off. This patch removes the
ifdef CONFIGOF and make sure the driver always have of_match_table.
Signed-off-by: Jingkui Wang <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Extend the pwm-beeper driver to support customized frequency for SND_BELL
from device properties.
Signed-off-by: Guan Ben <[email protected]>
Signed-off-by: Mark Jonas <[email protected]>
Signed-off-by: Heiko Schocher <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Prepare input updates for 4.11 merge window.
|
|
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 <[email protected]>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191811
Fixes: fbae10db0940 ("Input: uinput - rework ABS validation")
Reviewed-by: Benjamin Tissoires <[email protected]>
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Sync up with mainline to bring up improvements in various subsystems.
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
The "atomic" API allows us to configure PWM period and duty cycle and
enable it in one call.
Reviewed-by: Thierry Reding <[email protected]>
Tested-by: David Lechner <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Thierry Reding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Tested-by: David Lechner <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Instead of manipulating capability bits directly, let's use
input_set_capability() API.
Reviewed-by: Thierry Reding <[email protected]>
Tested-by: David Lechner <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Use of managed resources (devm) simplifies error handling and tear down
of the driver.
Reviewed-by: Thierry Reding <[email protected]>
Tested-by: David Lechner <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Tested-by: David Lechner <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Empty remove functions don't serve a useful purpose and can be removed.
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
If a function declares a variable to access a structure element,
use it consistently.
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Use local variable 'dev' instead of dereferencing it several times.
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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
|
|
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 <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Acked by: Albert Zhang <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|