public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: "Chris Zhong" <zyw@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Tao Huang" <huangtao@rock-chips.com>,
	"Eddie Cai" <cf@rock-chips.com>,
	zhangqing <zhangqing@rock-chips.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] regulator: st-pwm: get voltage and duty table from dts
Date: Wed, 17 Sep 2014 14:26:47 -0700	[thread overview]
Message-ID: <20140917212647.GR30918@lee--X1> (raw)
In-Reply-To: <CAD=FV=XpwK+HzybKMck8KJ6VDYt3h5LHXtkU=RCa4DUX0t-MGg@mail.gmail.com>

On Wed, 17 Sep 2014, Doug Anderson wrote:
> On Wed, Sep 17, 2014 at 6:07 AM, Chris Zhong <zyw@rock-chips.com> wrote:
> > Get voltage & duty table from device tree might be better, other platforms can also use this
> > driver without any modify.
> >
> > Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> 
> Why didn't you CC Lee Jones on your patches?  He's the author of the
> driver and should certainly be involved in reviewing your patches.
> 
> CCed him now.

Thanks Doug.

> >  drivers/regulator/Kconfig  |    1 -
> >  drivers/regulator/st-pwm.c |   80 +++++++++++++++++++++++---------------------
> >  2 files changed, 42 insertions(+), 39 deletions(-)
> >
> > diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
> > index fb32bab..06a9632 100644
> > --- a/drivers/regulator/Kconfig
> > +++ b/drivers/regulator/Kconfig
> > @@ -495,7 +495,6 @@ config REGULATOR_S5M8767
> >
> >  config REGULATOR_ST_PWM
> >         tristate "STMicroelectronics PWM voltage regulator"

It's okay to generify the driver and remove references to ST.

> > -       depends on ARCH_STI
> 
> Seems like you should add some wording saying that this driver is also
> useful for other PWM-based voltage regulators.

In the commit message yes, I wouldn't worry about doing that here.

> >         help
> >          This driver supports ST's PWM controlled voltage regulators.
> >
> > diff --git a/drivers/regulator/st-pwm.c b/drivers/regulator/st-pwm.c
> > index 5ea78df..877381b 100644
> > --- a/drivers/regulator/st-pwm.c
> > +++ b/drivers/regulator/st-pwm.c

In order to avoid confusion to future users, rename the file too.

[...]

> > -static const struct regulator_desc b2105_desc = {
> > +static struct regulator_desc b2105_desc = {
> >         .name           = "b2105-pwm-regulator",

Generify.

> >         .ops            = &st_pwm_regulator_voltage_ops,
> >         .type           = REGULATOR_VOLTAGE,
> >         .owner          = THIS_MODULE,
> > -       .n_voltages     = ARRAY_SIZE(b2105_duty_cycle_table),
> >         .supply_name    = "pwm",
> >  };
> >
> > -static const struct st_pwm_regulator_pdata b2105_info = {
> > -       .desc             = &b2105_desc,
> > -       .duty_cycle_table = b2105_duty_cycle_table,
> > -};
> > -
> >  static const struct of_device_id st_pwm_of_match[] = {
> > -       { .compatible = "st,b2105-pwm-regulator", .data = &b2105_info, },
> > +       { .compatible = "st,b2105-pwm-regulator" },

Remove and replace with "pwm-regulator".

As we're no longer matching, you can move this down to the bottom.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-09-17 21:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 13:07 [PATCH 0/2] regulator: get voltage & duty table from dts for st-pwm Chris Zhong
2014-09-17 13:07 ` [PATCH 1/2] regulator: st-pwm: get voltage and duty table from dts Chris Zhong
2014-09-17 15:15   ` Heiko Stübner
2014-09-17 16:51   ` Mark Brown
2014-09-17 16:54     ` Doug Anderson
2014-09-18  1:37       ` Chris Zhong
2014-09-18  3:36         ` Doug Anderson
2014-09-17 18:28   ` Doug Anderson
2014-09-17 21:26     ` Lee Jones [this message]
2014-09-17 13:08 ` [PATCH 2/2] dt-bindings: add devicetree bindings for st-pwm regulator Chris Zhong
2014-09-17 18:16   ` Doug Anderson
2014-09-17 18:35     ` Mark Brown
2014-09-17 19:46     ` Mark Rutland
2014-09-17 21:22     ` Lee Jones

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=20140917212647.GR30918@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=broonie@kernel.org \
    --cc=cf@rock-chips.com \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhangqing@rock-chips.com \
    --cc=zyw@rock-chips.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