[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <153928658292.5275.11321177725702156165@swboyd.mtv.corp.google.com>
Date: Thu, 11 Oct 2018 12:36:22 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Mark Brown <broonie@...nel.org>
Cc: Charles Keepax <ckeepax@...nsource.cirrus.com>,
lee.jones@...aro.org, linus.walleij@...aro.org,
mturquette@...libre.com, robh+dt@...nel.org, mark.rutland@....com,
lgirdwood@...il.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, patches@...nsource.cirrus.com,
linux-clk@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH v2 3/5] clk: lochnagar: Add support for the Cirrus Logic Lochnagar
Quoting Mark Brown (2018-10-11 07:54:22)
> On Thu, Oct 11, 2018 at 12:00:46AM -0700, Stephen Boyd wrote:
> > Quoting Charles Keepax (2018-10-08 06:25:40)
>
> > > +struct lochnagar_regmap_clk {
> > > + unsigned int cfg_reg;
> > > + unsigned int ena_mask;
> > > + unsigned int dir_mask;
> > > +
> > > + unsigned int src_reg;
> > > + unsigned int src_mask;
>
> > Are these 32 bits or 16 bits or 8 bits? Please use a u32/u16/u8 so we
> > know the register width.
>
> Note that regmap always uses unsigned int to represent registers
> regardless of the underlying physical register width, this can be an
> issue on reads since we pass the destination for the read in by address.
>
> > > +struct lochnagar_clk_priv {
> > > + struct device *dev;
> > > + struct lochnagar *lochnagar;
>
> > Is this used for anything besides getting the regmap? Can you get the
> > pointer to the parent in probe and use that to get the regmap pointer
> > from dev_get_remap() and also use the of_node of the parent to register
>
> dev_get_regmap() is pretty expensive, I'd not advise using it in
> anything that might approximate a fast path. It's kind of debatable
> when I2C gets involved but still feels wrong.
I'm suggesting the regmap is acquired in probe and a pointer is stored
here in this structure. That is not a fastpath as far as I know.
Powered by blists - more mailing lists