Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423061AbbENXAV (ORCPT ); Thu, 14 May 2015 19:00:21 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:53998 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422981AbbENXAM (ORCPT ); Thu, 14 May 2015 19:00:12 -0400 From: Laurent Pinchart To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, Laura Abbott , Arnd Bergmann , Mitchel Humpherys , Joreg Roedel , Will Deacon , Grant Likely , Robin Murphy , Marek Szyprowski , Thierry Reding , Greg Kroah-Hartman Subject: [RFC/PATCH 7/9] iommu: of: Document the of_iommu_configure() function Date: Fri, 15 May 2015 02:00:08 +0300 Message-Id: <1431644410-2997-8-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.3.6 In-Reply-To: <1431644410-2997-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1431644410-2997-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1505 Lines: 39 The function isn't trivial, document its behaviour. Signed-off-by: Laurent Pinchart --- drivers/iommu/of_iommu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 43429ab62228..b922ed4f9fb3 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -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) { -- 2.3.6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/