From: Colin Foster <colin.foster@in-advantage.com>
To: Lee Jones <lee@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
UNGLinuxDriver@microchip.com,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Vladimir Oltean <olteanv@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Rob Herring <robh+dt@kernel.org>
Subject: Re: [RFC v4 net-next 12/17] mfd: ocelot: add shared resource names for switch functionality
Date: Mon, 31 Oct 2022 19:39:23 -0700 [thread overview]
Message-ID: <Y2CG29z9TroiQ/kr@COLIN-DESKTOP1.localdomain> (raw)
In-Reply-To: <Y1+Wxaub15XveooC@google.com>
Hi Lee,
On Mon, Oct 31, 2022 at 09:35:01AM +0000, Lee Jones wrote:
> On Sat, 08 Oct 2022, Colin Foster wrote:
>
> > The switch portion of the Ocelot chip relies on several resources. Define
> > the resource names here, so they can be referenced by both the switch
> > driver and the MFD.
> >
> > Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
> > ---
> >
> > v4
> > * New patch. Previous versions had entire structures shared,
> > this only requires that the names be shared.
> >
> > ---
> > include/linux/mfd/ocelot.h | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/include/linux/mfd/ocelot.h b/include/linux/mfd/ocelot.h
> > index dd72073d2d4f..b80f2f5ff1d6 100644
> > --- a/include/linux/mfd/ocelot.h
> > +++ b/include/linux/mfd/ocelot.h
> > @@ -13,6 +13,15 @@
> >
> > struct resource;
> >
> > +#define OCELOT_RES_NAME_ANA "ana"
> > +#define OCELOT_RES_NAME_QS "qs"
> > +#define OCELOT_RES_NAME_QSYS "qsys"
> > +#define OCELOT_RES_NAME_REW "rew"
> > +#define OCELOT_RES_NAME_SYS "sys"
> > +#define OCELOT_RES_NAME_S0 "s0"
> > +#define OCELOT_RES_NAME_S1 "s1"
> > +#define OCELOT_RES_NAME_S2 "s2"
>
> I've never been a fan of defining name strings.
>
> The end of the define name is identical to the resource names.
>
> This also makes grepping that much harder for little gain.
I defined them here because they'll be directly used in multiple files.
In this case, drivers/net/dsa/ocelot/ocelot_ext.c uses all these defines
as well as drivers/mfd/ocelot-core.c. Future patch sets will also
utilize other resource names by string as well...
But I'll plan to drop this patch next round unless someone disagrees.
Thanks for the feedback!
>
> --
> Lee Jones [李琼斯]
next prev parent reply other threads:[~2022-11-01 2:39 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-08 18:51 [RFC v4 net-next 00/17] add support for the the vsc7512 internal copper phys Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 01/17] net: mscc: ocelot: expose ocelot wm functions Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 02/17] net: mscc: ocelot: expose regfield definition to be used by other drivers Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 03/17] net: mscc: ocelot: expose stats layout " Colin Foster
2022-10-12 9:19 ` Vladimir Oltean
2022-10-08 18:51 ` [RFC v4 net-next 04/17] net: mscc: ocelot: expose vcap_props structure Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 05/17] net: mscc: ocelot: expose ocelot_reset routine Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 06/17] net: mscc: ocelot: expose vsc7514_regmap definition Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 07/17] net: dsa: felix: add configurable device quirks Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 08/17] net: dsa: felix: populate mac_capabilities for all ports Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 09/17] net: dsa: felix: add support for MFD configurations Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 10/17] net: dsa: felix: add functionality when not all ports are supported Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 11/17] mfd: ocelot: prepend resource size macros to be 32-bit Colin Foster
2022-10-31 9:32 ` Lee Jones
2022-10-08 18:51 ` [RFC v4 net-next 12/17] mfd: ocelot: add shared resource names for switch functionality Colin Foster
2022-10-31 9:35 ` Lee Jones
2022-11-01 2:39 ` Colin Foster [this message]
2022-10-08 18:51 ` [RFC v4 net-next 13/17] dt-bindings: mfd: ocelot: remove spi-max-frequency from required properties Colin Foster
2022-10-09 15:49 ` Krzysztof Kozlowski
2022-10-08 18:51 ` [RFC v4 net-next 14/17] dt-bindings: mfd: ocelot: add ethernet-switch hardware support Colin Foster
2022-10-09 15:52 ` Krzysztof Kozlowski
2022-10-08 18:51 ` [RFC v4 net-next 15/17] dt-bindings: net: dsa: ocelot: add ocelot-ext documentation Colin Foster
2022-10-09 15:58 ` Krzysztof Kozlowski
2022-10-08 18:51 ` [RFC v4 net-next 16/17] net: dsa: ocelot: add external ocelot switch control Colin Foster
2022-10-08 18:51 ` [RFC v4 net-next 17/17] mfd: " Colin Foster
2022-10-31 9:36 ` Lee Jones
2022-10-08 23:35 ` [RFC v4 net-next 00/17] add support for the the vsc7512 internal copper phys Vladimir Oltean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2CG29z9TroiQ/kr@COLIN-DESKTOP1.localdomain \
--to=colin.foster@in-advantage.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).