aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-02-09Input: add driver for Zeitec ZET6223Jelle van der Waa5-0/+312
This is a basic driver for the Zeitec ZET6223 I2C touchscreen controllers. The driver does not support firmware loading, which is not required for all tablets which contain this chip. Signed-off-by: Jelle van der Waa <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-09Input: joydev - do not report stale values on first openRaphael Assenat1-5/+13
Postpone axis initialization to the first open instead of doing it in joydev_connect. This is to make sure the generated startup events are representative of the current joystick state rather than what it was when joydev_connect() was called, potentially much earlier. Once the first user is connected to joydev node we'll be updating joydev->abs[] values and subsequent clients will be getting correct initial states as well. This solves issues with joystick driven menus that start scrolling up each time they are started, until the user moves the joystick to generate events. In emulator menu setups where the menu program is restarted every time the game exits, the repeated need to move the joystick to stop the unintended scrolling gets old rather quickly... Signed-off-by: Raphael Assenat <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-09Input: synaptics-rmi4 - forward upper mechanical buttons to PS/2 guestBenjamin Tissoires3-16/+95
On the latest series of ThinkPads, the button events for the TrackPoint are reported through the touchpad itself as opposed to the TrackPoint device. In order to report these buttons properly, we need to forward them to the TrackPoint device and notify psmouse to send the button presses/releases. Signed-off-by: Lyude Paul <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-09Input: synaptics-rmi4 - clean up F30 implementationDmitry Torokhov1-182/+144
This patch does several cleanup changes to F30 code - switch to using BIT() macro - use DIV_ROUND_UP() where appropriate - factor out code setting up and reporting buttons - use single loop when reporting buttons: arithmetic is cheap compared to conditionals and associated branch misprediction. Tested-By: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-09Input: synaptics - use SERIO_OOB_DATA to handle trackstick buttonsDmitry Torokhov2-14/+13
Instead of using custom method of "passing" extended buttons from the touchpad to trackstick, let's switch to the newly introduced SERIO_OOB_DATA channel. Tested-By: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-09Input: psmouse - add a custom serio protocol to send extra informationBenjamin Tissoires3-6/+47
The tracksticks on the Lenovo thinkpads have their buttons connected through the touchpad device. We already fixed that in synaptics.c, but when we switch the device into RMI4 mode to have proper support, the pass-through functionality can't deal with them easily. We add a new PS/2 flag and protocol designed for psmouse. The RMI4 F03 pass-through can then emit a special set of commands to notify psmouse the state of the buttons. This patch implements the protocol in psmouse, while an other will do the same for rmi4-f03. Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-07Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()Wei Yongjun1-1/+1
Fix to return error code -ENOMEM from the devm_kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions from probe") Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-06Input: xpad - restore LED state after device resumeCameron Gutman1-1/+10
Set the LED_CORE_SUSPENDRESUME flag on our LED device so the LED state will be automatically restored by LED core on resume. Since Xbox One pads stop flashing only when reinitialized, we'll send them the initialization packet so they calm down too. Signed-off-by: Cameron Gutman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-06Merge branch 'synaptics-rmi4' into nextDmitry Torokhov10-57/+268
Bring in latest RMI4 support in preparation to the merge window.
2017-02-06Input: synaptics-rmi4 - add rmi_find_function()Benjamin Tissoires2-0/+14
If a function needs to communicate with an other, it's better to have a way to retrieve this other. Reviewed-by: Andrew Duggan <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-06Input: xpad - fix stuck mode button on Xbox One S padCameron Gutman1-0/+33
The Xbox One S requires an ack to its mode button report, otherwise it continuously retransmits the report. This makes the mode button appear to be stuck down after it is pressed for the first time. Signed-off-by: Cameron Gutman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-01Input: joydev - use clamp() macroDmitry Torokhov1-1/+1
We have a nice macro ensuring that the value is within certain range, let's use it instead of open-coding. Signed-off-by: Dmitry Torokhov <[email protected]>
2017-02-01Input: refuse to register absolute devices without absinfoDmitry Torokhov1-0/+6
If device is supposed to send absolute events (i.e. EV_ABS bit is set in dev->evbit) but dev->absinfo is not allocated, then the driver has done something wrong, and we should not register such device. Otherwise we'll crash later, when driver tries to send absolute event. Reviewed-by: Benjamin Tissoires <[email protected]> Acked-by: Jiri Kosina <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-31Input: synaptics-rmi4 - add sysfs interfaces for hardware IDsNick Dyer4-4/+152
These attributes provide various bits of information which may be enumerated under the RMI4 protocol to user space. This may be useful for displaying the particular version which is in use, or selecting the correct firmware to flash. Signed-off-by: Nick Dyer <[email protected]> Tested-by: Chris Healy <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-31Input: synaptics-rmi4 - add sysfs attribute update_fw_statusNick Dyer3-27/+80
The attribute returns the percentage complete. If the firmware update fails, it reports a negative error code. Signed-off-by: Nick Dyer <[email protected]> Tested-by: Chris Healy <[email protected]> Acked-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-31Input: mousedev - stop offering PS/2 to userspace by defaultDmitry Torokhov1-3/+0
Evdev interface has been available for many years and by now everyone is switched to using it, so let's stop offering /dev/input/mouseN and /dev/psaux by default. Acked-by: Jiri Kosina <[email protected]> Acked-by: Peter Hutterer <[email protected]> Acked-by: Benjamin Tissoires <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-31Input: tca8418 - switch to using generic device propertiesDmitry Torokhov2-108/+26
Let's drop legacy platform data support (there are no users in mainline) and switch to using generic device properties, which will make the driver simpler (non-OF boards can use property sets to describe hardware). Reviewed-by: Maxime Ripard <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-31Input: matrix-keypad - switch to using generic device propertiesDmitry Torokhov12-84/+73
Instead of being OF-specific, let's switch to using generic device properties, which will make this code usable on ACPI, device tree and legacy boards that use property sets. As part of the change let's rename matrix_keypad_parse_of_params() to matrix_keypad_parse_properties(). Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-31Input: delete MPU3050 driverLinus Walleij3-492/+0
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]>
2017-01-24Input: constify device_type structuresBhumika Goyal2-3/+3
Declare device_type structures as const as they are only stored in the type field of a device structure. This field is of type const, so add const to declaration of device_type structures. File size before: text data bss dec hex filename 17184 1344 80 18608 48b0 drivers/input/input.o File size after: text data bss dec hex filename 17248 1280 80 18608 48b0 drivers/input/input.o File size before: text data bss dec hex filename 2355 384 8 2747 abb drivers/input/rmi4/rmi_bus.o File size after: text data bss dec hex filename 2483 264 8 2755 ac3 drivers/input/rmi4/rmi_bus.o Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-24Merge tag 'v4.10-rc5' into nextDmitry Torokhov17709-563501/+1335392
Sync up with mainline to bring up improvements in various subsystems.
2017-01-22Input: touchscreen - drop unnecessary calls to input_set_drvdataGuenter Roeck6-9/+0
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]>
2017-01-22Input: dm355evm_keys - drop unnecessary call to input_set_drvdataGuenter Roeck1-2/+0
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]>
2017-01-22Input: mouse - drop unnecessary calls to input_set_drvdataGuenter Roeck2-3/+0
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]>
2017-01-22Input: maplecontrol - drop unnecessary call to input_set_drvdataGuenter Roeck1-1/+0
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]>
2017-01-22Input: keyboard - drop unnecessary calls to input_set_drvdataGuenter Roeck6-11/+0
If 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]>
2017-01-22Input: i8042 - add dbg msg when a command can't write its parameterMarcos Paulo de Souza1-2/+4
This can happen in cases like bug #102951[1], so add a proper debug msg as done in wait_read. Also, change wait_read debug message to differ from wait_write. [1] https://bugzilla.kernel.org/show_bug.cgi?id=102951 Signed-off-by: Marcos Paulo de Souza <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-22Input: max11801_ts - drop call to input_set_drvdata()Dmitry Torokhov1-1/+0
Nobody calls input_get_drvdata() so setting it is not required. Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-22Linux 4.10-rc5Linus Torvalds1-2/+2
2017-01-22Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Thomas Gleixner: "Restore the retrigger callbacks in the IO APIC irq chips. That addresses a long standing regression which got introduced with the rewrite of the x86 irq subsystem two years ago and went unnoticed so far" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Restore IO-APIC irq_chip retrigger callback
2017-01-22Merge branch 'smp-urgent-for-linus' of ↵Linus Torvalds1-2/+0
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull smp/hotplug fix from Thomas Gleixner: "Remove an unused variable which is a leftover from the notifier removal" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Remove unused but set variable in _cpu_down()
2017-01-22Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds5-7/+45
Pull virtio/vhost fixes from Michael Tsirkin: "Random fixes and cleanups that accumulated over the time" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio/s390: virtio: constify virtio_config_ops structures virtio/s390: add missing \n to end of dev_err message virtio/s390: support READ_STATUS command for virtio-ccw tools/virtio/ringtest: tweaks for s390 tools/virtio/ringtest: fix run-on-all.sh for offline cpus virtio_console: fix a crash in config_work_handler vhost/scsi: silence uninitialized variable warning vhost: scsi: constify target_core_fabric_ops structures
2017-01-22Merge branch 'for-rc' of ↵Linus Torvalds3-75/+108
git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management fixes from Zhang Rui: - fix a regression that thermal zone dynamically allocated sysfs attributes are freed before they're removed, which is introduced in 4.10-rc1 (Jacob von Chorus) - fix a boot warning because deprecated hwmon API is used (Fabio Estevam) - a couple of fixes for rockchip thermal driver (Brian Norris, Caesar Wang) * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: rockchip: fixes the conversion table thermal: core: move tz->device.groups cleanup to thermal_release thermal: thermal_hwmon: Convert to hwmon_device_register_with_info() thermal: rockchip: handle set_trips without the trip points thermal: rockchip: optimize the conversion table thermal: rockchip: fixes invalid temperature case thermal: rockchip: don't pass table structs by value thermal: rockchip: improve conversion error messages
2017-01-22Input: pwm-beeper - switch to using "atomic" PWM APIDmitry Torokhov1-9/+17
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]>
2017-01-22Input: pwm-beeper - add optional amplifier regulatorDavid Lechner2-13/+66
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]>
2017-01-22Input: pwm-beeper - suppress error message on probe deferDavid Lechner1-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 <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-22Input: pwm-beeper - fix race when suspendingDmitry Torokhov1-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 <[email protected]> Tested-by: David Lechner <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-22Input: pwm-beeper - use input_set_capability()Dmitry Torokhov1-2/+2
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]>
2017-01-22Input: pwm-beeper - switch to using managed resourcesDmitry Torokhov1-34/+10
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]>
2017-01-22Input: pwm-beeper - remove calls to legacy pwm_request APIDmitry Torokhov1-6/+0
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]>
2017-01-21Input: synaptics-rmi4 - use local variables consistentlyGuenter Roeck2-4/+4
If a function declares a variable to access a structure element, use it conssistently. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2017-01-21Input: misc - drop empty remove functionsGuenter Roeck5-30/+0
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]>
2017-01-21Input: serio - drop unnecessary calls to device_init_wakeupGuenter Roeck1-1/+0
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]>
2017-01-21Input: touchscreen - drop unnecessary calls to device_init_wakeupGuenter Roeck5-7/+0
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]>
2017-01-21Input: misc - drop unnecessary calls to device_init_wakeupGuenter Roeck7-11/+0
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]>
2017-01-21Input: keyboard - drop unnecessary calls to device_init_wakeupGuenter Roeck5-11/+0
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]>
2017-01-21Input: touchscreen - use local variables consistentlyGuenter Roeck6-8/+7
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]>
2017-01-21Input: mouse - use local variables consistentlyGuenter Roeck9-42/+31
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]>
2017-01-21Input: misc - use local variables consistentlyGuenter Roeck3-7/+6
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]>
2017-01-21Input: keyboard - use local variables consistentlyGuenter Roeck4-27/+25
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]>