09 Jun, 2017

4 commits

  • Add rpmsg-keys driver on i.mx7ulp-evk board since vol+/vol- keys
    are connected on m4 side and have to get the status of keys by
    rpmsg.

    Signed-off-by: Robin Gong
    [Irina: updated for 4.9 APIs]
    Signed-off-by: Irina Tirdea

    Robin Gong
     
  • disable debug information for focaltech touch.

    Signed-off-by: Gao Pan
    (cherry picked from commit b88a0ed7837ab964253f710da03fdab481592350)

    Gao Pan
     
  • The touchscreen driver, max11801, which is on 12c2 bus, won't be probed
    when using the hdcp specific DTS (this is disabling 12c2, since it
    will acquire it for DDC communications). Since this driver won't be
    probed, it will spam the dmesg with the pr_err from max11801_read_adc()
    function. This function is periodically called by the battery driver. For
    this reason, I removed the pr_err() call.
    Also, to be noticed that the function signature is u32, but in case of an
    error it will return a negative integer. In order to correctly propagate
    errors, I changed the function signature to int. This is safe, since the
    read value from i2c is on 16 bits (MSB and LSB on 8 bits).

    Also, the function calibration_voltage is calling max11801_read_adc from
    touchscreen driverm which can return negative values in case of an
    error. I case of an error, just stop reading ADC data and return 0 as
    voltage_data.

    Signed-off-by: Robert Chiras

    Robert Chiras
     
  • add focaltech touch screen support

    Signed-off-by: Gao Pan
    (cherry-pick from 595cefbee5586e77ceb9ad900c256177a98367c7)

    Gao Pan
     

08 Jun, 2017

7 commits


23 Feb, 2017

13 commits


15 Feb, 2017

1 commit

  • commit 601bbbe0517303c9f8eb3d75e11d64efed1293c9 upstream.

    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
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191811
    Fixes: fbae10db0940 ("Input: uinput - rework ABS validation")
    Reviewed-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     

26 Jan, 2017

1 commit

  • commit 864db9295b06837d11a260e5dacf99a3fdf6bce2 upstream.

    The current Alps SS5 (SS4 v2) code generates bogus TouchPad events when
    TrackStick packets are processed.

    This causes the xorg synaptics driver to print
    "unable to find touch point 0" and
    "BUG: triggered 'if (priv->num_active_touches > priv->num_slots)'"
    messages. It also causes unexpected TouchPad button release and re-click
    event sequences if the TrackStick is moved while holding a TouchPad
    button.

    This commit corrects the problem by adjusting alps_process_packet_ss4_v2()
    so that it only sends TrackStick reports when processing TrackStick
    packets.

    Reviewed-by: Pali Rohár
    Signed-off-by: Paul Donohue
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Paul Donohue
     

20 Jan, 2017

3 commits

  • commit 1c3415a06b1016a596bfe59e0cfee56c773aa958 upstream.

    The following crash may be seen if bad data is received from the
    touchscreen.

    [ 2189.425150] elants_i2c i2c-ELAN0001:00: unknown packet ff ff ff ff
    [ 2189.430738] divide error: 0000 [#1] PREEMPT SMP
    [ 2189.434679] gsmi: Log Shutdown Reason 0x03
    [ 2189.434689] Modules linked in: ip6t_REJECT nf_reject_ipv6 rfcomm evdi
    uinput uvcvideo cmac videobuf2_vmalloc videobuf2_memops snd_hda_codec_hdmi
    i2c_dev videobuf2_core snd_soc_sst_cht_bsw_rt5645 snd_hda_intel
    snd_intel_sst_acpi btusb btrtl btbcm btintel bluetooth snd_soc_sst_acpi
    snd_hda_codec snd_intel_sst_core snd_hwdep snd_soc_sst_mfld_platform
    snd_hda_core snd_soc_rt5645 memconsole_x86_legacy memconsole zram snd_soc_rl6231
    fuse ip6table_filter iwlmvm iwlwifi iwl7000_mac80211 cfg80211 iio_trig_sysfs
    joydev cros_ec_sensors cros_ec_sensors_core industrialio_triggered_buffer
    kfifo_buf industrialio snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq
    snd_seq_device ppp_async ppp_generic slhc tun
    [ 2189.434866] CPU: 0 PID: 106 Comm: irq/184-ELAN000 Tainted: G W
    3.18.0-13101-g57e8190 #1
    [ 2189.434883] Hardware name: GOOGLE Ultima, BIOS Google_Ultima.7287.131.43 07/20/2016
    [ 2189.434898] task: ffff88017a0b6d80 ti: ffff88017a2bc000 task.ti: ffff88017a2bc000
    [ 2189.434913] RIP: 0010:[] [] elants_i2c_irq+0x190/0x200
    [ 2189.434937] RSP: 0018:ffff88017a2bfd98 EFLAGS: 00010293
    [ 2189.434948] RAX: 0000000000000000 RBX: ffff88017a967828 RCX: ffff88017a9678e8
    [ 2189.434962] RDX: 0000000000000000 RSI: 0000000000000246 RDI: 0000000000000000
    [ 2189.434975] RBP: ffff88017a2bfdd8 R08: 00000000000003e8 R09: 0000000000000000
    [ 2189.434989] R10: 0000000000000000 R11: 000000000044a2bd R12: ffff88017a991800
    [ 2189.435001] R13: ffffffffbe8a2a53 R14: ffff88017a0b6d80 R15: ffff88017a0b6d80
    [ 2189.435011] FS: 0000000000000000(0000) GS:ffff88017fc00000(0000) knlGS:0000000000000000
    [ 2189.435022] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [ 2189.435030] CR2: 00007f678d94b000 CR3: 000000003f41a000 CR4: 00000000001007f0
    [ 2189.435039] Stack:
    [ 2189.435044] ffff88017a2bfda8 ffff88017a9678e8 646464647a2bfdd8 0000000006e09574
    [ 2189.435060] 0000000000000000 ffff88017a088b80 ffff88017a921000 ffffffffbe8a2a53
    [ 2189.435074] ffff88017a2bfe08 ffffffffbe8a2a73 ffff88017a0b6d80 0000000006e09574
    [ 2189.435089] Call Trace:
    [ 2189.435101] [] ? irq_thread_dtor+0xa9/0xa9
    [ 2189.435112] [] irq_thread_fn+0x20/0x40
    [ 2189.435123] [] irq_thread+0x14e/0x222
    [ 2189.435135] [] ? __schedule+0x3b3/0x57a
    [ 2189.435145] [] ? wake_threads_waitq+0x2d/0x2d
    [ 2189.435156] [] ? irq_thread_fn+0x40/0x40
    [ 2189.435168] [] kthread+0x10e/0x116
    [ 2189.435178] [] ? __kthread_parkme+0x67/0x67
    [ 2189.435189] [] ret_from_fork+0x7c/0xb0
    [ 2189.435199] [] ? __kthread_parkme+0x67/0x67
    [ 2189.435208] Code: ff ff eb 73 0f b6 bb c1 00 00 00 83 ff 03 7e 13 49 8d 7c
    24 20 ba 04 00 00 00 48 c7 c6 8a cd 21 bf eb 4d 0f b6 83 c2 00 00 00 99 ff
    83 f8 37 75 15 48 6b f7 37 4c 8d a3 c4 00 00 00 4c 8d ac
    [ 2189.435312] RIP [] elants_i2c_irq+0x190/0x200
    [ 2189.435323] RSP
    [ 2189.435350] ---[ end trace f4945345a75d96dd ]---
    [ 2189.443841] Kernel panic - not syncing: Fatal exception
    [ 2189.444307] Kernel Offset: 0x3d800000 from 0xffffffff81000000
    (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
    [ 2189.444519] gsmi: Log Shutdown Reason 0x02

    The problem was seen with a 3.18 based kernel, but there is no reason
    to believe that the upstream code is safe.

    Fixes: 66aee90088da2 ("Input: add support for Elan eKTH I2C touchscreens")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     
  • 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
     
  • commit b6fc513da50c5dbc457a8ad6b58b046a6a68fd9d upstream.

    currently the controllers get the same product id as the wireless
    receiver. However the controllers actually have their own product id.

    The patch makes the driver expose the same product id as the windows
    driver.

    This improves compatibility when running applications with WINE.

    see https://github.com/paroj/xpad/issues/54

    Signed-off-by: Pavel Rojtberg
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Pavel Rojtberg
     

12 Jan, 2017

1 commit

  • commit 792f497b22afd0563b94dd8fa129a05f762a2c25 upstream.

    We should unlock before returning on this error path.

    Fixes: 3a762dbd5347 ('[media] Input: synaptics-rmi4 - add support for F54 diagnostics')
    Signed-off-by: Dan Carpenter
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

09 Jan, 2017

1 commit

  • commit 5a8a6b89c15766446d845671d574a9243b6d8786 upstream.

    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
    Fixes: 7132fe4f5687 ("Input: drv260x - add TI drv260x haptics driver")
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Jingkui Wang
     

02 Dec, 2016

1 commit

  • Pull input fixes from Dmitry Torokhov: "We are disabling automatic
    probing of BYD touchpads as it results in too many false positives,
    and the hardware is not terribly popular and having the protocol
    support does not result in significantly improved user experience.

    We also change keycode for KEY_DATA to avoid clashing with
    KEY_FASTREVERSE. Luckily this newish code is used by CEC framework
    that is still in staging, so it is extremely unlikely that someone has
    already started using this keycode"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: change KEY_DATA from 0x275 to 0x277
    Input: psmouse - disable automatic probing of BYD touchpads

    Linus Torvalds
     

17 Nov, 2016

1 commit

  • BYD automatic protocol detection is extremely unreliable and is often
    triggers false positives on regular mice, Sentelic touchpads, and other
    devices. BYD has several documents that have recommended detection
    sequence, but they conflict with each other and, as far as I can see, still
    would not produce unique enough output to reliably differentiate BYD from
    other PS/2 devices.

    OEMs sourcing BYD devices also do not do us any favors by not supplying any
    reasonable DMI data and instead leaving turds like "To Be Filled By O.E.M."
    in place of vendor data, or "System Serial Number" as serial number.

    On top of that BYD is not truly modern multitouch controller, but rather a
    single-touch transitional device that only reports absolute coordinates at
    the beginning of finger contact and then reverts to reporting
    displacements, and thus not very precise; the only benefit from using BYD
    mode vs the legacy PS/2 mode is possibility of edge scrolling.

    Given the above, and the fact that BYD devices are somewhat uncommon, let's
    disable automatic detection of BYD devices. Users who know they have BYD
    trackpads or want to experiment can attempt to activate BYD protocol via
    sysfs:

    echo -n "byd" > /sys/bus/serio/devices/serio1/drvctl

    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=151691
    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=175421
    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=120781
    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=121281
    Fixes: 98ee37714493 ("Input: byd - add BYD PS/2 touchpad driver")
    Cc: stable@vger.kernel.org # 4.6+
    Reviewed-by: Pali Rohár
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

06 Nov, 2016

1 commit


25 Oct, 2016

1 commit

  • psmouse->name "Focaltech Touchpad" is an overkill. In xinput it is too long
    as "FocaltechPS/2 Focaltech Focaltech Touchpad"

    In focaltech_report_state() pointer to psmouse->dev is already stored as
    *dev

    Signed-off-by: Dmitry Tunin
    Signed-off-by: Dmitry Torokhov

    Dmitry Tunin
     

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
     

15 Oct, 2016

1 commit

  • Pull some more input subsystem updates from Dmitry Torokhov:
    "An update to the ALPS driver to support the V8 protocol with
    touchstick, a change for i8042 to skip selftest on many Asus laptops
    which helps to keep their touchpads working after resume, and a couple
    other driver fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: i8042 - skip selftest on ASUS laptops
    Input: melfas_mip4 - add ic_name sysfs attribute
    Input: melfas_mip4 - add maintainer information
    Input: melfas_mip4 - add devicetree binding documentations
    Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled
    Input: synaptics-rmi4 - fix error handling in I2C transport driver
    Input: synaptics-rmi4 - fix error handling in SPI transport driver
    Input: ALPS - add V8 protocol documentation
    Input: ALPS - set DualPoint flag for 74 03 28 devices
    Input: ALPS - allow touchsticks to report pressure
    Input: ALPS - handle 0-pressure 1F events
    Input: ALPS - add touchstick support for SS5 hardware
    Input: elantech - force needed quirks on Fujitsu H760
    Input: elantech - fix Lenovo version typo

    Linus Torvalds
     

14 Oct, 2016

1 commit


12 Oct, 2016

2 commits

  • Merge more updates from Andrew Morton:

    - a few block updates that fell in my lap

    - lib/ updates

    - checkpatch

    - autofs

    - ipc

    - a ton of misc other things

    * emailed patches from Andrew Morton : (100 commits)
    mm: split gfp_mask and mapping flags into separate fields
    fs: use mapping_set_error instead of opencoded set_bit
    treewide: remove redundant #include
    hung_task: allow hung_task_panic when hung_task_warnings is 0
    kthread: add kerneldoc for kthread_create()
    kthread: better support freezable kthread workers
    kthread: allow to modify delayed kthread work
    kthread: allow to cancel kthread work
    kthread: initial support for delayed kthread work
    kthread: detect when a kthread work is used by more workers
    kthread: add kthread_destroy_worker()
    kthread: add kthread_create_worker*()
    kthread: allow to call __kthread_create_on_node() with va_list args
    kthread/smpboot: do not park in kthread_create_on_cpu()
    kthread: kthread worker API cleanup
    kthread: rename probe_kthread_data() to kthread_probe_data()
    scripts/tags.sh: enable code completion in VIM
    mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping
    kdump, vmcoreinfo: report memory sections virtual addresses
    ipc/sem.c: add cond_resched in exit_sme
    ...

    Linus Torvalds
     
  • 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