[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X+SMiJ1dC7AlZZI+@pendragon.ideasonboard.com>
Date: Thu, 24 Dec 2020 14:41:44 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Daniel Scally <djrscally@...il.com>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
devel@...ica.org, "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Yong Zhi <yong.zhi@...el.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Bingbu Cao <bingbu.cao@...el.com>,
Tian Shu Qiu <tian.shu.qiu@...el.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Robert Moore <robert.moore@...el.com>,
Erik Kaneda <erik.kaneda@...el.com>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Jacopo Mondi <jacopo+renesas@...ndi.org>,
kieran.bingham+renesas@...asonboard.com,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Marco Felsch <m.felsch@...gutronix.de>,
niklas.soderlund+renesas@...natech.se,
Steve Longerbeam <slongerbeam@...il.com>,
"Krogerus, Heikki" <heikki.krogerus@...ux.intel.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v3 06/14] include: fwnode.h: Define format macros for
ports and endpoints
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 <andy.shevchenko@...il.com>
> (after addressing nitpicks)
>
> > Suggested-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > Signed-off-by: Daniel Scally <djrscally@...il.com>
> > ---
> > 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 <laurent.pinchart@...asonboard.com>
> > #define NR_FWNODE_REFERENCE_ARGS 8
> >
> > /**
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists