[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211204120719.fd7t3zsj7yk4dq2v@skbuf>
Date: Sat, 4 Dec 2021 12:07:20 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: Colin Foster <colin.foster@...advantage.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
"UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH v1 net-next 3/6] net: dsa: ocelot: felix: add interface
for custom regmaps
On Fri, Dec 03, 2021 at 04:11:40PM -0800, Colin Foster wrote:
> On Mon, Nov 22, 2021 at 08:45:56AM -0800, Colin Foster wrote:
> > On Sun, Nov 21, 2021 at 05:19:02PM +0000, Vladimir Oltean wrote:
> > > On Fri, Nov 19, 2021 at 02:43:10PM -0800, Colin Foster wrote:
> > > > Add an interface so that non-mmio regmaps can be used
> > > >
> > > > Signed-off-by: Colin Foster <colin.foster@...advantage.com>
> > > > ---
> > >
> > > What is your plan with treating the vsc7514 spi chip as a multi function
> > > device, of which the DSA driver would probe only on the Ethernet switch
> > > portion of it? Would this patch still be needed in its current form?
> >
> > I don't have this fully mapped out, so I'm not positive. I think it
> > would be needed though. Felix and Ocelot need regmaps and will need to
> > get them from somewhere. The VSC7512 switch driver will need to provide
> > the regmap directly (current form) or indirectly (by requesting it from
> > the MFD parent).
> >
> > I'll be looking more into MFD devices as well. The madera driver seems
> > like one I'd use to model the VSC751X MFD after - just from a brief look
> > around the drivers/mfd directory.
>
> As you can infer from my RFC today - I've looked more into what the MFD
> implementation will be. I believe that will have no effect on this
> patch. Felix needs "ANA", so if it gets that regmap from the resource
Oh, Felix needs much more than just the analyzer target. But I get the
overall point, having the DSA driver get the regmaps from the MFD parent
should be fine.
> (felix / seville), by "devm_regmap_init" (current implementation) or
> "dev_get_regmap(dev->parent, res->name);" should make no difference from
> the Felix driver standpoint.
>
> That said, I'm fine holding this one off until that's proven out. I'd
> like to get feedback on my general RFC before skinking a couple days
> into that restructure.
Some feedback given:
https://lore.kernel.org/all/20211204022037.dkipkk42qet4u7go@skbuf/T/
TL;DR: my current opinion is that MFD is the way to go. Andrew, Florian,
Vivien, please chime in and share your opinion too, because this has
potential implications on the design of future DSA switch drivers too,
once a model like Colin's gets established.
Powered by blists - more mailing lists