lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Sep 2014 14:26:47 -0700
From:	Lee Jones <lee.jones@...aro.org>
To:	Doug Anderson <dianders@...omium.org>
Cc:	Chris Zhong <zyw@...k-chips.com>,
	Heiko Stübner <heiko@...ech.de>,
	Tao Huang <huangtao@...k-chips.com>,
	Eddie Cai <cf@...k-chips.com>,
	zhangqing <zhangqing@...k-chips.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] regulator: st-pwm: get voltage and duty table from
 dts

On Wed, 17 Sep 2014, Doug Anderson wrote:
> On Wed, Sep 17, 2014 at 6:07 AM, Chris Zhong <zyw@...k-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@...k-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ