]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
iommu: of: Document the of_iommu_configure() function
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 14 May 2015 23:00:08 +0000 (02:00 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Aug 2017 10:51:17 +0000 (12:51 +0200)
The function isn't trivial, document its behaviour.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/iommu/of_iommu.c

index 60ba238090d92f3eed93de994d5fd7271a68b8ce..136769a99822e2ff0b49110d41365ac499ef2cf9 100644 (file)
@@ -133,6 +133,19 @@ struct iommu_ops *of_iommu_get_ops(struct device_node *np)
        return ops;
 }
 
+/**
+ * of_iommu_configure - Configure and return the IOMMU for a device
+ * @dev: device for which to configure the IOMMU
+ * @master_np: device node of the bus master connected to the IOMMU
+ *
+ * The master_np parameter specifies the device node of the bus master seen by
+ * the IOMMU. This is usually the device node of the dev device, but can be the
+ * device node of a bridge when the device is dynamically discovered and
+ * instantiated and thus has no device node (such as PCI devices for instance).
+ *
+ * Return a pointer to the iommu_ops for the device, NULL if the device isn't
+ * connected to an IOMMU, or a negative value if an error occurs.
+ */
 struct iommu_ops *of_iommu_configure(struct device *dev,
                                     struct device_node *master_np)
 {