aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/acpi
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2014-09-16 07:52:36 -0400
committerLee Jones <lee.jones@linaro.org>2014-09-26 03:24:05 -0400
commit6ab3430129e258ea31dd214adf1c760dfafde67a (patch)
treeff8b82f6039f2d7b2761da82ab5ca5ac37f27114 /Documentation/acpi
parent7be180cc7a0c5768a984126d9468afc82dcf93a2 (diff)
mfd: Add ACPI support
If an MFD device is backed by ACPI namespace, we should allow subdevice drivers to access their corresponding ACPI companion devices through normal means (e.g using ACPI_COMPANION()). This patch adds such support to the MFD core. If the MFD parent device does not specify any ACPI _HID/_CID for the child device, the child device will share the parent ACPI companion device. Otherwise the child device will be assigned with the corresponding ACPI companion, if found in the namespace below the parent. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'Documentation/acpi')
-rw-r--r--Documentation/acpi/enumeration.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt
index e182be5e3c83..b60d2ab69497 100644
--- a/Documentation/acpi/enumeration.txt
+++ b/Documentation/acpi/enumeration.txt
@@ -312,3 +312,30 @@ a code like this:
312 312
313There are also devm_* versions of these functions which release the 313There are also devm_* versions of these functions which release the
314descriptors once the device is released. 314descriptors once the device is released.
315
316MFD devices
317~~~~~~~~~~~
318The MFD devices register their children as platform devices. For the child
319devices there needs to be an ACPI handle that they can use to reference
320parts of the ACPI namespace that relate to them. In the Linux MFD subsystem
321we provide two ways:
322
323 o The children share the parent ACPI handle.
324 o The MFD cell can specify the ACPI id of the device.
325
326For the first case, the MFD drivers do not need to do anything. The
327resulting child platform device will have its ACPI_COMPANION() set to point
328to the parent device.
329
330If the ACPI namespace has a device that we can match using an ACPI id,
331the id should be set like:
332
333 static struct mfd_cell my_subdevice_cell = {
334 .name = "my_subdevice",
335 /* set the resources relative to the parent */
336 .acpi_pnpid = "XYZ0001",
337 };
338
339The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under
340the MFD device and if found, that ACPI companion device is bound to the
341resulting child platform device.