[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211116174115.wft626rue2ya2sqv@skbuf>
Date: Tue, 16 Nov 2021 17:41:16 +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>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.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>,
Ioana Ciornei <ioana.ciornei@....com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Lars Povlsen <lars.povlsen@...rochip.com>,
Steen Hegelund <Steen.Hegelund@...rochip.com>,
Linus Walleij <linus.walleij@...aro.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [RFC PATCH v4 net-next 00/23] add support for VSC75XX control
over SPI
On Tue, Nov 16, 2021 at 07:32:08AM -0800, Colin Foster wrote:
> > > One thing to note: I've been following a pattern of adding "offset"
> > > variables to these drivers. I'm looking for feedback here, because I
> > > don't like it - however I feel like it is the "least bad" interface I
> > > could come up with.
> > >
> > > Specifically, ocelot has a regmap for GCB. ocelot-pinctrl would create a
> > > smaller regmap at an address of "GCB + 0x34".
> > >
> > > There are three options I saw here:
> > > 1. Have vsc7512_spi create a new regmap at GCB + 0x34 and pass that to
> > > ocelot-pinctrl
> > > 2. Give ocelot-pinctrl the concept of a "parent bus" by which it could
> > > request a regmap.
> > > 3. Keep the same GCB regmap, but pass in 0x34 as an offset.
> > >
> > >
> > > I will admit that option 2 sounds very enticing, but I don't know if
> > > that type of interaction exists. If not, implementing it is probably
> > > outside the scope of a first patch set. As such, I opted for option 3.
> >
> > I think that type of interaction is called "mfd", potentially even "syscon".
>
> Before diving in, I'd come across mfd and thought that might be the
> answer. I'll reconsider it now that I have several months of staring at
> kernel code under my belt. Maybe an mfd that does SPI setup and chip
> resetting. Then I could remove all SPI code from ocelot_vsc7512_spi.
That sounds acceptable to me.
Powered by blists - more mailing lists