path: root/Documentation/acpi
diff options
authorMika Westerberg <>2014-09-16 14:52:36 +0300
committerLee Jones <>2014-09-26 08:24:05 +0100
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 <> Reviewed-by: Darren Hart <> Signed-off-by: Lee Jones <>
Diffstat (limited to 'Documentation/acpi')
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:
There are also devm_* versions of these functions which release the
descriptors once the device is released.
+MFD devices
+The MFD devices register their children as platform devices. For the child
+devices there needs to be an ACPI handle that they can use to reference
+parts of the ACPI namespace that relate to them. In the Linux MFD subsystem
+we provide two ways:
+ o The children share the parent ACPI handle.
+ o The MFD cell can specify the ACPI id of the device.
+For the first case, the MFD drivers do not need to do anything. The
+resulting child platform device will have its ACPI_COMPANION() set to point
+to the parent device.
+If the ACPI namespace has a device that we can match using an ACPI id,
+the id should be set like:
+ static struct mfd_cell my_subdevice_cell = {
+ .name = "my_subdevice",
+ /* set the resources relative to the parent */
+ .acpi_pnpid = "XYZ0001",
+ };
+The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under
+the MFD device and if found, that ACPI companion device is bound to the
+resulting child platform device.