linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: mazziesaccount@gmail.com, Lee Jones <lee.jones@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org,
	linux-watchdog@vger.kernel.org, heikki.haikola@fi.rohmeurope.com,
	mikko.mutanen@fi.rohmeurope.com
Subject: Re: [PATCH v14 7/8] power: supply: Initial support for ROHM BD70528 PMIC charger block
Date: Thu, 2 May 2019 21:50:49 +0200	[thread overview]
Message-ID: <20190502195049.brysexbyyq7khtr4@earth.universe> (raw)
In-Reply-To: <eece016c86483d55befab1a06fb299c9d6d17134.1556787930.git.matti.vaittinen@fi.rohmeurope.com>

[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]

Hi,

On Thu, May 02, 2019 at 12:17:12PM +0300, Matti Vaittinen wrote:
> ROHM BD70528 PMIC includes battery charger block. Support charger
> staus queries and doing few basic settings like input current limit
> and charging current.
> 
> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

Please only add Acked-by when you receive one, especially when you
do not implement all requested changes :)

[...]

> +static int bd70528_get_irqs(struct platform_device *pdev,
> +			    struct bd70528_psy *bdpsy)
> +{
> +	int irq, i, ret;
> +	unsigned int mask;
> +	const struct irq_name_pair bd70528_chg_irqs[] = {
> +		{ .n = "bd70528-bat-ov-res", .h = BD_IRQ_HND(BAT_OV_RES) },
> +		{ .n = "bd70528-bat-ov-det", .h = BD_IRQ_HND(BAT_OV_DET) },
> +		{ .n = "bd70528-bat-dead", .h = BD_IRQ_HND(DBAT_DET) },
> +		{ .n = "bd70528-bat-warmed", .h = BD_IRQ_HND(COLD_RES) },
> +		{ .n = "bd70528-bat-cold", .h = BD_IRQ_HND(COLD_DET) },
> +		{ .n = "bd70528-bat-cooled", .h = BD_IRQ_HND(HOT_RES) },
> +		{ .n = "bd70528-bat-hot", .h = BD_IRQ_HND(HOT_DET) },
> +		{ .n = "bd70528-chg-tshd", .h = BD_IRQ_HND(CHG_TSD) },
> +		{ .n = "bd70528-bat-removed", .h = BD_IRQ_HND(BAT_RMV) },
> +		{ .n = "bd70528-bat-detected", .h = BD_IRQ_HND(BAT_DET) },
> +		{ .n = "bd70528-dcin2-ov-res", .h = BD_IRQ_HND(DCIN2_OV_RES) },
> +		{ .n = "bd70528-dcin2-ov-det", .h = BD_IRQ_HND(DCIN2_OV_DET) },
> +		{ .n = "bd70528-dcin2-removed", .h = BD_IRQ_HND(DCIN2_RMV) },
> +		{ .n = "bd70528-dcin2-detected", .h = BD_IRQ_HND(DCIN2_DET) },
> +		{ .n = "bd70528-dcin1-removed", .h = BD_IRQ_HND(DCIN1_RMV) },
> +		{ .n = "bd70528-dcin1-detected", .h = BD_IRQ_HND(DCIN1_DET) },
> +	};

Please also make it static. That will move the whole thing to
read-only (because of const) data section. This improves the
security and the required cpu time at the same time (no need
to copy values to the stack).

But this can be changed later, so no need to block the whole
patchset just because of this. If Lee wants to merge this for
5.2, that would be fine with me. But please add it directly in
a new patch revision if the patch does not make it into 5.2.

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-05-02 19:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02  9:11 [PATCH v14 0/8] support ROHM BD70528 PMIC Matti Vaittinen
2019-05-02  9:12 ` [PATCH v14 1/8] mfd: regulator: clk: split rohm-bd718x7.h Matti Vaittinen
2019-05-02  9:13 ` [PATCH v14 2/8] mfd: bd70528: Support ROHM bd70528 PMIC - core Matti Vaittinen
2019-05-08 11:24   ` Lee Jones
2019-05-02  9:13 ` [PATCH v14 3/8] clk: bd718x7: Support ROHM BD70528 clk block Matti Vaittinen
2019-05-02  9:14 ` [PATCH v14 4/8] dt-bindings: mfd: Document first ROHM BD70528 bindings Matti Vaittinen
2019-05-08 11:25   ` Lee Jones
2019-05-02  9:15 ` [PATCH v14 5/8] gpio: Initial support for ROHM bd70528 GPIO block Matti Vaittinen
2019-05-02  9:15 ` [PATCH v14 6/8] rtc: bd70528: Initial support for ROHM bd70528 RTC Matti Vaittinen
2019-05-02  9:17 ` [PATCH v14 7/8] power: supply: Initial support for ROHM BD70528 PMIC charger block Matti Vaittinen
2019-05-02 19:50   ` Sebastian Reichel [this message]
2019-05-03  5:29     ` Vaittinen, Matti
2019-05-02  9:17 ` [PATCH v14 8/8] watchdog: bd70528: Initial support for ROHM BD70528 watchdog block Matti Vaittinen
2019-05-21 11:01 ` [PATCH v14 0/8] support ROHM BD70528 PMIC Vaittinen, Matti
2019-05-21 11:41   ` Alexandre Belloni
2019-05-21 12:24     ` 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=20190502195049.brysexbyyq7khtr4@earth.universe \
    --to=sebastian.reichel@collabora.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bgolaszewski@baylibre.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=linus.walleij@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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 \
    --cc=wim@linux-watchdog.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).