From: "Pali Rohár" <pali.rohar@gmail.com>
To: "Andrew F. Davis" <afd@ti.com>
Cc: Sebastian Reichel <sre@kernel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Dan Murphy <dmurphy@ti.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/6] power: bq27xxx_battery: Add support for additional bq27xxx family devices
Date: Tue, 28 Jul 2015 21:59:29 +0200 [thread overview]
Message-ID: <201507282159.30013@pali> (raw)
In-Reply-To: <1438112353-19704-6-git-send-email-afd@ti.com>
[-- Attachment #1: Type: Text/Plain, Size: 2070 bytes --]
On Tuesday 28 July 2015 21:39:12 Andrew F. Davis wrote:
> Add support for additional devices and register equivalent family
> devices including the bq27010, bq27210, bq272500, bq27510, bq27520,
^^^^^^
maybe incorrect number?
> bq27530, bq27531, bq27541, bq27542, bq27546, bq27545, bq27441,
> bq27421, and the bq27641.
>
> To facilitate this process the register mapings have been moved to
> tables and other small cleanups have been made.
>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> ---
> static const struct i2c_device_id bq27xxx_id[] = {
> - { "bq27200", BQ27000 }, /* bq27200 is same as bq27000, but with i2c
> */ + { "bq27200", BQ27000 },
> + { "bq27210", BQ27010 },
> { "bq27500", BQ27500 },
> - { "bq27425", BQ27425 },
> - { "bq27742", BQ27742 },
> - { "bq27510", BQ27510 },
> + { "bq27510", BQ27500 },
> + { "bq27520", BQ27500 },
> + { "bq27530", BQ27530 },
> + { "bq27531", BQ27530 },
> + { "bq27541", BQ27541 },
> + { "bq27542", BQ27541 },
> + { "bq27546", BQ27541 },
> + { "bq27742", BQ27541 },
> + { "bq27545", BQ27545 },
> + { "bq27421", BQ27421 },
> + { "bq27425", BQ27421 },
> + { "bq27441", BQ27421 },
> + { "bq27621", BQ27421 },
> {},
> };
I'm trying to understand comparator which you used for sorting these
values... but I do not see any logic here. What about sorting list by
first value? Now it is long list of device names and for better ability
to read it, it would be better to have it in some order.
> -enum bq27xxx_chip { BQ27000, BQ27500, BQ27425, BQ27742, BQ27510 };
> +enum bq27xxx_chip {
> + BQ27000, /* bq27000, bq27200 */
> + BQ27010, /* bq27010, bq27210 */
> + BQ27500, /* bq27500, bq27510, bq27520 */
> + BQ27530, /* bq27530, bq27531 */
> + BQ27541, /* bq27541, bq27542, bq27546, bq27742 */
> + BQ27545, /* bq27545 */
> + BQ27421, /* bq27421, bq27425, bq27441, bq27621 */
> +};
>
Maybe same here? Putting BQ27421 before BQ27500?
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2015-07-28 19:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 19:39 [PATCH v2 0/6] Add support for additional bq27xxx devices Andrew F. Davis
2015-07-28 19:39 ` [PATCH v2 1/6] power: bq27x00_battery: Remove unneeded i2c MODULE_ALIAS Andrew F. Davis
2015-07-28 20:00 ` Pali Rohár
2015-07-28 19:39 ` [PATCH v2 2/6] power: bq27x00_battery: Renaming for consistency Andrew F. Davis
2015-07-28 20:04 ` Pali Rohár
2015-08-02 7:31 ` Pavel Machek
2015-08-02 17:41 ` Andrew F. Davis
2015-07-28 19:39 ` [PATCH v2 3/6] power: bq27xxx_battery: Platform initialization must declare a device Andrew F. Davis
2015-07-28 20:13 ` Pali Rohár
2015-07-30 17:01 ` Andrew F. Davis
2015-07-28 19:39 ` [PATCH v2 4/6] power: bq27xxx_battery: Fix typos and change naming for state of charge functions Andrew F. Davis
2015-07-28 20:14 ` Pali Rohár
2015-08-02 7:37 ` Pavel Machek
2015-07-28 19:39 ` [PATCH v2 5/6] power: bq27xxx_battery: Add support for additional bq27xxx family devices Andrew F. Davis
2015-07-28 19:59 ` Pali Rohár [this message]
2015-07-30 17:07 ` Andrew F. Davis
2015-08-02 7:38 ` Pavel Machek
2015-08-02 17:43 ` Andrew F. Davis
2015-07-28 19:39 ` [PATCH v2 6/6] power: bq27xxx_battery: Cleanup health checking Andrew F. Davis
2015-07-28 20:16 ` Pali Rohár
2015-08-02 7:36 ` Pavel Machek
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=201507282159.30013@pali \
--to=pali.rohar@gmail.com \
--cc=afd@ti.com \
--cc=dbaryshkov@gmail.com \
--cc=dmurphy@ti.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.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).