diff options
author | Octavian Purdila <octavian.purdila@intel.com> | 2016-07-08 19:13:11 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-07-08 22:52:35 +0300 |
commit | 7f24467f3b357ab6abc146c47fcedd7d57a189b6 (patch) | |
tree | f10e4517ba422e4ed292c13609fc599fb03bb722 /Documentation/acpi | |
parent | 525e6fabeae286848592363bda13bc34b59bb5ac (diff) | |
download | linux-7f24467f3b357ab6abc146c47fcedd7d57a189b6.tar.xz |
spi / ACPI: add support for ACPI reconfigure notifications
This patch adds supports for SPI device enumeration and removal via
ACPI reconfiguration notifications that are send as a result of an
ACPI table load or unload operation.
The code is very similar with the device tree reconfiguration code
with only small differences in the way we test and set the enumerated
state of the device:
* the equivalent of device tree's OF_POPULATED flag is the
flags.visited field in the ACPI device and the following wrappers
are used to manipulate it: acpi_device_enumerated(),
acpi_device_set_enumerated() and acpi_device_clear_enumerated()
* the device tree code checks of status of the OF_POPULATED flag to
avoid trying to create duplicate Linux devices in two places: once
when the controller is probed, and once when the reconfigure event
is received; in the ACPI code the check is performed only once when
the ACPI namespace is searched because this code path is invoked in
both of the two mentioned cases
The rest of the enumeration handling is similar with device tree: when
the Linux device is unregistered the ACPI device is marked as not
enumerated; also, when a device remove notification is received we
check that the device is in the enumerated state before continuing
with the removal of the Linux device.
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/acpi')
0 files changed, 0 insertions, 0 deletions