LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Lee Jones <lee.jones@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
mazziesaccount@gmail.com, linux-clk@vger.kernel.org,
devicetree <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
mikko.mutanen@fi.rohmeurope.com,
heikki.haikola@fi.rohmeurope.com
Subject: Re: [PATCH v3 6/6] regulator: bd71837: BD71837 PMIC regulator driver
Date: Tue, 5 Jun 2018 16:58:43 +0300 [thread overview]
Message-ID: <CAHp75VeVSbZd12vXew9f0z2m1=BFz+cOKomga3SZEzg=kx9CFw@mail.gmail.com> (raw)
In-Reply-To: <68b0cf2c7ab5578eef2f71a33315bc8ab9a68a39.1527587295.git.matti.vaittinen@fi.rohmeurope.com>
On Tue, May 29, 2018 at 1:02 PM, Matti Vaittinen
<matti.vaittinen@fi.rohmeurope.com> wrote:
> Support for controlling the 8 bucks and 7 LDOs the PMIC contains.
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/init.h>
One of these is redundant.
> +#include <linux/err.h>
> +#include <linux/interrupt.h>
> +#include <linux/platform_device.h>
> +#include <linux/regulator/driver.h>
> +#include <linux/regulator/machine.h>
> +#include <linux/delay.h>
> +#include <linux/slab.h>
> +#include <linux/gpio.h>
> +#include <linux/mfd/bd71837.h>
> +#include <linux/regulator/of_regulator.h>
Can you keep the list ordered?
> + dev_dbg(&(pmic->pdev->dev), "Buck[%d] Set Ramp = %d\n", id + 1,
> + ramp_delay);
Redundant parens.
> +static int bd71837_regulator_set_regmap(struct regulator_dev *rdev, int set)
> +{
> + int ret = -EINVAL;
Redundant assignment.
> + if (!set)
> + ret = regulator_disable_regmap(rdev);
> + else
> + ret = regulator_enable_regmap(rdev);
> + return ret;
> +}
> +static int bd71837_probe(struct platform_device *pdev)
> +{
> + pmic = devm_kzalloc(&pdev->dev, sizeof(struct bd71837_pmic),
> + GFP_KERNEL);
sizeof(*pmic) and one line as result?
> + if (!pmic)
> + return -ENOMEM;
> + if (!pmic->mfd) {
> + dev_err(&pdev->dev, "No MFD driver data\n");
> + err = -EINVAL;
> + goto err;
Plain return?
> + }
> + dev_dbg(&pmic->pdev->dev, "%s: Unlocked lock register 0x%x\n",
> + __func__, BD71837_REG_REGLOCK);
__func__ part is redundant.
> + for (i = 0; i < ARRAY_SIZE(pmic_regulator_inits); i++) {
> +
Redundant blank line.
> + rdev = devm_regulator_register(&pdev->dev, desc, &config);
> + if (IS_ERR(rdev)) {
> + dev_err(pmic->mfd->dev,
> + "failed to register %s regulator\n",
> + desc->name);
> + err = PTR_ERR(rdev);
> + goto err;
Plain return ...
> +err:
> + return err;
Redundant.
> +}
> +static struct platform_driver bd71837_regulator = {
> + .driver = {
> + .name = "bd71837-pmic",
> + .owner = THIS_MODULE,
This done by macro you are using below. Thus, redundant.
> + },
> + .probe = bd71837_probe,
> +};
> +
> +module_platform_driver(bd71837_regulator);
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2018-06-05 13:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 9:57 [PATCH v3 0/6] mfd/regulator/clk: bd71837: ROHM BD71837 PMIC driver Matti Vaittinen
2018-05-29 9:58 ` [PATCH v3 1/6] mfd: bd71837: mfd driver for ROHM BD71837 PMIC Matti Vaittinen
2018-05-29 9:59 ` [PATCH v3 2/6] mfd: bd71837: Devicetree bindings " Matti Vaittinen
2018-05-29 10:00 ` [PATCH v3 3/6] regulator: bd71837: Devicetree bindings for BD71837 regulators Matti Vaittinen
2018-05-29 10:00 ` [PATCH v3 4/6] clk: bd71837: Devicetree bindings for ROHM BD71837 PMIC Matti Vaittinen
2018-05-29 10:01 ` [PATCH v3 5/6] clk: bd71837: Add driver for BD71837 PMIC clock Matti Vaittinen
2018-05-29 10:02 ` [PATCH v3 6/6] regulator: bd71837: BD71837 PMIC regulator driver Matti Vaittinen
2018-05-29 11:47 ` Mark Brown
2018-05-29 12:00 ` Matti Vaittinen
2018-06-05 13:58 ` Andy Shevchenko [this message]
2018-06-06 7:44 ` Matti Vaittinen
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='CAHp75VeVSbZd12vXew9f0z2m1=BFz+cOKomga3SZEzg=kx9CFw@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heikki.haikola@fi.rohmeurope.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=mikko.mutanen@fi.rohmeurope.com \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--subject='Re: [PATCH v3 6/6] regulator: bd71837: BD71837 PMIC regulator driver' \
/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
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).