From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932206AbbE1NC4 (ORCPT ); Thu, 28 May 2015 09:02:56 -0400 Received: from foss.arm.com ([217.140.101.70]:54735 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbbE1NCt (ORCPT ); Thu, 28 May 2015 09:02:49 -0400 Date: Thu, 28 May 2015 14:02:39 +0100 From: Will Deacon To: Laurent Pinchart Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "iommu@lists.linux-foundation.org" , Laura Abbott , Arnd Bergmann , Mitchel Humpherys , Joreg Roedel , "grant.likely@linaro.org" , Robin Murphy , Marek Szyprowski , Thierry Reding , Greg Kroah-Hartman Subject: Re: [RFC/PATCH 7/9] iommu: of: Document the of_iommu_configure() function Message-ID: <20150528130239.GH31001@arm.com> References: <1431644410-2997-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <1431644410-2997-8-git-send-email-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431644410-2997-8-git-send-email-laurent.pinchart+renesas@ideasonboard.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2015 at 12:00:08AM +0100, Laurent Pinchart wrote: > The function isn't trivial, document its behaviour. > > Signed-off-by: Laurent Pinchart > --- > drivers/iommu/of_iommu.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) Thanks for doing this. Acked-by: Will Deacon Will > 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 >