From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"marek.vasut+renesas@gmail.com" <marek.vasut+renesas@gmail.com>,
"yoshihiro.shimoda.uh@renesas.com"
<yoshihiro.shimoda.uh@renesas.com>,
"broonie@kernel.org" <broonie@kernel.org>,
"bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com>,
"lee.jones@linaro.org" <lee.jones@linaro.org>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
linux-power <linux-power@fi.rohmeurope.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"khiem.nguyen.xt@renesas.com" <khiem.nguyen.xt@renesas.com>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 03/10] regulator: bd9571mwv: rid of using struct bd9571mwv
Date: Tue, 15 Dec 2020 17:13:05 +0100 [thread overview]
Message-ID: <CAMuHMdWuoRMsNMPKgni3HENRT7RnCTyEjs5Zy2r4gw9f2B0Cng@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdVgo1fuY9jPpxUJiCOmN4Ahs7YXddzUfKH+4106i1xiuA@mail.gmail.com>
On Tue, Dec 15, 2020 at 5:02 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Fri, Dec 11, 2020 at 3:03 PM Vaittinen, Matti
> <Matti.Vaittinen@fi.rohmeurope.com> wrote:
> > On Fri, 2020-12-11 at 20:27 +0900, Yoshihiro Shimoda wrote:
> > > To simplify this driver, use dev_get_regmap() and
> > > rid of using struct bd9571mwv.
> > >
> > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > > ---
> > > drivers/regulator/bd9571mwv-regulator.c | 49 +++++++++++++++++----
> > > ------------
> > > 1 file changed, 26 insertions(+), 23 deletions(-)
> > >
> > > diff --git a/drivers/regulator/bd9571mwv-regulator.c
> > > b/drivers/regulator/bd9571mwv-regulator.c
> > > index e690c2c..02120b0 100644
> > > --- a/drivers/regulator/bd9571mwv-regulator.c
> > > +++ b/drivers/regulator/bd9571mwv-regulator.c
> > > @@ -17,7 +17,7 @@
> > > #include <linux/mfd/bd9571mwv.h>
> > >
> > > struct bd9571mwv_reg {
> > > - struct bd9571mwv *bd;
> > > + struct regmap *regmap;
> >
> > As a 'nit':
> > I might consider adding the dev pointer here to avoid extra argument
> > with all the bkup_mode functions below. (just pass this struct and
> > mode). But that's only my preference - feel free to ignore this comment
> > if patch is Ok to Mark, Marek & Others :)
>
> Struct regmap already contains a struct device pointer, but that's internal
> to regmap.
>
> Perhaps adding a regmap_device() helper to retrieve the device pointer
> might be worthwhile?
-EEXISTS ;-)
struct device *regmap_get_device(struct regmap *map)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2020-12-15 16:14 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 11:27 [PATCH v2 00/10] treewide: bd9571mwv: Add support for BD9574MWF Yoshihiro Shimoda
2020-12-11 11:27 ` [PATCH v2 01/10] dt-bindings: mfd: bd9571mwv: Document BD9574MWF Yoshihiro Shimoda
2020-12-11 11:27 ` [PATCH v2 02/10] mfd: rohm-generic: Add BD9571 and BD9574 Yoshihiro Shimoda
2020-12-11 11:36 ` Vaittinen, Matti
2020-12-11 11:27 ` [PATCH v2 03/10] regulator: bd9571mwv: rid of using struct bd9571mwv Yoshihiro Shimoda
2020-12-11 12:00 ` Vaittinen, Matti
2020-12-15 16:02 ` Geert Uytterhoeven
2020-12-15 16:13 ` Geert Uytterhoeven [this message]
2020-12-16 2:13 ` Yoshihiro Shimoda
2020-12-16 6:00 ` Vaittinen, Matti
2020-12-16 6:29 ` Yoshihiro Shimoda
2020-12-16 6:55 ` Vaittinen, Matti
2020-12-11 11:27 ` [PATCH v2 04/10] regulator: bd9571mwv: Add BD9574MWF support Yoshihiro Shimoda
2020-12-11 12:34 ` Vaittinen, Matti
2020-12-14 4:57 ` Yoshihiro Shimoda
2020-12-14 7:12 ` Vaittinen, Matti
2020-12-14 8:22 ` Yoshihiro Shimoda
2020-12-11 11:27 ` [PATCH v2 05/10] gpio: bd9571mwv: Use the SPDX license identifier Yoshihiro Shimoda
2020-12-15 16:08 ` Geert Uytterhoeven
2020-12-11 11:27 ` [PATCH v2 06/10] gpio: bd9571mwv: rid of using struct bd9571mwv Yoshihiro Shimoda
2020-12-11 12:42 ` Vaittinen, Matti
2020-12-11 11:27 ` [PATCH v2 07/10] gpio: bd9571mwv: Add BD9574MWF support Yoshihiro Shimoda
2020-12-11 12:55 ` Vaittinen, Matti
2020-12-14 5:11 ` Yoshihiro Shimoda
2020-12-11 11:27 ` [PATCH v2 08/10] mfd: bd9571mwv: Use the SPDX license identifier Yoshihiro Shimoda
2020-12-14 12:12 ` Yoshihiro Shimoda
2020-12-11 11:27 ` [PATCH v2 09/10] mfd: bd9571mwv: Make the driver more generic Yoshihiro Shimoda
2020-12-11 13:29 ` Vaittinen, Matti
2020-12-14 6:21 ` Yoshihiro Shimoda
2020-12-11 11:27 ` [PATCH v2 10/10] mfd: bd9571mwv: Add support for BD9574MWF Yoshihiro Shimoda
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=CAMuHMdWuoRMsNMPKgni3HENRT7RnCTyEjs5Zy2r4gw9f2B0Cng@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=Matti.Vaittinen@fi.rohmeurope.com \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=khiem.nguyen.xt@renesas.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-power@fi.rohmeurope.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=yoshihiro.shimoda.uh@renesas.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).