1. 10 5月, 2018 1 次提交
  2. 09 5月, 2018 4 次提交
  3. 24 4月, 2018 1 次提交
    • P
      Input: alps - demystify trackstick initialization for v3 and v6 protocols · d91abc21
      Pali Rohár 提交于
      Remove cite "Not sure what this does, but it is absolutely essential".
      
      Extract initialization of trackstick part when touchpad is in passthrough
      mode for v3 and v6 protocols into own function. Initialization for v3 is:
      setscale11, setscale11, setscale11, nibble 0x9, nibble 0x4. Initialization
      for v6 is: setscale11, setscale11, setscale11, setrate 0xC8, setrate 0x14.
      Nibbles 0x9 and 0x4 for v3 protocol correspond to setrate 0xC8 and 0x14,
      therefore these sequences are same.
      
      When touchpad is in passthrough mode, then OS communicates with trackstick
      and this sequence is some magic vendor PS/2 command to put trackstick into
      "extended" mode. After that sequence trackstick starts reporting packets in
      some vendor 4 bytes format (first byte is always 0xE8).
      
      Next step after configuring trackstick to be in "extended" mode, is to
      configure touchpad for v3 protocol to expect that trackstick reports data
      in "extended" mode. For v3 protocol this is done by setting bit 1 in
      register 0xC2C8 (offset 0x08 from base address 0xC2C0).
      
      When both touchpad and trackstick are not configured for "extended" mode
      then touchpad reports trackstick packets in different format, which is not
      supported by psmouse/alps driver (yet).
      
      In Cirque documentation GP-AN- 130823 INTERFACING TO GEN4 OVER I2C (PDF)
      available at http://www.cirque.com/gen4-dev-resources is Logical Address
      0xC2C8 named as PS2AuxControl and Bit Number 1 as ProcessAuxExtendedData
      with description: Auxiliary device data is assumed to be extended data when
      set.
      Signed-off-by: NPali Rohár <pali.rohar@gmail.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      d91abc21
  4. 10 4月, 2018 4 次提交
  5. 05 4月, 2018 1 次提交
    • O
      Input: i8042 - enable MUX on Sony VAIO VGN-CS series to fix touchpad · 04bb1719
      Ondrej Zary 提交于
      The touch sensor buttons on Sony VAIO VGN-CS series laptops (e.g.
      VGN-CS31S) are a separate PS/2 device. As the MUX is disabled for all
      VAIO machines by the nomux blacklist, the data from touch sensor
      buttons and touchpad are combined. The protocol used by the buttons is
      probably similar to the touchpad protocol (both are Synaptics) so both
      devices get enabled. The controller combines the data, creating a mess
      which results in random button clicks, touchpad stopping working and
      lost sync error messages:
      psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 4
      psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
      psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
      psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
      psmouse serio1: TouchPad at isa0060/serio1/input0 lost sync at byte 1
      psmouse serio1: issuing reconnect request
      
      Add a new i8042_dmi_forcemux_table whitelist with VGN-CS.
      With MUX enabled, touch sensor buttons are detected as separate device
      (and left disabled as there's currently no driver), fixing all touchpad
      problems.
      Signed-off-by: NOndrej Zary <linux@rainbow-software.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      04bb1719
  6. 31 3月, 2018 2 次提交
  7. 27 3月, 2018 4 次提交
  8. 18 3月, 2018 4 次提交
  9. 15 3月, 2018 2 次提交
  10. 09 3月, 2018 1 次提交
  11. 08 3月, 2018 1 次提交
    • A
      Revert "Input: synaptics - Lenovo Thinkpad T460p devices should use RMI" · 5444a992
      Arkadiusz Hiler 提交于
      This reverts commit 48282969 which
      caused the following issues:
      
      1. On T460p with BIOS version 2.22 touchpad and trackpoint stop working
      after suspend-resume cycle. Due to strange state of the device another
      suspend is impossible.
      
      The following dmesg errors can be observed:
      thinkpad_acpi: EC reports that Thermal Table has changed
      rmi4_smbus 7-002c: failed to get SMBus version number!
      rmi4_physical rmi4-00: rmi_driver_reset_handler: Failed to read current IRQ mask.
      rmi4_f01 rmi4-00.fn01: Failed to restore normal operation: -16.
      rmi4_f01 rmi4-00.fn01: Resume failed with code -16.
      rmi4_physical rmi4-00: Failed to suspend functions: -16
      rmi4_smbus 7-002c: Failed to resume device: -16
      PM: resume devices took 0.640 seconds
      rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-16).
      rmi4_physical rmi4-00: rmi_driver_clear_irq_bits: Failed to change enabled interrupts!
      rmi4_physical rmi4-00: rmi_driver_set_irq_bits: Failed to change enabled interrupts!
      psmouse: probe of serio3 failed with error -1
      
      2. On another T460p with BIOS version 2.15 two finger scrolling gesture
      on the touchpad stops working after suspend-resume cycle (about 75%
      reproducibility, when it still works, the scrolling gesture becomes
      laggy). Nothing suspicious appears in the dmesg.
      
      Analysis form Richard Schütz:
      
      "RMI is unreliable on the ThinkPad T460p because the device is affected
      by the firmware behavior addressed in a7ae8195 ("i2c: i801: Allow
      ACPI SystemIO OpRegion to conflict with PCI BAR")."
      
      The affected devices often show:
      
      i801_smbus 0000:00:1f.4: BIOS is accessing SMBus registers
      i801_smbus 0000:00:1f.4: Driver SMBus register access inhibited
      Reported-by: NRichard Schütz <rschuetz@uni-koblenz.de>
      Signed-off-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Tested-by: NMartin Peres <martin.peres@linux.intel.com>
      Tested-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      5444a992
  12. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  13. 10 2月, 2018 1 次提交
  14. 03 2月, 2018 13 次提交
    • D
      Input: synaptics - handle errors from input_mt_init_slots() · cdc2466d
      Dmitry Torokhov 提交于
      input_mt_init_slots() may fail, we need to handle this condition.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      cdc2466d
    • D
      Input: synaptics - switch to using input_set_capability · 29aa6194
      Dmitry Torokhov 提交于
      Instead of manipulating capability bits directly, use
      input_set_capability().
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      29aa6194
    • D
      Input: trackpoint - combine calls to ps2_command() · 3aceaa34
      Dmitry Torokhov 提交于
      We do not need to call ps2_command() several times in a row, transmitting
      every byte as it were a command byte, we can often pack it all in a single
      command.
      
      Also, now that ps2_command() handles retransmission, we do not need to do
      it ourselves in trackpoint_power_on_reset().
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      3aceaa34
    • D
      Input: libps2 - relax command byte ACK handling · 29acc42e
      Dmitry Torokhov 提交于
      When we probe PS/2 devices we first issue "Get ID" command and only if we
      receive what we consider a valid keyboard or mouse ID we disable the device
      and continue with protocol detection. That means that the device may be
      transmitting motion or keystroke data, while we expect ACK response.
      
      Instead of signaling failure if we see anything but ACK/NAK let's ignore
      "garbage" response until we see ACK for the command byte (first byte). The
      checks for subsequent ACKs of command parameters will continue be strict.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      29acc42e
    • D
      Input: libps2 - support retransmission of command data · b99e1f2a
      Dmitry Torokhov 提交于
      The devices are allowed to respond to either command byte or command
      parameter with a NAK (0xfe), and the host is supposed to resend the
      "correct" byte. The device then will either respond with ACK or ERR (0xfc).
      Let's teach libps2 to handle the NAK responses properly, so that individual
      drivers do not need to handle them.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      b99e1f2a
    • D
      Input: libps2 - add debugging statements · 147b903d
      Dmitry Torokhov 提交于
      Debugging via i8042.debug and analyzing raw PS/2 data stream may be
      cumbersome as you need to locate the boundaries of commands, decipher the
      sliced commands, etc, etc. Let's add a bit more high level debug statements
      for ps2_sendbyte(), ps2_command(), and ps2_sliced_command().
      
      We do not introduce a new module parameter, but rater rely on the kernel
      having dynamic debug facility enabled (which most everyone has nowadays).
      Enable with:
      
      echo "file libps2.c +pf" > /sys/kernel/debug/dynamic_debug/control
      
      or add "libps2.dyndbg=+pf" to the kernel command line.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      147b903d
    • D
      Input: psmouse - move sliced command implementation to libps2 · 08be954b
      Dmitry Torokhov 提交于
      In preparation to adding some debugging statements to PS/2 control
      sequences let's move psmouse_sliced_command() into libps2 and rename it
      to ps2_sliced_command().
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      08be954b
    • D
      Input: libps2 - use u8 for byte data · b28bad65
      Dmitry Torokhov 提交于
      Instead of using unsigned char for the byte data switch to using u8. Also
      use unsigned int for the command codes and timeouts, and have
      ps2_handle_ack() and ps2_handle_response() return bool instead of int, as
      they do not return error codes but rather signal whether a byte was handled
      or not handled. ps2_is_keyboard_id() now returns bool as well.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      b28bad65
    • D
      Input: libps2 - fix switch statement formatting · d5e0d918
      Dmitry Torokhov 提交于
      Individual labels of switch statements should have the same indentation
      level as the switch statement itself.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      d5e0d918
    • S
      Input: psmouse - add support for 2nd wheel on A4Tech Dual-Scroll wheel mice · 4c711ef6
      Stephen Lyons 提交于
      This Far-Eastern company's PS/2 mice use a deviant format for the data
      relating to movement of the scroll wheels for, at least, their dual wheel
      mice, such as their "Optical GreatEye Wheelmouse" model "WOP-35".  This
      product has five "buttons" (one of which is the click action on the first
      wheel) and TWO scroll wheels.  However for a byte comprising d0-d7 instead
      of setting one of d6-7 in the forth byte of the mouse data packet and a
      twos complement number of scroll steps in the remaining d5-d0 (or d3-d0
      should there be a fourth (BTN_SIDE - d4) or fifth (BTN_EXTRA - d5) button
      to report; they only report a single +/- event for each wheel and use a bit
      pattern that corresponds to +/-1 for the first wheel and +/- 2 for the
      second in the lower nibble of the fourth byte.
      
      The effect with existing code is that the second mouse wheel merely repeats
      the effect of the first but providing two steps per click rather than the
      one of the first wheel - so there is no HORIZONTAL scroll wheel movement
      detected from the device as far as the rest of the kernel sees it.
      
      This patch, if enabled by the "a4tech_workaround" module parameter modifies
      the handling just for mice of type PSMOUSE_IMEX so that the second scroll
      wheel movement gets correctly reported as REL_HWHEEL events.  Should this
      module parameter be activated for other mice of the same PSMOUSE_IMEX type
      then it is possible that at the point where the mouse reports more than a
      single movement step the user may start seeing horizontal rather than
      vertical wheel events, but should the movement steps get to be more than
      two at a time the hack will get immediately deactivated and the behaviour
      will revert to the past code.
      
      This was discussed around *fifteen* *years* *ago* on the LKML and the best
      summary is in post https://lkml.org/lkml/2002/7/18/111 "Re: PS2 Input Core
      Support" by Vojtech Pavlik. I was not able to locate any discussion later
      than this on this topic.
      
      Given that most users of the "psmouse" module will NOT want this additional
      feature enabled I have taken the apparently erroneous step of defaulting
      the module parameter that enables it to be "disabled" - this functionality
      may interfere with the operation of "normal" mice of this type (until a
      large enough scroll wheel movement is detected) so I cannot see how it
      would want to be enabled for "normal" users - i.e.  everyone without this
      brand of mouse.
      
      I am using this patch at the moment and I can confirm that it is working
      for me as both a module and compiled into the kernel for my mouse that is
      of the type (WOP-35) described - I note that it is still available from
      certain on-line retailers and that the manufacturers site does not list
      GNU/Linux as being supported on the product page - this patch however does
      enable full use of this product:
      http://www.a4tech.com/product.asp?cid=3D1&scid=3D8&id=3D22Signed-off-by: NStephen Lyons <slysven@virginmedia.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      4c711ef6
    • D
      Input: lifebook - clean up code · c13b4186
      Dmitry Torokhov 提交于
      - use u8 instead of unsigned char for byte data
      - use input_set_capability() instead of manipulating capabilities bits
        directly
      - do not abuse -1 as error code, propagate errors from various calls.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      c13b4186
    • D
      Input: logips2pp - clean up code · 592c352b
      Dmitry Torokhov 提交于
      - switch to using BIT() macros
      - use u8 instead of unsigned char for byte data
      - use input_set_capability() instead of manipulating capabilities bits
        directly
      - use sign_extend32() when extracting wheel data.
      - do not abuse -1 as error code, propagate errors from various calls.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      592c352b
    • D
      Input: psmouse - clean up code · ba667650
      Dmitry Torokhov 提交于
      - switch to using BIT() macros
      - use u8 instead of unsigned char for byte data
      - use input_set_capability() instead of manipulating capabilities bits
        directly
      - use sign_extend32() when extracting wheel data.
      - do not abuse -1 as error code, propagate errors from various calls.
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      ba667650