1. 06 9月, 2018 1 次提交
  2. 27 7月, 2018 1 次提交
  3. 14 6月, 2018 1 次提交
  4. 06 6月, 2018 1 次提交
    • H
      ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices · fdcb613d
      Hans de Goede 提交于
      The LPSS PWM device on on Bay Trail and Cherry Trail devices has a set
      of private registers at offset 0x800, the current lpss_device_desc for
      them already sets the LPSS_SAVE_CTX flag to have these saved/restored
      over device-suspend, but the current lpss_device_desc was not setting
      the prv_offset field, leading to the regular device registers getting
      saved/restored instead.
      
      This is causing the PWM controller to no longer work, resulting in a black
      screen,  after a suspend/resume on systems where the firmware clears the
      APB clock and reset bits at offset 0x804.
      
      This commit fixes this by properly setting prv_offset to 0x800 for
      the PWM devices.
      
      Cc: stable@vger.kernel.org
      Fixes: e1c74817 ("ACPI / LPSS: Add Intel BayTrail ACPI mode PWM")
      Fixes: 1bfbd8eb ("ACPI / LPSS: Add ACPI IDs for Intel Braswell")
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NRafael J . Wysocki <rjw@rjwysocki.net>
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      fdcb613d
  5. 10 5月, 2018 1 次提交
    • H
      ACPI / LPSS: Only call pwm_add_table() for Bay Trail PWM if PMIC HRV is 2 · c975e472
      Hans de Goede 提交于
      The Point of View mobii wintab p800w Bay Trail tablet comes with a Crystal
      Cove PMIC, yet uses the LPSS PWM for backlight control, rather then the
      Crystal Cove's PWM, so we need to call pwm_add_table() to add a
      pwm_backlight mapping for the LPSS pwm despite there being an INT33FD
      ACPI device present.
      
      On all Bay Trail devices the _HRV object of the INT33FD ACPI device
      will normally return 2, to indicate the Bay Trail variant of the CRC
      PMIC is present, except on this tablet where _HRV is 0xffff. I guess this
      is a hack to make the windows Crystal Cove PWM driver not bind.
      
      Out of the 44 DSTDs with an INT33FD device in there which I have (from
      different model devices) only the pov mobii wintab p800w uses 0xffff for
      the HRV.
      
      The byt_pwm_setup code calls acpi_dev_present to check for the presence
      of a INT33FD ACPI device which indicates that a CRC PMIC is present and
      if the INT33FD ACPI device is present then byt_pwm_setup will not add
      a pwm_backlight mapping for the LPSS pwm, so that the CRC PWM will get
      used instead.
      
      acpi_dev_present has a hrv parameter, this commit make us pass 2 instead
      of -1, so that things still match on normal tablets, but on this special
      case with its _HRV of 0xffff, the check will now fail so that the
      pwm_backlight mapping for the LPSS pwm gets added fixing backlight
      brightness control on this device.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c975e472
  6. 16 1月, 2018 1 次提交
    • H
      ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources · e1681599
      Hans de Goede 提交于
      acpi_lpss_create_device() skips handling LPSS devices which do not have
      a mmio resources in their resource list (typically these devices are
      disabled by the firmware). But since the LPSS code does not bind to the
      device, acpi_bus_attach() ends up still creating a platform device for
      it and the regular platform_driver for the ACPI HID still tries to bind
      to it.
      
      This happens e.g. on some boards which do not use the pwm-controller
      and have an empty or invalid resource-table for it. Currently this causes
      these error messages to get logged:
      
      [    3.281966] pwm-lpss 80862288:00: invalid resource
      [    3.287098] pwm-lpss: probe of 80862288:00 failed with error -22
      
      This commit stops the undesirable creation of a platform_device for
      disabled LPSS devices by setting pnp.type.platform_id to 0. Note that
      acpi_scan_attach_handler() also sets pnp.type.platform_id to 0 when there
      is a matching handler for the device and that handler has no attach
      callback, so we simply behave as a handler without an attach function
      in this case.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e1681599
  7. 16 12月, 2017 1 次提交
  8. 09 11月, 2017 1 次提交
  9. 06 11月, 2017 1 次提交
    • R
      ACPI / PM: Take SMART_SUSPEND driver flag into account · 05087360
      Rafael J. Wysocki 提交于
      Make the ACPI PM domain take DPM_FLAG_SMART_SUSPEND into account in
      its system suspend callbacks.
      
      [Note that the pm_runtime_suspended() check in acpi_dev_needs_resume()
      is an optimization, because if is not passed, all of the subsequent
      checks may be skipped and some of them are much more overhead in
      general.]
      
      Also use the observation that if the device is in runtime suspend
      at the beginning of the "late" phase of a system-wide suspend-like
      transition, its state cannot change going forward (runtime PM is
      disabled for it at that time) until the transition is over and the
      subsequent system-wide PM callbacks should be skipped for it (as
      they generally assume the device to not be suspended), so add
      checks for that in acpi_subsys_suspend_late/noirq() and
      acpi_subsys_freeze_late/noirq().
      
      Moreover, if acpi_subsys_resume_noirq() is called during the
      subsequent system-wide resume transition and if the device was left
      in runtime suspend previously, its runtime PM status needs to be
      changed to "active" as it is going to be put into the full-power
      state going forward, so add a check for that too in there.
      
      In turn, if acpi_subsys_thaw_noirq() runs after the device has been
      left in runtime suspend, the subsequent "thaw" callbacks need
      to be skipped for it (as they may not work correctly with a
      suspended device), so set the power.direct_complete flag for the
      device then to make the PM core skip those callbacks.
      
      On top of the above, make the analogous changes in the acpi_lpss
      driver that uses the ACPI PM domain callbacks.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05087360
  10. 24 10月, 2017 1 次提交
  11. 17 10月, 2017 1 次提交
  12. 11 10月, 2017 2 次提交
    • U
      ACPI / PM: Restore acpi_subsys_complete() · e4da817d
      Ulf Hansson 提交于
      Commit 58a1fbbb (PM / PCI / ACPI: Kick devices that might have
      been reset by firmware), made PCI's and ACPI's ->complete() callbacks
      to be assigned to a new API called pm_complete_with_resume_check(),
      which was introduced in the same change.
      
      Later it turned out that using pm_complete_with_resume_check() wasn't
      good enough for PCI, as it needed additional PCI specific checks,
      before deciding whether runtime resuming the device is needed when
      running the ->complete() callback.
      
      This leaves ACPI as the only user of pm_complete_with_resume_check().
      Therefore let's restore ACPI's acpi_subsys_complete(), which was
      dropped in commit 58a1fbbb (PM / PCI / ACPI: Kick devices that
      might have been reset by firmware).
      
      This enables us to remove the pm_complete_with_resume_check() API in
      a following change, but it also enables ACPI to add more ACPI
      specific checks in acpi_subsys_complete() if that turns out to be
      necessary.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e4da817d
    • R
      ACPI / PM: Combine two identical device resume routines · 63705c40
      Rafael J. Wysocki 提交于
      Notice that acpi_dev_runtime_resume() and acpi_dev_resume_early() are
      actually literally identical after some more-or-less recent changes,
      so rename acpi_dev_runtime_resume() to acpi_dev_resume(), use it
      everywhere instead of acpi_dev_resume_early() and drop the latter.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      63705c40
  13. 10 8月, 2017 1 次提交
    • R
      ACPI / LPSS: Don't abort ACPI scan on missing mem resource · a4bb2b49
      Ronald Tschalär 提交于
      The keyboard and touchpad on MacBook's from 2015 onwards are connected
      via an SPI bus. On MacBook8's (2015) the ACPI device for the SPI master
      for this bus has _CID "INT33C1", and hence the acpi-lpss handler here is
      triggered for it. However, the DSDT lists no memory resources for this
      device, resulting in an error being returned by the attach callback and
      therefore the SPI master device being ignored. This prevents us from
      being able to register the keyboard and touchpad driver.
      
      Furthermore, the controller (a Wildcat Point-LP controller) does not
      appear to need the functionality provided by the apci-lpss handler.
      Therefore we now just skip the handler if no memory resources are found
      and let the ACPI scan complete successfully for this device.
      
      All of this is not an issue on later MacBook(Pro)'s because their ACPI
      SPI devices don't have any _CID and therefore no attempt is made to attach
      this handler.
      
      Returning an error was introduced in commit d3e13ff3 - this restores
      the original behaviour.
      
      Link: https://github.com/cb22/macbook12-spi-driverSigned-off-by: NRonald Tschalär <ronald@innovation.ch>
      Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a4bb2b49
  14. 07 7月, 2017 1 次提交
  15. 05 7月, 2017 1 次提交
  16. 29 4月, 2017 1 次提交
  17. 10 2月, 2017 1 次提交
  18. 27 1月, 2017 1 次提交
  19. 17 11月, 2016 1 次提交
  20. 10 11月, 2016 1 次提交
  21. 31 8月, 2016 1 次提交
  22. 08 6月, 2016 1 次提交
  23. 03 2月, 2016 1 次提交
  24. 08 1月, 2016 1 次提交
  25. 07 1月, 2016 2 次提交
  26. 09 12月, 2015 4 次提交
  27. 14 10月, 2015 1 次提交
    • R
      PM / PCI / ACPI: Kick devices that might have been reset by firmware · 58a1fbbb
      Rafael J. Wysocki 提交于
      There is a concern that if the platform firmware was involved in
      the system resume that's being completed,  some devices might have
      been reset by it and if those devices had the power.direct_complete
      flag set during the preceding suspend transition, they may stay
      in a reset-power-on state indefinitely (until they are runtime-resumed
      and then suspended again).  That may not be a big deal from the
      individual device's perspective, but if the system is an SoC, it may
      be prevented from entering deep SoC-wide low-power states on idle
      because of that.
      
      The devices that are most likely to be affected by this issue are
      PCI devices and ACPI-enumerated devices using the general ACPI PM
      domain, so to prevent it from happening for those devices, force a
      runtime resume for them if they have their power.direct_complete
      flags set and the platform firmware was involved in the resume
      transition currently in progress.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      58a1fbbb
  28. 28 8月, 2015 1 次提交
  29. 21 7月, 2015 1 次提交
    • S
      ACPI: Remove clk.h include · 887e5a91
      Stephen Boyd 提交于
      Clock provider drivers generally shouldn't include clk.h because
      it's the consumer API. Remove the includes here because these are
      a provider drivers.
      
      Cc: Ken Xue <Ken.Xue@amd.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      887e5a91
  30. 07 7月, 2015 1 次提交
  31. 15 6月, 2015 1 次提交
  32. 10 3月, 2015 1 次提交
  33. 19 2月, 2015 2 次提交
    • M
      ACPI / LPSS: Deassert resets for SPI host controllers on Braswell · 3095794a
      Mika Westerberg 提交于
      On some Braswell systems BIOS leaves resets for SPI host controllers
      active. This prevents the SPI driver from transferring messages on wire.
      
      Fix this in similar way that we do for I2C already by deasserting resets
      for the SPI host controllers.
      Reported-by: NYang A Fang <yang.a.fang@intel.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: 3.17+ <stable@vger.kernel.org> # 3.17+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3095794a
    • M
      ACPI / LPSS: Always disable I2C host controllers · 3293c7b8
      Mika Westerberg 提交于
      On Baytrail and Braswell the BIOS might leave the I2C host controllers
      enabled, probably because it uses them for its own purposes. This is fine
      in normal cases because the I2C driver will disable the hardware when it
      is probed anyway.
      
      However, in case of suspend to disk it is different story. If the driver
      happens to be compiled as a module the boot kernel never loads the driver
      thus leaving host controllers enabled upon loading the hibernation image.
      
      The I2C host controller interrupt mask register has default value of 0x8ff,
      in other words it has most of the interrupts unmasked. When combined with
      the fact that the host controller is enabled, the driver immediately starts
      getting interrupts even before its resume hook is called (once IO-APIC is
      resumed). Since the driver is not prepared for this it will crash the
      kernel due to NULL pointer derefence because dev->msgs is NULL.
      
      Unfortunately we were not able to get full backtrace to from the console
      which could be reproduced here.
      
      In order to fix this even when the driver is compiled as module, we disable
      the I2C host controllers in byt_i2c_setup() before devices are created.
      Reported-by: NYu Chen <yu.c.chen@intel.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: 3.17+ <stable@vger.kernel.org> # 3.17+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3293c7b8
  34. 18 2月, 2015 1 次提交