1. 25 6月, 2015 1 次提交
  2. 19 6月, 2015 1 次提交
    • H
      acpi-video-detect: video: Make video_detect code part of the video module · 14ca7a47
      Hans de Goede 提交于
      This is a preparation patch for the backlight interface selection logic
      cleanup, there are 2 reasons to not always build the video_detect code
      into the kernel:
      
      1) In order for the video_detect.c to also deal with / select native
      backlight interfaces on win8 systems, instead of doing this in video.c
      where it does not belong, video_detect.c needs to call into the backlight
      class code. Which cannot be done if it is builtin and the blacklight class
      is not.
      
      2) Currently all the platform/x86 drivers which have quirks to prefer
      the vendor driver over acpi-video call acpi_video_unregister_backlight()
      to remove the acpi-video backlight interface, this logic really belongs
      in video_detect.c, which will cause video_detect.c to depend on symbols of
      video.c and video.c already depends on video_detect.c symbols, so they
      really need to be a single module.
      
      Note that this commits make 2 changes so as to maintain 100% kernel
      commandline compatibility:
      
      1) The __setup call for the acpi_backlight= handling is moved to
         acpi/util.c as __setup may only be used by code which is alwasy builtin
      2) video.c is renamed to acpi_video.c so that it can be combined with
         video_detect.c into video.ko
      
      This commit also makes changes to drivers/platform/x86/Kconfig to ensure
      that drivers which use acpi_video_backlight_support() from video_detect.c,
      will not be built-in when acpi_video is not built in. This also changes
      some "select" uses to "depends on" to avoid dependency loops.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NDarren Hart <dvhart@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      14ca7a47
  3. 26 3月, 2015 1 次提交
    • L
      ACPI: move arm64 GSI IRQ model to generic GSI IRQ layer · d8f4f161
      Lorenzo Pieralisi 提交于
      The code deployed to implement GSI linux IRQ numbers mapping on arm64 turns
      out to be generic enough so that it can be moved to ACPI core code along
      with its respective config option ACPI_GENERIC_GSI selectable on
      architectures that can reuse the same code.
      
      Current ACPI IRQ mapping code is not integrated in the kernel IRQ domain
      infrastructure, in particular there is no way to look-up the
      IRQ domain associated with a particular interrupt controller, so this
      first version of GSI generic code carries out the GSI<->IRQ mapping relying
      on the IRQ default domain which is supposed to be always set on a
      specific architecture in case the domain structure passed to
      irq_create/find_mapping() functions is missing.
      
      This patch moves the arm64 acpi functions that implement the gsi mappings:
      
      acpi_gsi_to_irq()
      acpi_register_gsi()
      acpi_unregister_gsi()
      
      to ACPI core code. Since the generic GSI<->domain mapping is based on IRQ
      domains, it can be extended as soon as a way to map an interrupt
      controller to an IRQ domain is implemented for ACPI in the IRQ domain
      layer.
      
      x86 and ia64 code for GSI mappings cannot rely on the generic GSI
      layer at present for legacy reasons, so they do not select the
      ACPI_GENERIC_GSI config options and keep relying on their arch
      specific GSI mapping layer.
      
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      d8f4f161
  4. 25 3月, 2015 1 次提交
  5. 06 2月, 2015 1 次提交
  6. 05 2月, 2015 1 次提交
  7. 29 1月, 2015 1 次提交
  8. 27 11月, 2014 2 次提交
    • A
      ACPI / PMIC: support PMIC operation region for XPower AXP288 · d8139f63
      Aaron Lu 提交于
      The Baytrail-T-CR platform firmware has defined two customized operation
      regions for PMIC chip Dollar Cove XPower - one is for power resource
      handling and one is for thermal just like the CrystalCove one. This patch
      adds support for them on top of the common PMIC opregion region code.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: Lee Jones <lee.jones@linaro.org> for the MFD part
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d8139f63
    • A
      ACPI / PMIC: support PMIC operation region for CrystalCove · b1eea857
      Aaron Lu 提交于
      The Baytrail-T platform firmware has defined two customized operation
      regions for PMIC chip Crystal Cove - one is for power resource handling
      and one is for thermal: sensor temperature reporting, trip point setting,
      etc. This patch adds support for them on top of the existing Crystal Cove
      PMIC driver.
      
      The reason to split code into a separate file intel_pmic.c is that there
      are more PMIC drivers with ACPI operation region support coming and we can
      re-use those code. The intel_pmic_opregion_data structure is created also
      for this purpose: when we need to support a new PMIC's operation region,
      we just need to fill those callbacks and the two register mapping tables.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: Lee Jones <lee.jones@linaro.org> for the MFD part
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b1eea857
  9. 05 11月, 2014 1 次提交
  10. 11 9月, 2014 1 次提交
    • Z
      ACPI: introduce ACPI int340x thermal scan handler · 3230bbfc
      Zhang Rui 提交于
      Newer laptops and tablets that use ACPI may have thermal sensors and
      other devices with thermal control capabilities outside the core CPU/SOC,
      for thermal safety reasons.
      They are exposed for the OS to use via
      1) INT3400 ACPI device object as the master.
      2) INT3401 ~ INT340B ACPI device objects as the slaves.
      
      This patch introduces a scan handler to enumerate the INT3400
      ACPI device object to platform bus, and prevent its slaves
      from being enumerated before the controller driver being probed.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      3230bbfc
  11. 21 7月, 2014 1 次提交
  12. 30 5月, 2014 4 次提交
    • R
      ACPI / scan: always register ACPI LPSS scan handler · d6ddaaac
      Rafael J. Wysocki 提交于
      Prevent platform devices from being created for ACPI LPSS devices
      if CONFIG_X86_INTEL_LPSS is unset by compiling out the LPSS scan
      handler's callbacks only in that case and still compiling its device
      ID list in and registering the scan handler in either case.
      
      This change is based on a prototype from Zhang Rui.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      d6ddaaac
    • R
      ACPI / scan: always register memory hotplug scan handler · cccd4208
      Rafael J. Wysocki 提交于
      Prevent platform devices from being created for ACPI memory device
      objects if CONFIG_ACPI_HOTPLUG_MEMORY is unset by compiling out the
      memory hotplug scan handler's callbacks only in that case and still
      compiling its device ID list in and registering the scan handler in
      either case.
      
      Also unset the memory hotplug scan handler's .attach() callback
      if acpi_no_memhotplug is set, but still register the scan handler to
      avoid creating platform devices for ACPI memory devices in that case
      too.
      
      This change is based on a prototype from Zhang Rui.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      cccd4208
    • R
      ACPI / scan: always register container scan handler · a1ec6572
      Rafael J. Wysocki 提交于
      Prevent platform devices from being created for ACPI containers
      if CONFIG_ACPI_CONTAINER is unset by compiling out the container
      scan handler's callbacks only in that case and still compiling
      its device ID list in and registering the scan handler in either
      case.
      
      This change is based on a prototype from Zhang Rui.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      a1ec6572
    • Z
      ACPI / PNP: use device ID list for PNPACPI device enumeration · eec15edb
      Zhang Rui 提交于
      ACPI can be used to enumerate PNP devices, but the code does not
      handle this in the right way currently.  Namely, if an ACPI device
      object
       1. Has a _CRS method,
       2. Has an identification of
          "three capital characters followed by four hex digits",
       3. Is not in the excluded IDs list,
      it will be enumerated to PNP bus (that is, a PNP device object will
      be create for it).  This means that, actually, the PNP bus type is
      used as the default bus type for enumerating _HID devices in ACPI.
      
      However, more and more _HID devices need to be enumerated to the
      platform bus instead (that is, platform device objects need to be
      created for them).  As a result, the device ID list in acpi_platform.c
      is used to enforce creating platform device objects rather than PNP
      device objects for matching devices.  That list has been continuously
      growing recently, unfortunately, and it is pretty much guaranteed to
      grow even more in the future.
      
      To address that problem it is better to enumerate _HID devices
      as platform devices by default.  To this end, change the way of
      enumerating PNP devices by adding a PNP ACPI scan handler that
      will use a device ID list to create PNP devices for the ACPI
      device objects whose device IDs are present in that list.
      
      The initial device ID list in the PNP ACPI scan handler contains
      all of the pnp_device_id strings from all the existing PNP drivers,
      so this change should be transparent to the PNP core and all of the
      PNP drivers.  Still, in the future it should be possible to reduce
      its size by converting PNP drivers that need not be PNP for any
      technical reasons into platform drivers.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      [rjw: Rewrote the changelog, modified the PNP ACPI scan handler code]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      eec15edb
  13. 06 5月, 2014 1 次提交
  14. 24 10月, 2013 1 次提交
  15. 12 10月, 2013 1 次提交
  16. 23 8月, 2013 1 次提交
  17. 28 6月, 2013 1 次提交
  18. 22 5月, 2013 1 次提交
    • R
      ACPI / PM: Allow device power states to be used for CONFIG_PM unset · ec4602a9
      Rafael J. Wysocki 提交于
      Currently, drivers/acpi/device_pm.c depends on CONFIG_PM and all of
      the functions defined in there are replaced with static inline stubs
      if that option is unset.  However, CONFIG_PM means, roughly, "runtime
      PM or suspend/hibernation support" and some of those functions are
      useful regardless of that.  For example, they are used by the ACPI
      fan driver for controlling fans and acpi_device_set_power() is called
      during device removal.  Moreover, device initialization may depend on
      setting device power states properly.
      
      For these reasons, make the routines manipulating ACPI device power
      states defined in drivers/acpi/device_pm.c available for CONFIG_PM
      unset too.
      Reported-by: NZhang Rui <rui.zhang@intel.com>
      Reported-and-tested-by: NMichel Lespinasse <walken@google.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      ec4602a9
  19. 14 5月, 2013 1 次提交
  20. 12 5月, 2013 1 次提交
    • R
      ACPI / processor: Use common hotplug infrastructure · ac212b69
      Rafael J. Wysocki 提交于
      Split the ACPI processor driver into two parts, one that is
      non-modular, resides in the ACPI core and handles the enumeration
      and hotplug of processors and one that implements the rest of the
      existing processor driver functionality.
      
      The non-modular part uses an ACPI scan handler object to enumerate
      processors on the basis of information provided by the ACPI namespace
      and to hook up with the common ACPI hotplug infrastructure.  It also
      populates the ACPI handle of each processor device having a
      corresponding object in the ACPI namespace, which allows the driver
      proper to bind to those devices, and makes the driver bind to them
      if it is readily available (i.e. loaded) when the scan handler's
      .attach() routine is running.
      
      There are a few reasons to make this change.
      
      First, switching the ACPI processor driver to using the common ACPI
      hotplug infrastructure reduces code duplication and size considerably,
      even though a new file is created along with a header comment etc.
      
      Second, since the common hotplug code attempts to offline devices
      before starting the (non-reversible) removal procedure, it will abort
      (and possibly roll back) hot-remove operations involving processors
      if cpu_down() returns an error code for one of them instead of
      continuing them blindly (if /sys/firmware/acpi/hotplug/force_remove
      is unset).  That is a more desirable behavior than what the current
      code does.
      
      Finally, the separation of the scan/hotplug part from the driver
      proper makes it possible to simplify the driver's .remove() routine,
      because it doesn't need to worry about the possible cleanup related
      to processor removal any more (the scan/hotplug part is responsible
      for that now) and can handle device removal and driver removal
      symmetricaly (i.e. as appropriate).
      
      Some user-visible changes in sysfs are made (for example, the
      'sysdev' link from the ACPI device node to the processor device's
      directory is gone and a 'physical_node' link is present instead
      and a corresponding 'firmware_node' is present in the processor
      device's directory, the processor driver is now visible under
      /sys/bus/cpu/drivers/ and bound to the processor device), but
      that shouldn't affect the functionality that users care about
      (frequency scaling, C-states and thermal management).
      
      Tested on my venerable Toshiba Portege R500.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: NToshi Kani <toshi.kani@hp.com>
      ac212b69
  21. 22 3月, 2013 1 次提交
    • R
      ACPI / scan: Add special handler for Intel Lynxpoint LPSS devices · f58b082a
      Rafael J. Wysocki 提交于
      Devices on the Intel Lynxpoint Low Power Subsystem (LPSS) have some
      common features that aren't shared with any other platform devices,
      including the clock and LTR (Latency Tolerance Reporting) registers.
      It is better to handle those features in common code than to bother
      device drivers with doing that (I/O functionality-wise the LPSS
      devices are generally compatible with other devices that don't
      have those special registers and may be handled by the same drivers).
      
      The clock registers of the LPSS devices are now taken care of by
      the special clk-x86-lpss driver, but the MMIO mappings used for
      accessing those registers can also be used for accessing the LTR
      registers on those devices (LTR support for the Lynxpoint LPSS is
      going to be added by a subsequent patch).  Thus it is convenient
      to add a special ACPI scan handler for the Lynxpoint LPSS devices
      that will create the MMIO mappings for accessing the clock (and
      LTR in the future) registers and will register the LPSS devices'
      clocks, so the clk-x86-lpss driver will only need to take care of
      the main Lynxpoint LPSS clock.
      
      Introduce a special ACPI scan handler for Intel Lynxpoint LPSS
      devices as described above.  This also reduces overhead related to
      browsing the ACPI namespace in search of the LPSS devices before the
      registration of their clocks, removes some LPSS-specific (and
      somewhat ugly) code from acpi_platform.c and shrinks the overall code
      size slightly.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NMike Turquette <mturquette@linaro.org>
      f58b082a
  22. 20 1月, 2013 1 次提交
    • M
      ACPI: add support for CSRT table · 13176bbf
      Mika Westerberg 提交于
      Core System Resources Table (CSRT) is a proprietary ACPI table that
      contains resources for certain devices that are not found in the DSDT
      table. Typically a shared DMA controller might be found here.
      
      This patch adds support for this table. We go through all entries in the
      table and make platform devices of them. The resources from the table are
      passed with the platform device.
      
      There is one special resource in the table and it is the DMA request line
      base and number of request lines. This information might be needed by the
      DMA controller driver as it needs to map the ACPI DMA request line number
      to the actual request line understood by the hardware. This range is passed
      as IORESOURCE_DMA resource.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      13176bbf
  23. 03 1月, 2013 1 次提交
  24. 23 11月, 2012 1 次提交
  25. 15 11月, 2012 3 次提交
  26. 17 10月, 2012 1 次提交
  27. 30 3月, 2012 1 次提交
  28. 21 1月, 2012 1 次提交
  29. 17 1月, 2012 1 次提交
    • H
      ACPI, Record ACPI NVS regions · b54ac6d2
      Huang Ying 提交于
      Some firmware will access memory in ACPI NVS region via APEI.  That
      is, instructions in APEI ERST/EINJ table will read/write ACPI NVS
      region.  The original resource conflict checking in APEI code will
      check memory/ioport accessed by APEI via general resource management
      mechanism.  But ACPI NVS region is marked as busy already, so that the
      false resource conflict will prevent APEI ERST/EINJ to work.
      
      To fix this, this patch record ACPI NVS regions, so that we can avoid
      request resources for memory region inside it.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b54ac6d2
  30. 29 5月, 2011 1 次提交
  31. 26 5月, 2011 1 次提交
  32. 07 1月, 2011 1 次提交
  33. 14 12月, 2010 1 次提交
    • Z
      IPMI/ACPI: Add the IPMI opregion driver to enable ACPI to access BMC controller · e92b297c
      Zhao Yakui 提交于
      ACPI 4.0 spec adds the ACPI IPMI opregion, which means that the ACPI AML
      code can also communicate with the BMC controller. This is to install
      the ACPI IPMI opregion and enable the ACPI to access the BMC controller
      through the IPMI message.
      
           It will create IPMI user interface for every IPMI device detected
      in ACPI namespace and install the corresponding IPMI opregion space handler.
      Then it can enable ACPI to access the BMC controller through the IPMI
      message.
      
      The following describes how to process the IPMI request in IPMI space handler:
          1. format the IPMI message based on the request in AML code.
          IPMI system address. Now the address type is SYSTEM_INTERFACE_ADDR_TYPE
          IPMI net function & command
          IPMI message payload
          2. send the IPMI message by using the function of ipmi_request_settime
          3. wait for the completion of IPMI message. It can be done in different
      routes: One is in handled in IPMI user recv callback function. Another is
      handled in timeout function.
          4. format the IPMI response and return it to ACPI AML code.
      
      At the same time it also addes the module dependency. The ACPI IPMI opregion
      will depend on the IPMI subsystem.
      Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e92b297c
  34. 15 8月, 2010 1 次提交