Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6518818pxu; Thu, 24 Dec 2020 04:43:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvjRPH7XXFzpEYtUT6nephYyd61cgfjJJ9NQW8wAB4CkPrzT1zqUlgp8juDwwRMlGTztTv X-Received: by 2002:a17:906:8151:: with SMTP id z17mr28370873ejw.48.1608813811833; Thu, 24 Dec 2020 04:43:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608813811; cv=none; d=google.com; s=arc-20160816; b=P+xWYmD+gWxCIGp7WaQRZrFNwe9gS+WWlAZLLx5/IWObZEqfjTizXyA6w/K2CA+UUa Wc34ROYscvKHWK56DAOYvTaahrca6uqaiHE77jYYgiSITLuhmkej3UYqcPI1b42hXCXa 4IOlFCu/0FEe7yFtiHgPtkad62pvkK7gGfYZ+/yX6/6noB2obZtzGfKhwsVT92l/SoPl aIbrzj+0HkEr9OPMWf4cez7CxQCYZ7KnoLuFWYVXkrtcfiK5IHgf0cyKW/7cFIdmpVwu ZDJUsRY63i34qdI9Ao5kxe8z2lta6oKY7mGGSf/dRxs1U0EPsBgKRTz5fKYxiaSjbu0e 8vfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9SeE2dbl92OfeG3QWXRSlbOwzPm4djiGJJ+Z+UazEQU=; b=e63UgBwj8KqSJNt33NS+iFlDw/wgNuURBbWACT+P7q+sBP50RFnsWP/agfjhb9JsRf S1x1LRu6FTmGFgNhWMM44jiJOnjEijelspEv2p5kf0pLZEFq4hg+i4eo/QGycPyVQlIk BCVP31Bhv/aqXv4NPQfktfN5IZhkBDGkjKz2I85/93BJyivvg0ZaxRiK+3PiFI65LOV2 lX9/A9anGlUfjB600w0e8NeZV5CqMQ1wzTtgq+/RQpBNE+dWUIqoZjclN3JFGz3BrM6O yC9bWWPFoMFQAhAZdE+EOGgGH5q7DhjCfHozPQTLV5xLGzXBg5JQMS3w9Ew96U8JjzFR hi6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SrcTe9Wv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zn8si14840975ejb.32.2020.12.24.04.43.07; Thu, 24 Dec 2020 04:43:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SrcTe9Wv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727184AbgLXMmh (ORCPT + 99 others); Thu, 24 Dec 2020 07:42:37 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:46178 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726544AbgLXMmg (ORCPT ); Thu, 24 Dec 2020 07:42:36 -0500 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AC005A1D; Thu, 24 Dec 2020 13:41:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1608813712; bh=J/8sxE1HCRi3qy+XlujR1ZWY51W837kVZDGvsYwH3VE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SrcTe9Wv7dxB/G451JnRL2NfU6J+09V4l9RjvYlsNUOfkswXW2TDbY7qjQDzEP1iv aGoHkXR39j3JqD8l1lvspdWNuDuly1ZF6M1En3YyMzN5r1UlUnZW+oY6fJmFYULiI0 vzCot/qducG4HcxNTUml86J/ZTviHLi8ktaJDVwA= Date: Thu, 24 Dec 2020 14:41:44 +0200 From: Laurent Pinchart To: Daniel Scally Cc: Andy Shevchenko , Linux Kernel Mailing List , ACPI Devel Maling List , Linux Media Mailing List , devel@acpica.org, "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Yong Zhi , Sakari Ailus , Bingbu Cao , Tian Shu Qiu , Mauro Carvalho Chehab , Robert Moore , Erik Kaneda , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Laurent Pinchart , Jacopo Mondi , kieran.bingham+renesas@ideasonboard.com, Hans Verkuil , Marco Felsch , niklas.soderlund+renesas@ragnatech.se, Steve Longerbeam , "Krogerus, Heikki" , Linus Walleij Subject: Re: [PATCH v3 06/14] include: fwnode.h: Define format macros for ports and endpoints Message-ID: References: <20201224010907.263125-1-djrscally@gmail.com> <20201224010907.263125-7-djrscally@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, Thank you for the patch. On Thu, Dec 24, 2020 at 02:17:07PM +0200, Andy Shevchenko wrote: > On Thu, Dec 24, 2020 at 3:12 AM Daniel Scally wrote: > > > > OF, ACPI and software_nodes all implement graphs including nodes for ports > > and endpoints. These are all intended to be named with a common schema, > > as "port@n" and "endpoint@n" where n is an unsigned int representing the > > index of the node. To ensure commonality across the subsystems, provide a > > set of macros to define the format. > > Nitpicks below, but in general that's what I meant, thanks! > > Reviewed-by: Andy Shevchenko > (after addressing nitpicks) > > > Suggested-by: Andy Shevchenko > > Signed-off-by: Daniel Scally > > --- > > Changes in v3 > > - Patch introduced > > > > include/linux/fwnode.h | 13 +++++++++++++ > > 1 file changed, 13 insertions(+) > > > > diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h > > index 9506f8ec0974..52889efceb7d 100644 > > --- a/include/linux/fwnode.h > > +++ b/include/linux/fwnode.h > > @@ -32,6 +32,19 @@ struct fwnode_endpoint { > > const struct fwnode_handle *local_fwnode; > > }; > > > > +/* > > + * ports and endpoints defined in OF, ACPI and as software_nodes should all > > + * follow a common naming scheme; use these macros to ensure commonality across > > + * the subsystems. > > + * > > + * The *PREFIX_LEN macros refer to the length of the "port@" and "endpoint@" > > *PREFIX_LEN -> *_PREFIX_LEN > > > + * sections of the naming scheme. > > + */ > > +#define FWNODE_GRAPH_PORT_NAME_FORMAT "port@%u" > > +#define FWNODE_GRAPH_PORT_NAME_PREFIX_LEN 5 > > +#define FWNODE_GRAPH_ENDPOINT_NAME_FORMAT "endpoint@%u" > > +#define FWNODE_GRAPH_ENDPOINT_PREFIX_LEN 9 > > _FORMAT -> _FMT (however, V4L2 guys may correct me, because IIRC _FMT > suffix is also used for other things in v4l2. This isn't related to V4L2, so it doesn't matter much :-) I personally prefer spelling names out in full when that wouldn't result in too long lines, but it's really a matter of personal preference, I don't mind either way. Reviewed-by: Laurent Pinchart > > #define NR_FWNODE_REFERENCE_ARGS 8 > > > > /** -- Regards, Laurent Pinchart