linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
To: "sebastian.reichel@collabora.com" <sebastian.reichel@collabora.com>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
	"andrei.stefanescu@microchip.com"
	<andrei.stefanescu@microchip.com>,
	"heiko@sntech.de" <heiko@sntech.de>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"tony@atomide.com" <tony@atomide.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"brendanhiggins@google.com" <brendanhiggins@google.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"kholk11@gmail.com" <kholk11@gmail.com>,
	"hsin-hsiung.wang@mediatek.com" <hsin-hsiung.wang@mediatek.com>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	"axel.lin@ingics.com" <axel.lin@ingics.com>,
	"gregory.clement@bootlin.com" <gregory.clement@bootlin.com>,
	"b.zolnierkie@samsung.com" <b.zolnierkie@samsung.com>,
	"krzk@kernel.org" <krzk@kernel.org>,
	"m.reichl@fivetechno.de" <m.reichl@fivetechno.de>,
	"bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com>,
	"wens@csie.org" <wens@csie.org>,
	"andreas@kemnade.info" <andreas@kemnade.info>,
	"agross@kernel.org" <agross@kernel.org>,
	"Laine, Markus" <Markus.Laine@fi.rohmeurope.com>,
	"Adam.Thomson.Opensource@diasemi.com"
	<Adam.Thomson.Opensource@diasemi.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"ckeepax@opensource.cirrus.com" <ckeepax@opensource.cirrus.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"rf@opensource.cirrus.com" <rf@opensource.cirrus.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"andriy.shevchenko@linux.intel.com"
	<andriy.shevchenko@linux.intel.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"support.opensource@diasemi.com" <support.opensource@diasemi.com>,
	"baolin.wang@linaro.org" <baolin.wang@linaro.org>,
	"sbkim73@samsung.com" <sbkim73@samsung.com>,
	"patches@opensource.cirrus.com" <patches@opensource.cirrus.com>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Mutanen, Mikko" <Mikko.Mutanen@fi.rohmeurope.com>,
	"vkoul@kernel.org" <vkoul@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"mazziesaccount@gmail.com" <mazziesaccount@gmail.com>
Subject: Re: [PATCH v8 09/10] power: supply: Support ROHM bd99954 charger
Date: Mon, 6 Apr 2020 09:59:04 +0000	[thread overview]
Message-ID: <334ae92d62a32675bc18f331c9981e169e33e5e0.camel@fi.rohmeurope.com> (raw)
In-Reply-To: <20200405032233.btlwo5wvzmrrw65k@earth.universe>


On Sun, 2020-04-05 at 05:22 +0200, Sebastian Reichel wrote:
> Hi,
> 
> On Fri, Apr 03, 2020 at 11:48:05AM +0300, Matti Vaittinen wrote:
> > The ROHM BD99954 is a Battery Management LSI for 1-4 cell Lithium-
> > Ion
> > secondary battery intended to be used in space-constraint equipment
> > such
> > as Low profile Notebook PC, Tablets and other applications. BD99954
> > provides a Dual-source Battery Charger, two port BC1.2 detection
> > and a
> > Battery Monitor.
> > 
> > Support ROHM BD99954 Charger IC.
> > 
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> > ---
> > 
> > No changes since v7
> 
> Thanks, the drivers looks mostly good to me, I found some minor
> things. Please fix before sending the next (and hopefully final)
> revision.

I will :) Thanks for all the effort when doing the review. Much
appreciated! And I'll rebase and send the next version after v5.7-rc1
gets tagged. I'll fix these at that version.

> 
> >  drivers/power/supply/Kconfig           |    9 +
> >  drivers/power/supply/Makefile          |    1 +
> >  drivers/power/supply/bd99954-charger.c | 1149
> > ++++++++++++++++++++++++
> >  include/linux/power/bd99954-charger.h  | 1075
> > ++++++++++++++++++++++
> 
> Please move this header to drivers/power/supply/, the public
> include directory is only needed for platform_data and MFD.
> 
 
Makes sense.

> > +	dev_info(bd->dev, "Found DB99954 chip rev %d\n", bd->chip_rev);
> 
> DB -> BD?

Right. Well spotted :)

> > +
> > +static int bd9995x_remove(struct i2c_client *client)
> > +{
> > +	int ret;
> > +	struct bd9995x_device *bd = i2c_get_clientdata(client);
> > +
> > +	disable_irq(client->irq);
> > +
> > +	/*
> > +	 * Reset all registers to default values. This should also
> > disable
> > +	 * CHG_EN bit. If this is not required we can get rid of the
> > remove.
> > +	 */
> > +	ret = bd9995x_chip_reset(bd);
> 
> You can register this using devm_add_action_or_reset() before the
> devm_request_threaded_irq() call in probe and get rid of the remove
> function :)

Yep! That was a good point! I think I had never used
devm_add_action_or_reset() - this is a handy thing for my toolbox! :)

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

  reply	other threads:[~2020-04-06  9:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03  8:36 [PATCH v8 00/10] Support ROHM BD99954 charger IC Matti Vaittinen
2020-04-03  8:41 ` [PATCH v8 01/10] dt-bindings: battery: add new battery parameters Matti Vaittinen
2020-04-05  3:28   ` Sebastian Reichel
2020-04-03  8:45 ` [PATCH v8 02/10] dt_bindings: ROHM BD99954 Charger Matti Vaittinen
2020-04-05  3:30   ` Sebastian Reichel
2020-04-03  8:45 ` [PATCH v8 03/10] lib: add linear ranges helpers Matti Vaittinen
2020-04-03  9:37   ` Andy Shevchenko
2020-04-03  8:46 ` [PATCH v8 04/10] lib/test_linear_ranges: add a test for the 'linear_ranges' Matti Vaittinen
2020-04-03  8:46 ` [PATCH v8 05/10] power: supply: bd70528: rename linear_range to avoid collision Matti Vaittinen
2020-04-05  3:33   ` Sebastian Reichel
2020-04-06  9:21     ` Vaittinen, Matti
2020-04-03  8:46 ` [PATCH v8 06/10] regulator: use linear_ranges helper Matti Vaittinen
2020-04-03  8:47 ` [PATCH v8 07/10] power: supply: bd70528: use linear ranges Matti Vaittinen
2020-04-05  3:37   ` Sebastian Reichel
2020-04-03  8:47 ` [PATCH v8 08/10] power: supply: add battery parameters Matti Vaittinen
2020-04-05  3:35   ` Sebastian Reichel
2020-04-03  8:48 ` [PATCH v8 09/10] power: supply: Support ROHM bd99954 charger Matti Vaittinen
2020-04-03  9:41   ` Andy Shevchenko
2020-04-05  3:22   ` Sebastian Reichel
2020-04-06  9:59     ` Vaittinen, Matti [this message]
2020-04-03  8:48 ` [PATCH v8 10/10] power: supply: Fix Kconfig help text indentiation Matti Vaittinen
2020-04-05  3:35   ` Sebastian Reichel
2020-04-03 10:07 ` [PATCH v8 00/10] Support ROHM BD99954 charger IC Vaittinen, Matti
2020-04-03 11:02   ` andriy.shevchenko
2020-04-03 11:13     ` Vaittinen, Matti
2020-04-03 11:50       ` andriy.shevchenko
2020-04-03 11:51         ` andriy.shevchenko
2020-04-03 12:01       ` Mark Brown
2020-04-03 12:30         ` Vaittinen, Matti
2020-04-03 12:31           ` Mark Brown
2020-04-05  3:27 ` Sebastian Reichel
2020-04-06  5:22   ` Vaittinen, Matti

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=334ae92d62a32675bc18f331c9981e169e33e5e0.camel@fi.rohmeurope.com \
    --to=matti.vaittinen@fi.rohmeurope.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=Markus.Laine@fi.rohmeurope.com \
    --cc=Mikko.Mutanen@fi.rohmeurope.com \
    --cc=agross@kernel.org \
    --cc=andreas@kemnade.info \
    --cc=andrei.stefanescu@microchip.com \
    --cc=andriy.shevchenko@linux.intel.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=matthias.bgg@gmail.com \
    --cc=mazziesaccount@gmail.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=sebastian.reichel@collabora.com \
    --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 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).