20 Jan, 2017

1 commit

  • commit 41c567a5d7d1a986763e58c3394782813c3bcb03 upstream.

    Avoid AUX loopback in Pegatron C15B touchpad, so input subsystem is able
    to recognize a Synaptics touchpad in the AUX port.

    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=93791
    (Touchpad is not detected on DNS 0801480 notebook (PEGATRON C15B))

    Suggested-by: Dmitry Torokhov
    Signed-off-by: Marcos Paulo de Souza
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Marcos Paulo de Souza
     

20 Oct, 2016

1 commit

  • The Schenker XMG C504 is a rebranded Gigabyte P35 v2 laptop.
    Therefore it also needs a keyboard reset to detect the Elantech touchpad.
    Otherwise the touchpad appears to be dead.

    With this patch the touchpad is detected:

    $ dmesg | grep -E "(i8042|Elantech|elantech)"

    [ 2.675399] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
    [ 2.680372] i8042: Attempting to reset device connected to KBD port
    [ 2.789037] serio: i8042 KBD port at 0x60,0x64 irq 1
    [ 2.791586] serio: i8042 AUX port at 0x60,0x64 irq 12
    [ 2.813840] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
    [ 3.811431] psmouse serio1: elantech: assuming hardware version 4 (with firmware version 0x361f0e)
    [ 3.825424] psmouse serio1: elantech: Synaptics capabilities query result 0x00, 0x15, 0x0f.
    [ 3.839424] psmouse serio1: elantech: Elan sample query result 03, 58, 74
    [ 3.911349] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input6

    Signed-off-by: Patrick Scheuring
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Patrick Scheuring
     

14 Oct, 2016

1 commit


12 Oct, 2016

1 commit

  • On suspend/resume cycle, selftest is executed to reset i8042 controller.
    But when this is done in Asus devices, subsequent calls to detect/init
    functions to elantech driver fails. Skipping selftest fixes this problem.

    An easier step to reproduce this problem is adding i8042.reset=1 as a
    kernel parameter. On Asus laptops, it'll make the system to start with the
    touchpad already stuck, since psmouse_probe forcibly calls the selftest
    function.

    This patch was inspired by John Hiesey's change[1], but, since this problem
    affects a lot of models of Asus, let's avoid running selftests on them.

    All models affected by this problem:
    A455LD
    K401LB
    K501LB
    K501LX
    R409L
    V502LX
    X302LA
    X450LCP
    X450LD
    X455LAB
    X455LDB
    X455LF
    Z450LA

    [1]: https://marc.info/?l=linux-input&m=144312209020616&w=2

    Fixes: "ETPS/2 Elantech Touchpad dies after resume from suspend"
    (https://bugzilla.kernel.org/show_bug.cgi?id=107971)

    Signed-off-by: Marcos Paulo de Souza
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Marcos Paulo de Souza
     

04 Oct, 2016

1 commit


21 Sep, 2016

1 commit

  • The Pulse-Eight USB CEC adapter is a usb device that shows up as a ttyACM0
    device. It requires that you run inputattach in order to communicate with
    it via serio.

    This all works well, but it would be nice to have a udev rule to
    automatically start inputattach. That too works OK, but the problem comes
    when the USB device is unplugged: the tty hangup is never handled by the
    serio framework so the inputattach utility never exits and you have to kill
    it manually.

    By adding this hangup callback the inputattach utility now properly exits
    as soon as the USB device is unplugged.

    The udev rule I used on my Debian sid system is:

    SUBSYSTEM=="tty", KERNEL=="ttyACM[0-9]*", ATTRS{idVendor}=="2548", ATTRS{idProduct}=="1002", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="pulse8-cec-inputattach@%k.service"

    And /etc/systemd/system/pulse8-cec-inputattach@.service is as follows:

    ===============================================================
    [Unit]
    Description=inputattach for pulse8-cec device on %I

    [Service]
    Type=simple
    ExecStart=/usr/local/bin/inputattach --pulse8-cec /dev/%I
    KillMode=process
    ===============================================================

    Signed-off-by: Hans Verkuil
    Tested-by: Hans Verkuil
    Signed-off-by: Dmitry Torokhov

    Hans Verkuil
     

20 Aug, 2016

1 commit

  • The commit 4097461897df ("Input: i8042 - break load dependency ...")
    correctly set up ps2_cmd_mutex pointer for the KBD port but forgot to do
    the same for AUX port(s), which results in communication on KBD and AUX
    ports to clash with each other.

    Fixes: 4097461897df ("Input: i8042 - break load dependency ...")
    Reported-by: Bruno Wolff III
    Tested-by: Bruno Wolff III
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

28 Jul, 2016

1 commit

  • As explained in 1407814240-4275-1-git-send-email-decui@microsoft.com we
    have a hard load dependency between i8042 and atkbd which prevents
    keyboard from working on Gen2 Hyper-V VMs.

    > hyperv_keyboard invokes serio_interrupt(), which needs a valid serio
    > driver like atkbd.c. atkbd.c depends on libps2.c because it invokes
    > ps2_command(). libps2.c depends on i8042.c because it invokes
    > i8042_check_port_owner(). As a result, hyperv_keyboard actually
    > depends on i8042.c.
    >
    > For a Generation 2 Hyper-V VM (meaning no i8042 device emulated), if a
    > Linux VM (like Arch Linux) happens to configure CONFIG_SERIO_I8042=m
    > rather than =y, atkbd.ko can't load because i8042.ko can't load(due to
    > no i8042 device emulated) and finally hyperv_keyboard can't work and
    > the user can't input: https://bugs.archlinux.org/task/39820
    > (Ubuntu/RHEL/SUSE aren't affected since they use CONFIG_SERIO_I8042=y)

    To break the dependency we move away from using i8042_check_port_owner()
    and instead allow serio port owner specify a mutex that clients should use
    to serialize PS/2 command stream.

    Reported-by: Mark Laws
    Tested-by: Mark Laws
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

24 Jun, 2016

1 commit


11 Feb, 2016

1 commit

  • Pull input updates from Dmitry Torokhov:
    "Just small driver fixups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: colibri-vf50-ts - add missing #include
    Input: adp5589 - fix row 5 handling for adp5589
    Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree
    Input: vmmouse - fix absolute device registration
    Input: serio - drop warnings in case of EPROBE_DEFER from serio_find_driver()
    Input: cap11xx - add missing of_node_put
    Input: sirfsoc-onkey - allow modular build
    Input: xpad - remove unused function

    Linus Torvalds
     

28 Jan, 2016

1 commit

  • Now serio_find_driver() will print warnings in case device_attach()
    returns -EPROBE_DEFER. Those warnings are obsolete, in genral, because:
    - DD core can report the same if required
    - since commit 013c074f8642 ("PM / sleep: prohibit devices probing
    during suspend/hibernation") the devices probing is prohibited during
    System suspend and deferred device will be carefully reprobed once
    Resume is finished.

    Hence, drop warnings in case of EPROBE_DEFER from serio_find_driver().

    Signed-off-by: Grygorii Strashko
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Dmitry Torokhov

    Grygorii Strashko
     

14 Jan, 2016

2 commits

  • Pull input updates from Dmitry Torokhov:
    - new driver for eGalaxTouch serial touchscreen
    - new driver for TS-4800 touchscreen
    - an update for Goodix touchscreen driver
    - PS/2 mouse module was reworked to limit number of protocols we try on
    pass-through ports to speed up their detection time
    - wacom_w8001 touchscreen driver now reports pen and touch via separate
    instances of input devices
    - other driver changes

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (42 commits)
    Input: elantech - mark protocols v2 and v3 as semi-mt
    Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE
    Input: gpio-keys - fix check for disabling unsupported keys
    Input: omap-keypad - remove dead check
    Input: ti_am335x_tsc - fix HWPEN interrupt handling
    Input: omap-keypad - set tasklet data earlier
    Input: rohm_bu21023 - fix handling of retrying firmware update
    Input: ALPS - report v3 pinnacle trackstick device only if is present
    Input: ALPS - detect trackstick presence for v7 protocol
    Input: pcap_ts - use to_delayed_work
    Input: bma150 - constify bma150_cfg structure
    Input: i8042 - add Fujitsu Lifebook U745 to the nomux list
    Input: egalax_ts_serial - fix potential NULL dereference on error
    Input: uinput - sanity check on ff_effects_max and EV_FF
    Input: uinput - rework ABS validation
    Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl
    Input: goodix - use "inverted_[xy]" flags instead of "rotated_screen"
    Input: goodix - add axis swapping and axis inversion support
    Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send
    Input: goodix - add power management support
    ...

    Linus Torvalds
     
  • Pull char/misc updates from Greg KH:
    "Here's the big set of char/misc patches for 4.5-rc1.

    Nothing major, lots of different driver subsystem updates, full
    details in the shortlog. All of these have been in linux-next for a
    while"

    * tag 'char-misc-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (71 commits)
    mei: fix fasync return value on error
    parport: avoid assignment in if
    parport: remove unneeded space
    parport: change style of NULL comparison
    parport: remove unnecessary out of memory message
    parport: remove braces
    parport: quoted strings should not be split
    parport: code indent should use tabs
    parport: fix coding style
    parport: EXPORT_SYMBOL should follow function
    parport: remove trailing white space
    parport: fix a trivial typo
    coresight: Fix a typo in Kconfig
    coresight: checking for NULL string in coresight_name_match()
    Drivers: hv: vmbus: Treat Fibre Channel devices as performance critical
    Drivers: hv: utils: fix hvt_op_poll() return value on transport destroy
    Drivers: hv: vmbus: fix the building warning with hyperv-keyboard
    extcon: add Maxim MAX3355 driver
    Drivers: hv: ring_buffer: eliminate hv_ringbuffer_peek()
    Drivers: hv: remove code duplication between vmbus_recvpacket()/vmbus_recvpacket_raw()
    ...

    Linus Torvalds
     

12 Jan, 2016

1 commit


03 Jan, 2016

1 commit

  • Without i8042.nomux=1 the Elantech touch pad is not working at all on
    a Fujitsu Lifebook U745. This patch does not seem necessary for all
    U745 (maybe because of different BIOS versions?). However, it was
    verified that the patch does not break those (see opensuse bug 883192:
    https://bugzilla.opensuse.org/show_bug.cgi?id=883192).

    Signed-off-by: Aurélien Francillon
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Aurélien Francillon
     

22 Dec, 2015

1 commit

  • With the recent change af3ff643ea91ba64dd8d0b1cbed54d44512f96cd
    (Drivers: hv: vmbus: Use uuid_le type consistently), we always get this
    warning:

    CC [M] drivers/input/serio/hyperv-keyboard.o
    drivers/input/serio/hyperv-keyboard.c:427:2: warning: missing braces around
    initializer [-Wmissing-braces]
    { HV_KBD_GUID, },
    ^
    drivers/input/serio/hyperv-keyboard.c:427:2: warning: (near initialization
    for .id_table[0].guid.b.) [-Wmissing-braces]

    The patch fixes the warning.

    Signed-off-by: Dexuan Cui
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Dexuan Cui
     

20 Dec, 2015

1 commit

  • Pull input fixes from Dmitry Torokhov:
    "Just a few assorted driver fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: elants_i2c - fix wake-on-touch
    Input: elan_i2c - set input device's vendor and product IDs
    Input: sun4i-lradc-keys - fix typo in binding documentation
    Input: atmel_mxt_ts - add maxtouch to I2C table for module autoload
    Input: arizona-haptic - fix disabling of haptics device
    Input: aiptek - fix crash on detecting device without endpoints
    Input: atmel_mxt_ts - add generic platform data for Chromebooks
    Input: parkbd - clear unused function pointers
    Input: walkera0701 - clear unused function pointers
    Input: turbografx - clear unused function pointers
    Input: gamecon - clear unused function pointers
    Input: db9 - clear unused function pointers

    Linus Torvalds
     

18 Nov, 2015

1 commit

  • parkbd_parport_cb is a local uninitialized structure and the member
    function pointers will be pointing to arbitrary locations unless they
    are cleared.

    Fixes: 33ca8ab97cbb ("Input: parkbd - use parallel port device model")
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Dmitry Torokhov

    Sudip Mukherjee
     

14 Nov, 2015

1 commit

  • Pull more input updates from Dmitry Torokhov:
    "An update to the tsc2005 driver that allows it to also support tsc2004
    (basically the same controller, but uses i2c instead of spi bus), and
    a couple of bug fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: parkbd - drop bogus __init from parkbd_allocate_serio()
    Input: elantech - add Fujitsu Lifebook U745 to force crc_enabled
    Input: tsc2004 - add support for tsc2004
    Input: tsc200x-core - rename functions and variables
    Input: tsc2005 - separate SPI and core functions

    Linus Torvalds
     

10 Nov, 2015

1 commit

  • WARNING: vmlinux.o(.text+0x1056606): Section mismatch in reference from the function parkbd_attach() to the function .init.text:parkbd_allocate_serio()
    The function parkbd_attach() references
    the function __init parkbd_allocate_serio().
    This is often because parkbd_attach lacks a __init
    annotation or the annotation of parkbd_allocate_serio is wrong.

    Commit 33ca8ab97cbb676d ("Input: parkbd - use parallel port device
    model") dropped the __init attribute from the sole caller of
    parkbd_allocate_serio(), but forgot to remove it from
    parkbd_allocate_serio() itself.

    Fixes: 33ca8ab97cbb676d ("Input: parkbd - use parallel port device model")
    Signed-off-by: Geert Uytterhoeven
    Acked-by: Sudip Mukherjee
    Signed-off-by: Dmitry Torokhov

    Geert Uytterhoeven
     

07 Nov, 2015

1 commit

  • Pull input updates from Dmitry Torokhov:
    "Items of note:

    - evdev users can now limit or mask the kind of events they will
    receive. This will allow applications such as power manager or
    network manager to only be woken when user presses special keys
    such as KEY_POWER or KEY_WIFI and not be bothered with ordinary
    key presses coming from keyboard

    - support for FocalTech FT6236 touchscreen controller

    - support for ROHM BU21023/24 touchscreen controller

    - edt-ft5x06 touchscreen driver got a face lift and can now be used
    with FT5506

    - support for Google Fiber TV Box remote controls

    - improvements in xpad driver (with more to come)

    - several parport-based drivers have been switched to the new device
    model

    - other miscellaneous driver improvements"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (70 commits)
    HID: hid-gfrm: avoid warning for input_configured API change
    HID: hid-input: allow input_configured callback return errors
    Input: evdev - fix bug in checking duplicate clock change request
    Input: add userio module
    Input: evdev - add event-mask API
    Input: snvs_pwrkey - remove duplicated semicolon
    HID: hid-gfrm: Google Fiber TV Box remote controls
    Input: e3x0-button - update Kconfig description
    Input: tegra-kbc - drop use of IRQF_NO_SUSPEND flag
    Input: tegra-kbc - enable support for the standard "wakeup-source" property
    Input: xen - check return value of xenbus_printf
    Input: hp_sdc_rtc - fix y2038 problem in proc_show
    Input: nomadik-ske-keypad - fix a trivial typo
    Input: xpad - fix clash of presence handling with LED setting
    Input: edt-ft5x06 - work around FT5506 firmware bug
    Input: edt-ft5x06 - add support for FT5506
    Input: edt-ft5x06 - add support for different max support points
    Input: edt-ft5x06 - use max support points to determine how much to read
    Input: rotary-encoder - add support for quarter-period mode
    Input: rotary-encoder - use of_property_read_bool
    ...

    Linus Torvalds
     

28 Oct, 2015

1 commit

  • Debugging input devices, specifically laptop touchpads, can be tricky
    without having the physical device handy. Here we try to remedy that
    with userio. This module allows an application to connect to a character
    device provided by the kernel, and emulate any serio device. In
    combination with userspace programs that can record PS/2 devices and
    replay them through the /dev/userio device, this allows developers to
    debug driver issues on the PS/2 level with devices simply by requesting
    a recording from the user experiencing the issue without having to have
    the physical hardware in front of them.

    Signed-off-by: Stephen Chandler Paul
    Reviewed-by: David Herrmann
    Signed-off-by: Dmitry Torokhov

    Stephen Chandler Paul
     

14 Oct, 2015

1 commit

  • If the upcoming system suspend is not going to be handled by the
    platform firmware, like in the suspend-to-idle case, it is not
    necessary to reset the controller in i8042_pm_suspend(), so avoid
    doing that.

    Moreover, if the system resume currently in progress has not been
    started by the platform firmware, like in the suspend-to-idle case,
    i8042_controller_resume() need not be called by i8042_pm_resume(),
    so avoid doing that too in that case.

    Additionally, try to catch the event that woke up the system by
    calling the interrupt handler early during system resume if it has
    not been started by the platform firmware.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Dmitry Torokhov

    Rafael J. Wysocki
     

06 Oct, 2015

1 commit


30 Sep, 2015

1 commit

  • The data race happens on ps2dev->cmdcnt and ps2dev->cmdbuf contents.
    __ps2_command reads that data concurrently with the interrupt handler. As
    the result, for example, if a response arrives just after the timeout,
    __ps2_command can copy out garbage from ps2dev->cmdbuf but then see that
    ps2dev->cmdcnt is 0 and return success.

    Stop the interrupt handler with serio_pause_rx() before reading the
    results.

    The data race was found with KernelThreadSanitizer (KTSAN).

    Signed-off-by: Dmitry Vyukov
    Signed-off-by: Dmitry Torokhov

    Dmitry Vyukov
     

28 Sep, 2015

1 commit

  • If parkbd_allocate_serio() fails to allocate memory we are releasing the
    parport but we missed unregistering the device. As a result this device
    with exclusive access to that parport remains registered. And no other
    device will be able to use that parport even though this driver has
    failed to load.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Dmitry Torokhov

    Sudip Mukherjee
     

06 Sep, 2015

1 commit


21 Jul, 2015

1 commit


17 Jul, 2015

2 commits

  • The legacy system PM support has long time ago been dropped from the
    AMBA bus. Align to that by converting to the modern system PM
    callbacks.

    Fixes: 26825cfd90f9 (ARM: 7914/1: amba: Drop legacy PM support ...)
    Signed-off-by: Ulf Hansson
    Signed-off-by: Dmitry Torokhov

    Ulf Hansson
     
  • A big problem with the current i8042 debugging option is that it outputs
    data going to and from the keyboard by default. As a result, many dmesg
    logs uploaded by users will unintentionally contain sensitive information
    such as their password, as such it's probably a good idea not to output
    data coming from the keyboard unless specifically enabled by the user.

    Signed-off-by: Stephen Chandler Paul
    Reviewed-by: Andreas Mohr
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    Stephen Chandler Paul
     

04 Jul, 2015

1 commit

  • Pull second round of input updates from Dmitry Torokhov:
    "A new driver for Weida wdt87xx touch controllers, and a bunch of
    fixups for other drivers"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: wdt87xx_i2c - add a scaling factor for TOUCH_MAJOR event
    Input: wdt87xx_i2c - remove stray newline in diagnostic message
    Input: arc_ps2 - add HAS_IOMEM dependency
    Input: wdt87xx_i2c - fix format warning
    Input: improve parsing OF parameters for touchscreens
    Input: edt-ft5x06 - mark as direct input device
    Input: use for_each_set_bit() where appropriate
    Input: add a driver for wdt87xx touchscreen controller
    Input: axp20x-pek - fix reporting button state as inverted
    Input: xpad - re-send LED command on present event
    Input: xpad - set the LEDs properly on XBox Wireless controllers
    Input: imx_keypad - check for clk_prepare_enable() error

    Linus Torvalds
     

30 Jun, 2015

1 commit


07 May, 2015

1 commit

  • tty_name no longer uses the buf parameter, so remove it along with all
    the 64 byte stack buffers that used to be passed in.

    Mostly generated by the coccinelle script

    @depends on patch@
    identifier buf;
    constant C;
    expression tty;
    @@
    - char buf[C];

    allmodconfig compiles, so I'm fairly confident the stack buffers
    weren't used for other purposes as well.

    Signed-off-by: Rasmus Villemoes
    Reviewed-by: Peter Hurley
    Acked-by: Jesper Nilsson
    Acked-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Rasmus Villemoes
     

07 Apr, 2015

1 commit


10 Mar, 2015

1 commit

  • While registering serio device for i8042, mark them as wakeup-capable
    and check their user space wakeup settings in i8042_pm_suspend() and
    i8042_pm_resume() to enable or disable, respectively, their interrupts
    to wake up the system.

    This makes it possible to use the PC keyboard to wake up the system
    from suspend-to-idle, among other things, after writing "enabled" to
    the keyboard serio device's power/wakeup sysfs attribute.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Dmitry Torokhov

    Rafael J. Wysocki
     

16 Feb, 2015

1 commit


05 Feb, 2015

1 commit


02 Feb, 2015

1 commit


27 Jan, 2015

1 commit


23 Jan, 2015

1 commit

  • Without this the aux port does not get detected, and consequently the touchpad
    will not work.

    With this patch the touchpad is detected:

    $ dmesg | grep -E "(SYN|i8042|serio)"
    pnp 00:03: Plug and Play ACPI device, IDs SYN1d22 PNP0f13 (active)
    i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
    serio: i8042 KBD port at 0x60,0x64 irq 1
    serio: i8042 AUX port at 0x60,0x64 irq 12
    input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
    psmouse serio1: synaptics: Touchpad model: 1, fw: 8.1, id: 0x1e2b1, caps: 0xd00123/0x840300/0x126800, board id: 2863, fw id: 1473085
    input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input6

    dmidecode excerpt for this laptop is:

    Handle 0x0001, DMI type 1, 27 bytes
    System Information
    Manufacturer: Medion
    Product Name: Akoya E7225
    Version: 1.0

    Cc: stable@vger.kernel.org
    Signed-off-by: Jochen Hein
    Signed-off-by: Dmitry Torokhov

    Jochen Hein