From: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: "Mark Brown" <broonie@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Sebastian Reichel" <sre@kernel.org>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Andreas Färber" <afaerber@suse.de>,
"Linus Walleij" <linus.walleij@linaro.org>,
linux-actions@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v5 3/7] mfd: Add MFD driver for ATC260x PMICs
Date: Wed, 20 Jan 2021 20:39:50 +0200 [thread overview]
Message-ID: <20210120183950.GA867982@BV030612LT> (raw)
In-Reply-To: <20210120083348.GM4903@dell>
On Wed, Jan 20, 2021 at 08:33:48AM +0000, Lee Jones wrote:
> On Wed, 13 Jan 2021, Cristian Ciocaltea wrote:
>
> > Add initial support for the Actions Semi ATC260x PMICs which integrates
> > Audio Codec, Power management, Clock generation and GPIO controller
> > blocks.
> >
[...]
> > + /* Initialize the hardware */
> > + atc260x->dev_init(atc260x);
> > +
> > + ret = regmap_read(atc260x->regmap, atc260x->rev_reg, &chip_rev);
> > + if (ret) {
> > + dev_err(dev, "Failed to get chip revision\n");
> > + return ret;
> > + }
> > +
> > + if (chip_rev > 31) {
>
> Nit: If you have to respin this, please define this magic number.
>
[...]
> > +static struct i2c_driver atc260x_i2c_driver = {
> > + .driver = {
> > + .name = "atc260x",
> > + .of_match_table = of_match_ptr(atc260x_i2c_of_match),
> > + },
> > + .probe = atc260x_i2c_probe,
> > +};
>
> Nit: These spacings/line-ups just look odd.
>
> Please stick to one ' ' after the '='.
[...]
> > + const char *type_name;
> > + unsigned int rev_reg;
> > +
> > + int (*dev_init)(struct atc260x *atc260x);
>
> Ah, I didn't see this before.
>
> Call-backs of this nature are the devil. Please populate a struct
> with the differentiating register addresses/values instead and always
> call a generic deivce_init().
I have implemented this, including the other 2 suggestions above, in
the already submitted revision v6.
Thanks,
Cristi
> > +};
> > +
> > +struct regmap_config;
> > +
> > +int atc260x_match_device(struct atc260x *atc260x, struct regmap_config *regmap_cfg);
> > +int atc260x_device_probe(struct atc260x *atc260x);
> > +
> > +#endif /* __LINUX_MFD_ATC260X_CORE_H */
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2021-01-20 18:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 11:05 [PATCH v5 0/7] Add initial support for ATC260x PMICs Cristian Ciocaltea
2021-01-13 11:05 ` [PATCH v5 1/7] dt-bindings: input: Add reset-time-sec common property Cristian Ciocaltea
2021-01-13 11:05 ` [PATCH v5 2/7] dt-bindings: mfd: Add Actions Semi ATC260x PMIC binding Cristian Ciocaltea
2021-01-13 11:05 ` [PATCH v5 3/7] mfd: Add MFD driver for ATC260x PMICs Cristian Ciocaltea
2021-01-20 8:33 ` Lee Jones
2021-01-20 18:39 ` Cristian Ciocaltea [this message]
2021-01-13 11:05 ` [PATCH v5 4/7] regulator: Add regulator " Cristian Ciocaltea
2021-01-13 11:05 ` [PATCH v5 5/7] power: reset: Add poweroff " Cristian Ciocaltea
2021-01-13 21:20 ` Sebastian Reichel
2021-01-13 11:05 ` [PATCH v5 6/7] input: atc260x: Add onkey " Cristian Ciocaltea
2021-01-13 11:05 ` [PATCH v5 7/7] MAINTAINERS: Add entry for ATC260x PMIC Cristian Ciocaltea
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=20210120183950.GA867982@BV030612LT \
--to=cristian.ciocaltea@gmail.com \
--cc=afaerber@suse.de \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-actions@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
/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).