public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: Liam Breck <liam@networkimprov.net>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	linux-pm@vger.kernel.org, "Paul Kocialkowski" <contact@paulk.fr>,
	"Liam Breck" <kernel@networkimprov.net>
Subject: Re: [RFC v1 1/6] power: supply: bq27xxx: Create single chip data table
Date: Tue, 25 Jul 2017 13:21:13 +0200	[thread overview]
Message-ID: <20170725112113.jplophe6enkgabnb@earth> (raw)
In-Reply-To: <20170709021700.14354-2-liam@networkimprov.net>

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

Hi,

On Sat, Jul 08, 2017 at 07:16:55PM -0700, Liam Breck wrote:
> From: Liam Breck <kernel@networkimprov.net>
> 
> To support new features which require different data for each chip, we
> unify the bq27xxx_regs and bq27xxx_battery_props tables into a single one.
> 
> No functional changes to the driver.

Looks good to me except for one thing.

> [...]
> +#define BQ27XXX_DATA(ref) {			\
> +	.regs  = bq27##ref##_regs,		\
> +	.props = bq27##ref##_props,		\
> +	.props_size = ARRAY_SIZE(bq27##ref##_props) }
>
> [...]
>
> +	[BQ27000]   = BQ27XXX_DATA(000),
> +	[BQ27010]   = BQ27XXX_DATA(010),
> +	[BQ2750X]   = BQ27XXX_DATA(50x),
> +	[BQ2751X]   = BQ27XXX_DATA(51x),
> +	[BQ27500]   = BQ27XXX_DATA(500),
> +	[BQ27510G1] = BQ27XXX_DATA(510g1),
> +	[BQ27510G2] = BQ27XXX_DATA(510g2),
> +	[BQ27510G3] = BQ27XXX_DATA(510g3),
> +	[BQ27520G1] = BQ27XXX_DATA(520g1),
> +	[BQ27520G2] = BQ27XXX_DATA(520g2),
> +	[BQ27520G3] = BQ27XXX_DATA(520g3),
> +	[BQ27520G4] = BQ27XXX_DATA(520g4),
> +	[BQ27530]   = BQ27XXX_DATA(530),
> +	[BQ27541]   = BQ27XXX_DATA(541),
> +	[BQ27545]   = BQ27XXX_DATA(545),
> +	[BQ27421]   = BQ27XXX_DATA(421),
>  };

I would prefer to use ##ref##_regs and ##ref##_props above
and add the bq27 prefix here.

-- Sebastian

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

  reply	other threads:[~2017-07-25 11:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-09  2:16 [RFC v1 0/6] bq27xxx_battery data memory update Liam Breck
2017-07-09  2:16 ` [RFC v1 1/6] power: supply: bq27xxx: Create single chip data table Liam Breck
2017-07-25 11:21   ` Sebastian Reichel [this message]
2017-07-09  2:16 ` [RFC v1 2/6] power: supply: bq27xxx: Add chip IDs for previously shadowed chips Liam Breck
2017-07-25 12:52   ` Sebastian Reichel
2017-07-09  2:16 ` [RFC v1 3/6] power: supply: bq27xxx: Enable data memory update for certain chips Liam Breck
2017-07-09  9:07   ` Pali Rohár
2017-07-09 14:13     ` Liam Breck
2017-07-09 15:12       ` Pali Rohár
2017-07-25 11:17         ` Sebastian Reichel
2017-07-09  2:16 ` [RFC v1 4/6] power: supply: bq27xxx: Add chip data options for cfgupdate & ram-only Liam Breck
2017-07-25 11:24   ` Sebastian Reichel
2017-07-09  2:16 ` [RFC v1 5/6] power: supply: bq27xxx: Flag identical chip data when in debug mode Liam Breck
2017-07-25 13:04   ` Sebastian Reichel
2017-07-09  2:17 ` [RFC v1 6/6] power: supply: bq27xxx: Remove duplicate chip data arrays Liam Breck

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=20170725112113.jplophe6enkgabnb@earth \
    --to=sebastian.reichel@collabora.co.uk \
    --cc=contact@paulk.fr \
    --cc=kernel@networkimprov.net \
    --cc=liam@networkimprov.net \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali.rohar@gmail.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