[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 11 Nov 2019 11:20:46 +0000
From: "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
To: "lee.jones@...aro.org" <lee.jones@...aro.org>
CC: "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
"dmurphy@...com" <dmurphy@...com>,
"linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mturquette@...libre.com" <mturquette@...libre.com>,
"lgirdwood@...il.com" <lgirdwood@...il.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"mazziesaccount@...il.com" <mazziesaccount@...il.com>,
"a.zummo@...ertech.it" <a.zummo@...ertech.it>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"jacek.anaszewski@...il.com" <jacek.anaszewski@...il.com>,
"bgolaszewski@...libre.com" <bgolaszewski@...libre.com>,
"linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
"sboyd@...nel.org" <sboyd@...nel.org>,
"pavel@....cz" <pavel@....cz>,
"broonie@...nel.org" <broonie@...nel.org>
Subject: Re: [RFC PATCH v3 01/15] mfd: bd71828: Support ROHM BD71828 PMIC -
core
Hello Lee,
Thanks for the review!
I was slightly worried I really managed to piss you off last time :)
Glad to see I didn't burn all the bridges (yet) ;)
On Mon, 2019-11-11 at 10:57 +0000, Lee Jones wrote:
> On Fri, 01 Nov 2019, Matti Vaittinen wrote:
>
> > BD71828GW is a single-chip power management IC for battery-powered
> > portable
> > devices. The IC integrates 7 buck converters, 7 LDOs, and a 1500 mA
> > single-cell linear charger. Also included is a Coulomb counter, a
> > real-time
> > clock (RTC), 3 GPO/regulator control pins, HALL input and a 32.768
> > kHz
> > clock gate.
> >
> > Add MFD core driver providing interrupt controller facilities and
> > i2c
> > access to sub device drivers.
> >
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> > ---
> >
> > No changes compared to v2
> >
> > drivers/mfd/Kconfig | 15 ++
> > drivers/mfd/Makefile | 2 +-
> > drivers/mfd/rohm-bd71828.c | 322 +++++++++++++++++++++++
> > include/linux/mfd/rohm-bd71828.h | 425
> > +++++++++++++++++++++++++++++++
> > include/linux/mfd/rohm-generic.h | 1 +
> > 5 files changed, 764 insertions(+), 1 deletion(-)
> > create mode 100644 drivers/mfd/rohm-bd71828.c
> > create mode 100644 include/linux/mfd/rohm-bd71828.h
>
> /me wonders why this is still an RFC after 3 revisions?
Because of the regulator part. I've had no comments for it - but I
don't think it should be applied as is in this series. I was kind of
hoping someone more experienced could have pointed me that what I have
tried to achieve here is already handled as <something I am missing
now>.
I don't think we should add sysfs control IF for disabling regulators
(I will drop that completely from first non RFC patch - but I hoped I
might get some friendly pokes/pushes to right direction). Nor am I
happy on how the run-state transitions which impact many regulators are
now handled via single regulator reference - but I can't think of
better approach just now. I hoped I am just missing something which is
obvious to more experienced regulator guys.
If I won't get comments to regulators I'll just drop the sysfs
interfaces (and possibly whole run-level control) and send series
without the RFC then. But I am still cautiously hopeful that Mark has
just a extraordinarily busy moment and will give me some feedback
before I finish v4 :)
> > +unsigned int bit0_offsets[] = {11}; /* RTC IRQ
> > register */
> > +unsigned int bit1_offsets[] = {10}; /* TEMP IRQ
> > register */
> > +unsigned int bit2_offsets[] = {6, 7, 8, 9}; /* BAT MON IRQ
> > registers */
> > +unsigned int bit3_offsets[] = {5}; /* BAT IRQ register */
> > +unsigned int bit4_offsets[] = {4}; /* CHG IRQ register */
> > +unsigned int bit5_offsets[] = {3}; /* VSYS IRQ register */
> > +unsigned int bit6_offsets[] = {1, 2}; /* DCIN IRQ
> > registers */
>
> Something actually wrong with the tabbing here, or is this a
> Git/patch/mailer anomaly?
I'll check this - I need to staticize these anyways.
> >
> > +static const struct of_device_id bd71828_of_match[] = {
> > + { .compatible = "rohm,bd71828", },
> > + { },
> > +};
> > +MODULE_DEVICE_TABLE(of, bd71828_of_match);
> > +
> > +static struct i2c_driver bd71828_drv = {
> > + .driver = {
> > + .name = "rohm-bd71828",
> > + .of_match_table = bd71828_of_match,
> > + },
> > + .probe = &bd71828_i2c_probe,
>
> If 'id' isn't used, perhaps you should be using probe2?
probe2? Sounds like I need to do my homework once again :) Thanks for
the pointer.
Rest of the comments were pretty obvious - thanks. I'll fix these for
v4.
Br,
Matti
Powered by blists - more mailing lists