All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Andrei Stefanescu <andrei.stefanescu@microchip.com>,
	Heiko Stuebner <heiko@sntech.de>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Brendan Higgins <brendanhiggins@google.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Andreas Kemnade <andreas@kemnade.info>,
	"Angelo G. Del Regno" <kholk11@gmail.com>,
	Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>,
	linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org,
	Axel Lin <axel.lin@ingics.com>,
	Gregory CLEMENT <gregory.clement@bootlin.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Markus Reichl <m.reichl@fivetechno.de>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Chen-Yu Tsai <wens@csie.org>, Andy Gross <agross@kernel.org>,
	markus.laine@fi.rohmeurope.com,
	Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
	devicetree@vger.kernel.org,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	mazziesaccount@gmail.com, linux-arm-msm@vger.kernel.org,
	Richard Fitzgerald <rf@opensource.cirrus.com>,
	Mark Brown <broonie@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Support Opensource <support.opensource@diasemi.com>,
	Baolin Wang <baolin.wang@linaro.org>,
	Sangbeom Kim <sbkim73@samsung.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pm@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
	Sebastian Reichel <sre@kernel.org>,
	linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com,
	Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	patches@opensource.cirrus.com
Subject: Re: [PATCH v9 05/10] power: supply: bd70528: use linear ranges
Date: Tue, 14 Apr 2020 12:35:13 +0300	[thread overview]
Message-ID: <20200414093513.GJ34613@smile.fi.intel.com> (raw)
In-Reply-To: <20200414093243.GI34613@smile.fi.intel.com>

On Tue, Apr 14, 2020 at 12:32:43PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 14, 2020 at 11:04:21AM +0300, Matti Vaittinen wrote:
> > Change the bd70528 to use common linear_range code instead of
> > implementing a copy of it in this driver.
> 
> Couple of nits below which you can take as TODO items for the future.
> (Because maintainer is fine with it according to the tags)
> 
> ...
> 
> >  config CHARGER_BD70528
> >  	tristate "ROHM bd70528 charger driver"
> >  	depends on MFD_ROHM_BD70528
> > +	select LINEAR_RANGES
> 
> >  	default n
> 
> At some point you can remove this kind of defaults (see [1] for the details).

Missed reference

[1]: commit 0192f17529fa ("clean up x86 platform driver default values")

> ...
> 
> > +static const struct linear_range current_limit_ranges[] = {
> >  	{
> >  		.min = 5,
> >  		.step = 1,
> > -		.vals = 36,
> > -		.low_sel = 0,
> 
> > +		.min_sel = 0,
> 
> Perhaps it's better to have it aligned with max_sel, i.e. be 0x00.
> Same applies to the rest of a such.
> 
> > +		.max_sel = 0x22,
> >  	},
> 
> ...
> 
> > +static const struct linear_range warm_charge_curr[] = {
> >  	{
> >  		.min = 10,
> >  		.step = 10,
> > -		.vals = 20,
> > -		.low_sel = 0,
> > +		.min_sel = 0,
> > +		.max_sel = 0x12
> 
> Perhaps leaving comma is a good thing to avoid potential churn in the future
> (if any of fields will be added here). Same applies to the reset of a such.
> 
> >  	},
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Andrei Stefanescu <andrei.stefanescu@microchip.com>,
	Heiko Stuebner <heiko@sntech.de>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Brendan Higgins <brendanhiggins@google.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Andreas Kemnade <andreas@kemnade.info>,
	"Angelo G. Del Regno" <kholk11@gmail.com>,
	Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>,
	linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org,
	Axel Lin <axel.lin@ingics.com>,
	Gregory CLEMENT <gregory.clement@bootlin.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Markus Reichl <m.reichl@fivetechno.de>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Chen-Yu Tsai <wens@csie.org>, Andy Gross <agross@kernel.org>,
	markus.laine@fi.rohmeurope.com,
	Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
	devicetree@vger.kernel.org,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	mazziesaccount@gmail.com, linux-arm-msm@vger.kernel.org,
	Richard Fitzgerald <rf@opensource.cirrus.com>,
	Mark Brown <broonie@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Support Opensource <support.opensource@diasemi.com>,
	Baolin Wang <baolin.wang@linaro.org>,
	Sangbeom Kim <sbkim73@samsung.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pm@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
	Sebastian Reichel <sre@kernel.org>,
	linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com,
	Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	patches@opensource.cirrus.com
Subject: Re: [PATCH v9 05/10] power: supply: bd70528: use linear ranges
Date: Tue, 14 Apr 2020 12:35:13 +0300	[thread overview]
Message-ID: <20200414093513.GJ34613@smile.fi.intel.com> (raw)
In-Reply-To: <20200414093243.GI34613@smile.fi.intel.com>

On Tue, Apr 14, 2020 at 12:32:43PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 14, 2020 at 11:04:21AM +0300, Matti Vaittinen wrote:
> > Change the bd70528 to use common linear_range code instead of
> > implementing a copy of it in this driver.
> 
> Couple of nits below which you can take as TODO items for the future.
> (Because maintainer is fine with it according to the tags)
> 
> ...
> 
> >  config CHARGER_BD70528
> >  	tristate "ROHM bd70528 charger driver"
> >  	depends on MFD_ROHM_BD70528
> > +	select LINEAR_RANGES
> 
> >  	default n
> 
> At some point you can remove this kind of defaults (see [1] for the details).

Missed reference

[1]: commit 0192f17529fa ("clean up x86 platform driver default values")

> ...
> 
> > +static const struct linear_range current_limit_ranges[] = {
> >  	{
> >  		.min = 5,
> >  		.step = 1,
> > -		.vals = 36,
> > -		.low_sel = 0,
> 
> > +		.min_sel = 0,
> 
> Perhaps it's better to have it aligned with max_sel, i.e. be 0x00.
> Same applies to the rest of a such.
> 
> > +		.max_sel = 0x22,
> >  	},
> 
> ...
> 
> > +static const struct linear_range warm_charge_curr[] = {
> >  	{
> >  		.min = 10,
> >  		.step = 10,
> > -		.vals = 20,
> > -		.low_sel = 0,
> > +		.min_sel = 0,
> > +		.max_sel = 0x12
> 
> Perhaps leaving comma is a good thing to avoid potential churn in the future
> (if any of fields will be added here). Same applies to the reset of a such.
> 
> >  	},
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-04-14  9:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14  7:58 [PATCH v9 00/10] Support ROHM BD99954 charger IC Matti Vaittinen
2020-04-14  7:58 ` Matti Vaittinen
2020-04-14  7:59 ` [PATCH v9 01/10] lib: add linear ranges helpers Matti Vaittinen
2020-04-14  7:59   ` Matti Vaittinen
2020-04-14  8:00 ` [PATCH v9 02/10] lib/test_linear_ranges: add a test for the 'linear_ranges' Matti Vaittinen
2020-04-14  8:00   ` Matti Vaittinen
2020-04-14  8:03 ` [PATCH v9 03/10] power: supply: bd70528: rename linear_range to avoid collision Matti Vaittinen
2020-04-14  8:03   ` Matti Vaittinen
2020-04-14  8:03 ` [PATCH v9 04/10] regulator: use linear_ranges helper Matti Vaittinen
2020-04-14  8:03   ` Matti Vaittinen
2020-04-14 14:30   ` kbuild test robot
2020-04-14  8:04 ` [PATCH v9 05/10] power: supply: bd70528: use linear ranges Matti Vaittinen
2020-04-14  8:04   ` Matti Vaittinen
2020-04-14  9:32   ` Andy Shevchenko
2020-04-14  9:32     ` Andy Shevchenko
2020-04-14  9:35     ` Andy Shevchenko [this message]
2020-04-14  9:35       ` Andy Shevchenko
2020-04-14 10:11     ` Vaittinen, Matti
2020-04-14 10:11       ` Vaittinen, Matti
2020-04-14  8:04 ` [PATCH v9 06/10] dt-bindings: battery: add new battery parameters Matti Vaittinen
2020-04-14  8:04   ` Matti Vaittinen
2020-04-14  8:05 ` [PATCH v9 07/10] power: supply: add " Matti Vaittinen
2020-04-14  8:05   ` Matti Vaittinen
2020-04-14  8:06 ` [PATCH v9 08/10] dt_bindings: ROHM BD99954 Charger Matti Vaittinen
2020-04-14  8:06   ` Matti Vaittinen
2020-04-14  8:06 ` [PATCH v9 09/10] power: supply: Support ROHM bd99954 charger Matti Vaittinen
2020-04-14  8:06   ` Matti Vaittinen
2020-04-14  8:06 ` [PATCH v9 10/10] power: supply: Fix Kconfig help text indentiation Matti Vaittinen
2020-04-14  8:06   ` 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=20200414093513.GJ34613@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=agross@kernel.org \
    --cc=andreas@kemnade.info \
    --cc=andrei.stefanescu@microchip.com \
    --cc=axel.lin@ingics.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=baolin.wang@linaro.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=brendanhiggins@google.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=heiko@sntech.de \
    --cc=hsin-hsiung.wang@mediatek.com \
    --cc=kholk11@gmail.com \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.reichl@fivetechno.de \
    --cc=mark.rutland@arm.com \
    --cc=markus.laine@fi.rohmeurope.com \
    --cc=matthias.bgg@gmail.com \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=mikko.mutanen@fi.rohmeurope.com \
    --cc=patches@opensource.cirrus.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rf@opensource.cirrus.com \
    --cc=robh+dt@kernel.org \
    --cc=sbkim73@samsung.com \
    --cc=sre@kernel.org \
    --cc=support.opensource@diasemi.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    --cc=vkoul@kernel.org \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.