1. 07 10月, 2012 1 次提交
    • L
      ACPI: Add new sysfs interface to export device description · d1efe3c3
      Lance Ortiz 提交于
      Add support to export the device description obtained from the ACPI _STR
      method, if one exists for a device, to user-space via a sysfs interface.
      This new interface provides a standard and platform neutral way for users
      to obtain the description text stored in the ACPI _STR method.  If no
      _STR method exists for the device, no sysfs 'description' file will be
      created.  The 'description' file will be located in the /sys/devices/
      directory using the device's path.
      
      /sys/device/<bus>/<bridge path>/<device path>.../firmware_node/description
      
      Example:
      
      /sys/devices/pci0000:00/0000:00.07.0/0000:0e:00.0/firmware_node/description
      
      It can also be located using the ACPI device path, for example:
      
      /sys/devices/LNXSYSTM:00/device:00/ACPI0004:00/PNP0A08:00/device:13/device:15/description
      /sys/devices/LNXSYSTM:00/device:00/ACPI0004:00/ACPI0004:01/ACPI0007:02/description
      
      Execute the 'cat' command on the 'description' file to obtain the
      description string for that device.
      
      This patch also includes documentation describing how the new sysfs
      interface works
      
      Changes from v1-v2 based on comments by Len Brown and Fengguang Wu
      * Removed output "No Description" and leaving a NULL attribute if the
      _STR method failed to evaluate.
      
      * In acpi_device_remove_files() removed the redundent check of
      dev->pnp.str_obj before calling free.  This check triggered a message
      from smatch.
      Signed-off-by: NLance Ortiz <lance.ortiz@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d1efe3c3
  2. 03 10月, 2012 1 次提交
  3. 22 9月, 2012 2 次提交
    • M
      ACPI: introduce module_acpi_driver() helper macro · 0d2cf8f5
      Mika Westerberg 提交于
      Add a helper macro module_acpi_driver() which reduces the boilerplate code
      for ACPI drivers. This is similar what is done for other busses (PCI, SPI,
      I2C etc).
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      0d2cf8f5
    • L
      ACPI: Allow ACPI binding with USB-3.0 hub · 1033f904
      Lan Tianyu 提交于
      A USB port's position and connectability can't be identified on some boards
      via USB hub registers. ACPI _UPC and _PLD can help to resolve this issue
      and so it is necessary to bind USB with ACPI. This patch is to allow ACPI
      binding with USB-3.0 hub.
      
      Current ACPI only can bind one struct-device to one ACPI device node.
      This can not work with USB-3.0 hub, because the USB-3.0 hub has two logical
      devices. Each works for USB-2.0 and USB-3.0 devices. In the Linux USB subsystem,
      those two logical hubs are treated as two seperate devices that have two struct
      devices. But in the ACPI DSDT, these two logical hubs share one ACPI device
      node. So there is a requirement to bind multi struct-devices to one ACPI
      device node. This patch is to resolve such problem.
      
      Following is the ACPI device nodes' description under xhci hcd.
      
      Device (XHC)
                  Device (RHUB)
                      Device (HSP1)
                      Device (HSP2)
                      Device (HSP3)
                      Device (HSP4)
                      Device (SSP1)
                      Device (SSP2)
                      Device (SSP3)
                      Device (SSP4)
      
      Topology in the Linux
      
      	device XHC
      	   USB-2.0 logical hub    USB-3.0 logical hub
      		HSP1			SSP1
      		HSP2			SSP2
      		HSP3			SSP3
      		HSP4			SSP4
      
      This patch also modifies the output of /proc/acpi/wakeup. One ACPI node
      can be associated with multiple devices:
      
      XHC		S4	*enabled	pci:0000:00:14.0
      RHUB	S0	disabled	usb:usb1
      			disabled	usb:usb2
      Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
      Acked-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      1033f904
  4. 21 9月, 2012 9 次提交
  5. 18 9月, 2012 1 次提交
    • D
      cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure · 3d339dcb
      Daniel Lezcano 提交于
      Currently we have the cpuidle_device field in the acpi_processor_power structure.
      This adds a dependency between processor.h and cpuidle.h
      
      Although it is not a real problem, removing this dependency has the benefit of
      separating a bit more the cpuidle code from the rest of the acpi code.
      Also, the compilation should be a bit improved because we do no longer
      include cpuidle.h in processor.h. The preprocessor was generating 30418 loc
      and with this patch it generates 30256 loc for processor_thermal.c, a file
      which is not concerned at all by cpuidle, like processor_perflib.c and
      processor_throttling.c.
      
      That may sound ridiculous, but "small streams make big rivers" :P
      
      This patch moves this field into a static global per cpu variable like what is
      done in the intel_idle driver.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      3d339dcb
  6. 16 9月, 2012 1 次提交
  7. 05 9月, 2012 1 次提交
  8. 31 7月, 2012 1 次提交
    • L
      ACPI: delete _GTS/_BFS support · 3f6f49c7
      Len Brown 提交于
      _GTS and _BFS were added to the suspend/resume flow
      in the ACPI 2.0 specification.
      
      Linux dutifully implemented _GTS and _BFS.
      We discovered that it was rarely seen in systems
      in the field.  Further, some of those systems had
      AML so bogus that it could never work -- proof that
      no other operating system supports _GTS and _BFS.
      So we made _GTS and _BFS optional via modparam,
      and disabled them by default.
      
      But we've had to complicate some code to keep
      this support in the kernel, as these methods are defined
      to be evaluated very close to sleep entry and exit.
      Indeed, no other AML is ever evaluated with interrupts off.
      
      We have submitted a proposal for _GTS and _BFS
      to be officially removed from the ACPI specification
      on the next revision.  Here we remove it from Linux.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      3f6f49c7
  9. 18 7月, 2012 3 次提交
  10. 17 7月, 2012 6 次提交
  11. 14 7月, 2012 1 次提交
  12. 01 7月, 2012 3 次提交
  13. 24 6月, 2012 1 次提交
  14. 23 6月, 2012 1 次提交
  15. 04 6月, 2012 3 次提交
    • T
      ACPI: Add _OST support for sysfs eject · c4753e57
      Toshi Kani 提交于
      Changed acpi_bus_hot_remove_device() to support _OST. This function is
      also changed to global so that it can be called from hotplug notify
      handlers to perform hot-remove operation.
      
      Changed acpi_eject_store(), which is the sysfs eject handler. It checks
      eject_pending to see if the request was originated from ACPI eject
      notification. If not, it calls _OST(0x103,84,) per Figure 6-37 in ACPI
      5.0 spec.
      
      Added eject_pending bit to acpi_device_flags. This bit is set when the
      kernel has received an ACPI eject notification, but does not initiate
      its hot-remove operation by itself.
      
      Added struct acpi_eject_event. This structure is used to pass extended
      information to acpi_bus_hot_remove_device(), which has a single argument
      to support asynchronous call
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      c4753e57
    • T
      ACPI: Add an interface to evaluate _OST · 275c58d7
      Toshi Kani 提交于
      Added acpi_evaluate_hotplug_opt(). All ACPI hotplug handlers must call
      this function when evaluating _OST for hotplug operations. If the
      platform does not support _OST, this function returns AE_NOT_FOUND and
      has no effect on the platform.
      
      ACPI_HOTPLUG_OST is defined when all relevant ACPI hotplug operations,
      such as CPU, memory and container hotplug, are enabled. This assures
      consistent behavior among the hotplug operations with regarding the
      _OST support. When ACPI_HOTPLUG_OST is not defined, this function is
      a no-op.
      
      ACPI PCI hotplug is not enhanced to support _OST at this time since it
      is a legacy method being replaced by PCIe native hotplug. _OST support
      for ACPI PCI hotplug may be added in future if necessary.
      
      Some platforms may require the OS to support _OST in order to support
      ACPI hotplug operations. For example, if a platform has the management
      console where user can request a hotplug operation from, this _OST
      support would be required for the management console to show the result
      of the hotplug request to user.
      
      Added macro definitions of _OST source events and status codes.
      Also renamed OSC_SB_CPUHP_OST_SUPPORT to OSC_SB_HOTPLUG_OST_SUPPORT
      since this _OSC bit is not specific to CPU hotplug. This bit is
      defined in Table 6-147 of ACPI 5.0 as follows.
      
        Bits:       3
        Field Name: Insertion / Ejection _OST Processing Support
        Definition: This bit is set if OSPM will evaluate the _OST
                    object defined under a device when processing
                    insertion and ejection source event codes.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      275c58d7
    • L
      ACPI: fix acpi_bus.h build warnings when ACPI is not enabled · 7ae30986
      Len Brown 提交于
      introduced in Linux-3.5-rc1 by
      66886d6f
      (ACPI: Add stubs for (un)register_acpi_bus_type)
      
      Fix header file warnings when CONFIG_ACPI is not enabled:
      
      include/acpi/acpi_bus.h:443:42: warning: 'struct acpi_bus_type' declared inside parameter list
      include/acpi/acpi_bus.h:443:42: warning: its scope is only this definition or declaration, which is probably not
      include/acpi/acpi_bus.h:444:44: warning: 'struct acpi_bus_type' declared inside parameter list
      Signed-off-by: NLen Brown <len.brown@intel.com>
      7ae30986
  16. 01 6月, 2012 5 次提交