1. 08 Oct, 2019 1 commit
    • Hans de Goede's avatar
      Input: soc_button_array - partial revert of support for newer surface devices · bcf05957
      Hans de Goede authored
      Commit c3941593 ("Input: soc_button_array - add support for newer
      surface devices") not only added support for the MSHW0040 ACPI HID,
      but for some reason it also makes changes to the error handling of the
      soc_button_lookup_gpio() call in soc_button_device_create(). Note ideally
      this seamingly unrelated change would have been made in a separate commit,
      with a message explaining the what and why of this change.
      
      I guess this change may have been added to deal with -EPROBE_DEFER errors,
      but in case of the existing support for PNP0C40 devices, treating
      -EPROBE_DEFER as any other error is deliberate, see the comment this
      commit adds for why.
      
      The actual returning of -EPROBE_DEFER to the caller of soc_button_probe()
      introduced by the new error checking causes a serious regression:
      
      On devices with so called virtual GPIOs soc_button_lookup_gpio() will
      always return -EPROBE_DEFER for these fake GPIOs, when this happens
      during the second call of soc_button_device_create() we already have
      successfully registered our first child. This causes the kernel to think
      we are making progress with probing things even though we unregister the
      child before again before we return the -EPROBE_DEFER. Since we are making
      progress the kernel will retry deferred-probes again immediately ending
      up stuck in a loop with the following showing in dmesg:
      
      [  124.022697] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6537
      [  124.040764] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6538
      [  124.056967] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6539
      [  124.072143] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6540
      [  124.092373] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6541
      [  124.108065] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6542
      [  124.128483] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6543
      [  124.147141] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6544
      [  124.165070] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6545
      [  124.179775] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6546
      [  124.202726] input: gpio-keys as /devices/platform/INTCFD9:00/gpio-keys.0.auto/input/input6547
      <continues on and on and on>
      
      And 1 CPU core being stuck at 100% and udev hanging since it is waiting
      for the modprobe of soc_button_array to return.
      
      This patch reverts the soc_button_lookup_gpio() error handling changes,
      fixing this regression.
      
      Fixes: c3941593 ("Input: soc_button_array - add support for newer surface devices")
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205031Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Tested-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
      Acked-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
      Link: https://lore.kernel.org/r/20191005105551.353273-1-hdegoede@redhat.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      bcf05957
  2. 02 Oct, 2019 2 commits
  3. 16 Sep, 2019 1 commit
  4. 06 Sep, 2019 3 commits
  5. 02 Sep, 2019 11 commits
  6. 29 Aug, 2019 1 commit
    • Stephen Boyd's avatar
      Input: i8042 - enable wakeup on a stable struct device · c8a144b2
      Stephen Boyd authored
      We don't know when the device will be added with device_add() in
      serio_add_port() because serio_add_port() is called from a workqueue
      that this driver schedules by calling serio_register_port(). The best we
      can know is that the device will definitely not have been added yet when
      the start callback is called on the serio device.
      
      While it hasn't been shown to be a problem, proactively move the wakeup
      enabling calls to the start hook so that we don't race with the
      workqueue calling device_add(). This will avoid racy situations where
      code tries to add wakeup sysfs attributes for this device from
      dpm_sysfs_add() but the path in device_set_wakeup_capable() has already
      done so.
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      c8a144b2
  7. 20 Aug, 2019 4 commits
  8. 16 Aug, 2019 1 commit
  9. 14 Aug, 2019 1 commit
    • Stephen Boyd's avatar
      Input: remove dev_err() usage after platform_get_irq() · 0bec8b7e
      Stephen Boyd authored
      We don't need dev_err() messages when platform_get_irq() fails now that
      platform_get_irq() prints an error message itself when something goes
      wrong. Let's remove these prints with a simple semantic patch.
      
      // <smpl>
      @@
      expression ret;
      struct platform_device *E;
      @@
      
      ret =
      (
      platform_get_irq(E, ...)
      |
      platform_get_irq_byname(E, ...)
      );
      
      if ( \( ret < 0 \| ret <= 0 \) )
      {
      (
      -if (ret != -EPROBE_DEFER)
      -{ ...
      -dev_err(...);
      -... }
      |
      ...
      -dev_err(...);
      )
      ...
      }
      // </smpl>
      
      While we're here, remove braces on if statements that only have one
      statement (manually).
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      0bec8b7e
  10. 12 Aug, 2019 10 commits
  11. 11 Aug, 2019 3 commits
  12. 10 Aug, 2019 2 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 296d05cb
      Linus Torvalds authored
      Pull RISC-V updates from Paul Walmsley:
       "A few minor RISC-V updates for v5.3-rc4:
      
         - Remove __udivdi3() from the 32-bit Linux port, converting the only
           upstream user to use do_div(), per Linux policy
      
         - Convert the RISC-V standard clocksource away from per-cpu data
           structures, since only one is used by Linux, even on a multi-CPU
           system
      
         - A set of DT binding updates that remove an obsolete text binding in
           favor of a YAML binding, fix a bogus compatible string in the
           schema (thus fixing a "make dtbs_check" warning), and clarifies the
           future values expected in one of the RISC-V CPU properties"
      
      * tag 'riscv/for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        dt-bindings: riscv: fix the schema compatible string for the HiFive Unleashed board
        dt-bindings: riscv: remove obsolete cpus.txt
        RISC-V: Remove udivdi3
        riscv: delay: use do_div() instead of __udivdi3()
        dt-bindings: Update the riscv,isa string description
        RISC-V: Remove per cpu clocksource
      296d05cb
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6d8f809c
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A few fixes for x86:
      
         - Don't reset the carefully adjusted build flags for the purgatory
           and remove the unwanted flags instead. The 'reset all' approach led
           to build fails under certain circumstances.
      
         - Unbreak CLANG build of the purgatory by avoiding the builtin
           memcpy/memset implementations.
      
         - Address missing prototype warnings by including the proper header
      
         - Fix yet more fall-through issues"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/lib/cpu: Address missing prototypes warning
        x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS
        x86/purgatory: Do not use __builtin_memcpy and __builtin_memset
        x86: mtrr: cyrix: Mark expected switch fall-through
        x86/ptrace: Mark expected switch fall-through
      6d8f809c