Skip to content
  1. Nov 29, 2021
    • Takashi Iwai's avatar
      Input: i8042 - add deferred probe support · 9222ba68
      Takashi Iwai authored
      
      
      We've got a bug report about the non-working keyboard on ASUS ZenBook
      UX425UA.  It seems that the PS/2 device isn't ready immediately at
      boot but takes some seconds to get ready.  Until now, the only
      workaround is to defer the probe, but it's available only when the
      driver is a module.  However, many distros, including openSUSE as in
      the original report, build the PS/2 input drivers into kernel, hence
      it won't work easily.
      
      This patch adds the support for the deferred probe for i8042 stuff as
      a workaround of the problem above.  When the deferred probe mode is
      enabled and the device couldn't be probed, it'll be repeated with the
      standard deferred probe mechanism.
      
      The deferred probe mode is enabled either via the new option
      i8042.probe_defer or via the quirk table entry.  As of this patch, the
      quirk table contains only ASUS ZenBook UX425UA.
      
      The deferred probe part is based on Fabio's initial work.
      
      BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1190256
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Tested-by: default avatarSamuel Čavoj <samuel@cavoj.net>
      Link: https://lore.kernel.org/r/20211117063757.11380-1-tiwai@suse.de
      
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      9222ba68
  2. Nov 12, 2021
  3. Nov 10, 2021
  4. Nov 06, 2021
  5. Nov 03, 2021
  6. Oct 17, 2021
    • Marek Vasut's avatar
      Input: ili210x - add ili251x firmware update support · c6ac8f0b
      Marek Vasut authored
      
      
      The ili251x firmware can be updated, this is used when switching between
      different modes of operation of the touch surface, e.g. glove operation.
      This patch implements the firmware update mechanism triggered by a write
      into an sysfs attribute.
      
      The firmware itself is distributed as an intel hex file with non-standard
      types. The first two lines are of type 0xad, which indicates the start of
      DataFlash payload, that is always at address 0xf000 on the ili251x, so it
      can be dropped, and 0xac which indicates the position of firmware info in
      the Application payload, that is always at address 0x2020 on the ili251x
      and we do not care. The rest of the firmware is data of type 0x00, and we
      care about that. To convert the firmware hex file into something usable
      by the kernel, remove the first two lines and then use ihex2fw:
      
       $ tail -n +3 input.hex > temp.hex
       $ ./tools/firmware/ihex2fw temp.hex firmware/ilitek/ili251x.bin
      
      To trigger the firmware update, place firmware file ilitek/ili251x.bin
      into /lib/firmware/, write into firmware_update sysfs attribute and wait
      about 30-40 seconds. The firmware update is slow. Afterward, verify the
      firmware_version and mode sysfs attributes to check whether the firmware
      got updated and the controller switched back to application (AP) mode by
      reading out 'mode' attribute in sysfs.
      
      Note that the content of firmware_version, e.g. 0600.0005.abcd.aa04 can
      be matched to the content of the firmware hex file. The first four bytes,
      0x06 0x00 0x00 0x05 can be found at ^:102030 00 05000006, the next four
      bytes 0xab 0xcd 0xaa 0x04 at ^:10F000 00 nnnnnnnn ABCDAA04.
      
      Note that the protocol differs considerably between the ili2xxx devices,
      this patch therefore implements this functionality only for ili251x that
      I can test.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Link: https://lore.kernel.org/r/20210831202506.181927-3-marex@denx.de
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      c6ac8f0b
    • Marek Vasut's avatar
      Input: ili210x - export ili251x version details via sysfs · 70a7681d
      Marek Vasut authored
      
      
      The ili251x firmware protocol permits readout of firmware version,
      protocol version, mcu version and current mode (application, boot
      loader, forced update). These information are useful when updating
      the firmware on the il251x, e.g. to avoid updating the same firmware
      into the device multiple times. The locking is now necessary to avoid
      races between interrupt handler and the sysfs readouts.
      
      Note that the protocol differs considerably between the ili2xxx devices,
      this patch therefore implements this functionality only for ili251x that
      I can test.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Link: https://lore.kernel.org/r/20210831202506.181927-2-marex@denx.de
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      70a7681d
    • Marek Vasut's avatar
      Input: ili210x - use resolution from ili251x firmware · 235300ed
      Marek Vasut authored
      
      
      The ili251x firmware protocol permits readout of panel resolution,
      implement this, but make it possible to override this value using
      DT bindings. This way, older DTs which contain touchscreen-size-x
      and touchscreen-size-y properties will behave just like before and
      new DTs may avoid specifying these for ILI251x.
      
      Note that the command format is different on other controllers, so
      this functionality is isolated to ILI251x.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Link: https://lore.kernel.org/r/20210831202506.181927-1-marex@denx.de
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      235300ed
    • Shawn Guo's avatar
      Input: pm8941-pwrkey - respect reboot_mode for warm reset · 9e5afc84
      Shawn Guo authored
      
      
      On some devices, e.g. Sony Xperia M4 Aqua, warm reset is used to reboot
      device into bootloader and recovery mode.  Instead of always doing hard
      reset, add a check on reboot_mode for possible warm reset.
      
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Tested-by: default avatarLuca Weiss <luca@z3ntu.xyz>
      Link: https://lore.kernel.org/r/20210714095850.27185-3-shawn.guo@linaro.org
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      9e5afc84
    • Shawn Guo's avatar
      reboot: export symbol 'reboot_mode' · d46b3f5b
      Shawn Guo authored
      
      
      Some drivers like Qualcomm pm8941-pwrkey need to access 'reboot_mode'
      for triggering reboot between cold and warm mode.  Export the symbol, so
      that drivers built as module can still access the symbol.
      
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Link: https://lore.kernel.org/r/20210714095850.27185-2-shawn.guo@linaro.org
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      d46b3f5b
    • Krzysztof Kozlowski's avatar
      Input: max77693-haptic - drop unneeded MODULE_ALIAS · dcd6a66a
      Krzysztof Kozlowski authored
      
      
      The MODULE_DEVICE_TABLE already creates proper alias for platform
      driver.  Having another MODULE_ALIAS causes the alias to be duplicated.
      
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
      Link: https://lore.kernel.org/r/20210916170514.137977-1-krzysztof.kozlowski@canonical.com
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      dcd6a66a
    • Dmitry Torokhov's avatar
      Input: cpcap-pwrbutton - do not set input parent explicitly · ec45b858
      Dmitry Torokhov authored
      
      
      We are using devm_input_allocate_device() that already sets parent
      of the input device, there is no need to do that again.
      
      Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      Link: https://lore.kernel.org/r/YWpiZqrfC9+GQsM4@google.com
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      ec45b858
  7. Oct 16, 2021
  8. Oct 13, 2021
  9. Oct 12, 2021
  10. Oct 06, 2021
    • Lukas Bulwahn's avatar
      MAINTAINERS: rectify entry for CHIPONE ICN8318 I2C TOUCHSCREEN DRIVER · a41392e0
      Lukas Bulwahn authored
      Commit 04647773
      
       ("dt-bindings: input: Convert ChipOne ICN8318
      binding to a schema") converts chipone_icn8318.txt to chipone,icn8318.yaml,
      but missed to adjust its reference in MAINTAINERS.
      
      Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about
      a broken reference.
      
      Repair this file reference in CHIPONE ICN8318 I2C TOUCHSCREEN DRIVER.
      
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Link: https://lore.kernel.org/r/20211005075451.29691-12-lukas.bulwahn@gmail.com
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      a41392e0
    • Arnd Bergmann's avatar
      Input: analog - fix invalid snprintf() call · 1f59342b
      Arnd Bergmann authored
      
      
      Overlapping input and output arguments to snprintf() are
      undefined behavior in C99:
      
      drivers/input/joystick/analog.c: In function 'analog_name':
      drivers/input/joystick/analog.c:428:3: error: 'snprintf' argument 4 overlaps destination object 'analog' [-Werror=restrict]
        428 |   snprintf(analog->name, sizeof(analog->name), "%s %d-hat",
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        429 |     analog->name, hweight16(analog->mask & ANALOG_HATS_ALL));
            |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/input/joystick/analog.c:420:40: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
        420 | static void analog_name(struct analog *analog)
            |                         ~~~~~~~~~~~~~~~^~~~~~
      
      Change this function to use the simpler seq_buf interface instead.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20210927101416.1569609-1-arnd@kernel.org
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      1f59342b