An error occurred fetching the project authors.
  1. 28 Oct, 2019 2 commits
  2. 21 Aug, 2019 1 commit
  3. 08 Aug, 2019 4 commits
  4. 30 Jul, 2019 1 commit
    • Rafael J. Wysocki's avatar
      ACPI: PM: Set up EC GPE for system wakeup from drivers that need it · 10a08fd6
      Rafael J. Wysocki authored
      The EC GPE needs to be set up for system wakeup only if there is a
      driver depending on it, either intel-hid or intel-vbtn, bound to a
      button device that is expected to wake up the system from sleep (such
      as the power button on some Dell systems, like the XPS13 9360).  It
      doesn't need to be set up for waking up the system from sleep in any
      other cases and whether or not it is expected to wake up the system
      from sleep doesn't depend on whether or not the LPS0 device is
      present in the ACPI namespace.
      
      For this reason, rearrange the ACPI suspend-to-idle code to make the
      drivers depending on the EC GPE wakeup take care of setting it up and
      decouple that from the LPS0 device handling.
      
      While at it, make intel-hid and intel-vbtn prepare for system wakeup
      only if they are allowed to wake up the system from sleep by user
      space (via sysfs).
      
      [Note that acpi_ec_mark_gpe_for_wake() and acpi_ec_set_gpe_wake_mask()
       are there to prevent the EC GPE from being disabled by the
       acpi_enable_all_wakeup_gpes() call in acpi_s2idle_prepare(), so on
       systems with either intel-hid or intel-vbtn this change doesn't
       affect any interactions with the hardware or platform firmware.]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      10a08fd6
  5. 23 Jul, 2019 1 commit
    • Rafael J. Wysocki's avatar
      ACPI: EC: Return bool from acpi_ec_dispatch_gpe() · 9089f16e
      Rafael J. Wysocki authored
      On some systems, if suspend-to-idle is used, the EC may signal system
      wakeup events (power button events, for example) as well as events
      that should not cause the system to resume and acpi_ec_dispatch_gpe()
      needs to be called to determine whether or not the system should
      resume then.  In particular, if acpi_ec_dispatch_gpe() doesn't detect
      any EC events at all, the system should remain suspended, so it is
      useful to know when that is the case.
      
      For this reason, make acpi_ec_dispatch_gpe() return a bool value
      indicating whether or not any EC events have been detected by it.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      9089f16e
  6. 30 May, 2019 1 commit
    • Thomas Gleixner's avatar
      treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 · c942fddf
      Thomas Gleixner authored
      Based on 3 normalized pattern(s):
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version this program is distributed in the
        hope that it will be useful but without any warranty without even
        the implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version [author] [kishon] [vijay] [abraham]
        [i] [kishon]@[ti] [com] this program is distributed in the hope that
        it will be useful but without any warranty without even the implied
        warranty of merchantability or fitness for a particular purpose see
        the gnu general public license for more details
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version [author] [graeme] [gregory]
        [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
        [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
        [hk] [hemahk]@[ti] [com] this program is distributed in the hope
        that it will be useful but without any warranty without even the
        implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details
      
      extracted by the scancode license scanner the SPDX license identifier
      
        GPL-2.0-or-later
      
      has been chosen to replace the boilerplate/reference in 1105 file(s).
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarAllison Randal <allison@lohutok.net>
      Reviewed-by: default avatarRichard Fontana <rfontana@redhat.com>
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Cc: linux-spdx@vger.kernel.org
      Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c942fddf
  7. 01 Feb, 2019 6 commits
  8. 29 Jan, 2019 1 commit
    • Rafael J. Wysocki's avatar
      ACPI: EC: Clean up probing for early EC · fdb3c177
      Rafael J. Wysocki authored
      Both acpi_ec_dsdt_probe() and acpi_ec_ecdt_probe() may be void as
      their return values are ignored anyway.  This allows a couple of
      gotos and labels to go away from there.
      
      Moreover, acpi_ec_ecdt_probe() only needs to allocate the ec
      object after getting the ECDT pointer and checking it, so the
      pointless memory allocation and release on systems without the
      ECDT can be avoided by reordering it.
      
      No intentional functional impact.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fdb3c177
  9. 18 Dec, 2018 1 commit
  10. 09 Aug, 2018 1 commit
    • Mika Westerberg's avatar
      ACPI / EC: Add another entry for Thinkpad X1 Carbon 6th · 4c3be61e
      Mika Westerberg authored
      Commit 2c4d6baf (ACPI / EC: Use ec_no_wakeup on more Thinkpad X1
      Carbon 6th systems) changed the DMI table to match all systems where
      DMI product family is "Thinkpad X1 Carbon 6th". However, the system I
      have here has this string written differently (ThinkPad vs. Thinkpad)
      which makes the match fail.
      
      In addition to that, after BIOS upgrade Robin now has the same string
      than my system has (perhaps newer BIOS has changed the string).
      
      In any case add another DMI entry to acpi_ec_no_wakeup[] table hopefully
      covering all the X1 Carbon 6th systems out there.
      
      Fixes: 2c4d6baf (ACPI / EC: Use ec_no_wakeup on more Thinkpad X1 Carbon 6th systems)
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      [ rjw: Rebase and change the ident string to match the product familiy ]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4c3be61e
  11. 06 Aug, 2018 1 commit
  12. 19 Jul, 2018 1 commit
  13. 18 Jun, 2018 1 commit
  14. 25 May, 2018 1 commit
    • Rafael J. Wysocki's avatar
      ACPI: EC: Dispatch the EC GPE directly on s2idle wake · 68e22011
      Rafael J. Wysocki authored
      On platforms where the Low Power S0 Idle _DSM interface is used,
      on wakeup from suspend-to-idle, when it is known that the ACPI SCI
      has triggered while suspended, dispatch the EC GPE in order to catch
      all EC events that may have triggered the wakeup before carrying out
      the noirq phase of device resume.
      
      That is needed to handle power button wakeup on some platforms where
      the EC goes into a low-power mode during suspend-to-idle and while in
      that mode it will discard events after a timeout.  If that timeout is
      shorter than the time it takes to complete the noirq resume of
      devices, looking for EC events after the latter is too late.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reported-by: default avatarZhang Rui <rui.zhang@intel.com>
      Tested-by: default avatarWendy Wang <wendy.wang@intel.com>
      68e22011
  15. 12 Feb, 2018 1 commit
  16. 04 Jan, 2018 1 commit
  17. 20 Nov, 2017 1 commit
    • Lv Zheng's avatar
      ACPI / EC: Fix regression related to PM ops support in ECDT device · a64a62ce
      Lv Zheng authored
      On platforms (ASUS X550ZE and possibly all ASUS X series) with valid ECDT
      EC but invalid DSDT EC, EC PM ops won't be invoked as ECDT EC is not an
      ACPI device. Thus the following commit actually removed post-resume
      acpi_ec_enable_event() invocation for such platforms, and triggered a
      regression on them that after being resumed, EC (actually should be ECDT)
      driver stops handling EC events:
      
       Commit: c2b46d67
       Subject: ACPI / EC: Add PM operations to improve event handling for resume process
      
      Notice that the root cause actually is "ECDT is not an ACPI device" rather
      than "the timing of acpi_ec_enable_event() invocation", this patch fixes
      this issue by enumerating ECDT EC as an ACPI device. Due to the existence
      of the noirq stage, the ability of tuning the timing of
      acpi_ec_enable_event() invocation is still meaningful.
      
      This patch is a little bit different from the posted fix by moving
      acpi_config_boot_ec() from acpi_ec_ecdt_start() to acpi_ec_add() to make
      sure that EC event handling won't be stopped as long as the ACPI EC driver
      is bound. Thus the following sequence shouldn't disable EC event handling:
      unbind,suspend,resume,bind.
      
      Fixes: c2b46d67 (ACPI / EC: Add PM operations to improve event handling for resume process)
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=196847Reported-by: default avatarLuya Tshimbalanga <luya@fedoraproject.org>
      Tested-by: default avatarLuya Tshimbalanga <luya@fedoraproject.org>
      Cc: 4.9+ <stable@vger.kernel.org> # 4.9+
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a64a62ce
  18. 08 Nov, 2017 1 commit
  19. 31 Oct, 2017 1 commit
    • Kees Cook's avatar
      treewide: Fix function prototypes for module_param_call() · e4dca7b7
      Kees Cook authored
      Several function prototypes for the set/get functions defined by
      module_param_call() have a slightly wrong argument types. This fixes
      those in an effort to clean up the calls when running under type-enforced
      compiler instrumentation for CFI. This is the result of running the
      following semantic patch:
      
      @match_module_param_call_function@
      declarer name module_param_call;
      identifier _name, _set_func, _get_func;
      expression _arg, _mode;
      @@
      
       module_param_call(_name, _set_func, _get_func, _arg, _mode);
      
      @fix_set_prototype
       depends on match_module_param_call_function@
      identifier match_module_param_call_function._set_func;
      identifier _val, _param;
      type _val_type, _param_type;
      @@
      
       int _set_func(
      -_val_type _val
      +const char * _val
       ,
      -_param_type _param
      +const struct kernel_param * _param
       ) { ... }
      
      @fix_get_prototype
       depends on match_module_param_call_function@
      identifier match_module_param_call_function._get_func;
      identifier _val, _param;
      type _val_type, _param_type;
      @@
      
       int _get_func(
      -_val_type _val
      +char * _val
       ,
      -_param_type _param
      +const struct kernel_param * _param
       ) { ... }
      
      Two additional by-hand changes are included for places where the above
      Coccinelle script didn't notice them:
      
      	drivers/platform/x86/thinkpad_acpi.c
      	fs/lockd/svc.c
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      e4dca7b7
  20. 14 Sep, 2017 1 commit
  21. 19 Aug, 2017 1 commit
  22. 18 Aug, 2017 1 commit
    • Lv Zheng's avatar
      ACPI: EC: Fix possible issues related to EC initialization order · 69b957c2
      Lv Zheng authored
      Use the observation that the EC command/data register addresses are
      sufficient to determine if two EC devices are equivelent to modify
      acpi_is_boot_ec().
      
      Then, for the removed comparison factors, EC ID and EC GPE, they need
      to be synchronized for the boot_ec:
      
       1. Before registering the BIOS-provided EC event handlers in
          acpi_ec_register_query_methods(), the namespace node holding
          _Qxx methods should be located.  The real namespace PNP0C09
          device location then is apparently more trustworthy than the
          ECDT EC ID.
      
       2. Because of the ASUS quirks, the ECDT EC GPE is more trustworthy
          than the namespace PNP0C09 device's _GPE setting.
      
      Use the above observations to synchronize the boot_ec settings in
      acpi_ec_add().
      
      Finally, change the order of acpi_ec_ecdt_start() and acpi_ec_add(),
      called from acpi_bus_register_driver(), so as to follow the fast path
      of determining the location of _Qxx.
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      [ rjw : Changelog & comments ]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      69b957c2
  23. 17 Aug, 2017 1 commit
  24. 20 Jul, 2017 1 commit
    • Rafael J. Wysocki's avatar
      ACPI / PM / EC: Flush all EC work in acpi_freeze_sync() · 880a6627
      Rafael J. Wysocki authored
      Commit eed4d47e (ACPI / sleep: Ignore spurious SCI wakeups from
      suspend-to-idle) introduced acpi_freeze_sync() whose purpose is to
      flush all of the processing of possible wakeup events signaled via
      the ACPI SCI.  However, it doesn't flush the query workqueue used
      by the EC driver, so the events generated by the EC may not be
      processed timely which leads to issues (increased overhead at least,
      lost events possibly).
      
      To fix that introduce acpi_ec_flush_work() that will flush all of
      the outstanding EC work and call it from acpi_freeze_sync().
      
      Fixes: eed4d47e (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      880a6627
  25. 19 Jul, 2017 1 commit
    • Rafael J. Wysocki's avatar
      ACPI / EC: Add parameter to force disable the GPE on suspend · 76380636
      Rafael J. Wysocki authored
      After commit 8110dd28 (ACPI / sleep: EC-based wakeup from
      suspend-to-idle on recent systems) the configuration of GPEs,
      including the EC one, is not changed during suspend-to-idle on
      recent systems.  That's in order to make system wakeup events
      generated by the EC work, in particular.
      
      However, on some of the systems in question (for example on Dell
      XPS13 9365), in addition to generating system wakeup events the
      EC generates a heartbeat sequence of interrupts that have nothing
      to do with wakeup while suspended, and the Low Power Idle S0 _DSM
      interface doesn't change that behavior.
      
      The users of those systems may prefer to disable the EC GPE during
      system suspend, for the cost of non-functional power button wakeup
      or similar, but currently there is no way to do that.
      
      For this reason, add a new module parameter, ec_no_wakeup, for the
      EC driver module that, if set, will cause the EC GPE to be disabled
      during system suspend and re-enabled during the subsequent system
      resume.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=192591#c106
      Amends: 8110dd28 (ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems)
      Reported-and-tested-by: default avatarPatrik Kullman <patrik.kullman@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      76380636
  26. 12 Jul, 2017 2 commits
  27. 28 Jun, 2017 4 commits