From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Flora Fu <flora.fu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Matthias Brugger
<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Santosh Shilimkar
<santosh.shilimkar-l0cyMroinI0@public.gmane.org>,
Sandeep Nair <sandeep_n-l0cyMroinI0@public.gmane.org>,
Andy Gross <agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Peter De Schrijver
<pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
Vladimir Murzin <vladimir.murzin-5wv7dgnIgG8@public.gmane.org>,
Ashwin Chaugule
<ashwin.chaugule-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Joe.C" <yi>
Subject: Re: [PATCH v2 3/8] regulator: MT6397: Add support for MT6397 regulator
Date: Fri, 28 Nov 2014 15:22:47 +0000 [thread overview]
Message-ID: <20141128152247.GR7712@sirena.org.uk> (raw)
In-Reply-To: <1417146874-5232-4-git-send-email-flora.fu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1749 bytes --]
On Fri, Nov 28, 2014 at 11:54:29AM +0800, Flora Fu wrote:
> @@ -96,5 +97,4 @@ obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
> obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
> obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
>
> -
> ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
Random whitespace change here...
> + /* For HW design, buck voltage control register has two parts.
> + * part 1: vsel_reg for register mode
> + * part 2: voselon_reg or hw control mode
> + * Both parts should be updated and sync when user set voltage.
> + */
Why does nothing else in the driver know about this "hw control mode" -
what does it actually mean, shouldn't it affect some of the other
operations?
> + ret = regmap_update_bits(rdev->regmap, info->desc.vsel_reg,
> + info->desc.vsel_mask, sel);
> + if (ret != 0) {
> + dev_err(&rdev->dev, "Failed to update vsel: %d\n", ret);
> + return ret;
> + }
> + ret = regmap_update_bits(rdev->regmap, info->voselon_reg,
Missing blank line between these blocks.
> +static int mt6397_buck_get_voltage_sel(struct regulator_dev *rdev)
> +{
> +static int mt6397_regulator_is_enabled(struct regulator_dev *rdev)
> +{
To repeat my comments on the last version: please use the generic regmap
operations rather than copying them.
> + np = of_node_get(pdev->dev.parent->of_node);
> + if (!np)
> + return -EINVAL;
> +
> + regulators = of_get_child_by_name(np, "regulators");
To further repeat my previous review comments:
| Define regulators_node and of_match in the regulator desc and you can
| remove both this table and all your DT matching code in the driver, the
| core will handle it for you.
Please don't ignore review comments.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-11-28 15:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 3:54 [PATCH v2 0/8] Add Support for MediaTek PMIC MT6397 MFD Core and Regulator Flora Fu
2014-11-28 3:54 ` [PATCH v2 1/8] soc: mediatek: Add PMIC wrapper for MT8135 and MT6397 SoC Flora Fu
2014-11-28 15:32 ` Mark Brown
2014-11-28 3:54 ` [PATCH v2 2/8] mfd: MT6397: Add support for PMIC MT6397 MFD Flora Fu
2014-12-01 11:47 ` Lee Jones
2014-11-28 3:54 ` [PATCH v2 3/8] regulator: MT6397: Add support for MT6397 regulator Flora Fu
[not found] ` <1417146874-5232-4-git-send-email-flora.fu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2014-11-28 15:22 ` Mark Brown [this message]
2014-12-01 2:51 ` Flora Fu
2014-12-01 16:12 ` Mark Brown
2014-11-28 3:54 ` [PATCH v2 4/8] dt-bindings:: Add document for MT8135 PMIC Wrapper Flora Fu
2014-11-28 3:54 ` [PATCH v2 5/8] dt-bindings: Add document for MT6397 MFD Flora Fu
2014-11-28 3:54 ` [PATCH v2 6/8] dt-bindings: Add document for MT6397 regulator Flora Fu
[not found] ` <1417146874-5232-7-git-send-email-flora.fu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2014-11-28 15:30 ` Mark Brown
2014-11-28 3:54 ` [PATCH v2 7/8] ARM: dts: mt8135: Add support for PMIC MT6397 MFD Flora Fu
2014-11-28 3:54 ` [PATCH v2 8/8] ARM: dts: mt8135: Add support for MT6397 regulator Flora Fu
2014-11-28 15:30 ` Mark Brown
2014-12-01 3:19 ` Flora Fu
2014-12-01 6:40 ` Sascha Hauer
2014-12-01 11:16 ` Mark Brown
[not found] ` <1417146874-5232-1-git-send-email-flora.fu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2014-12-01 7:04 ` [PATCH v2 0/8] Add Support for MediaTek PMIC MT6397 MFD Core and Regulator Sascha Hauer
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=20141128152247.GR7712@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ashwin.chaugule-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
--cc=flora.fu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=sandeep_n-l0cyMroinI0@public.gmane.org \
--cc=santosh.shilimkar-l0cyMroinI0@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=vladimir.murzin-5wv7dgnIgG8@public.gmane.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).