Re: [PATCH v11 07/10] power: bq27xxx_battery: Keep track of specific chip id

Sebastian Reichel
2017-03-23T12:31:00Z

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

Hi,

On Thu, Mar 23, 2017 at 03:35:33AM -0700, Liam Breck wrote:
> On Thu, Mar 23, 2017 at 3:28 AM, Sebastian Reichel <sre@kernel.org> wrote:
> > Hi,
> >
> > On Mon, Mar 20, 2017 at 02:43:32AM -0700, Liam Breck wrote:
> >> From: Liam Breck <kernel@networkimprov.net>
> >>
> >> Pass actual chip ID into _setup(), which translates it to a group ID,
> >> to allow support for all chips by the power_supply_battery_info code.
> >> There are no functional changes to the driver.
> >>
> >> Signed-off-by: Liam Breck <kernel@networkimprov.net>
> >
> > This is really ugly. If we need chip ID and group ID let's store
> > them in different variables. For example put the detailed chipid
> > into di->realchip and then do
>
> I tried this in a previous version, and Andrew rejected it as
> confusing to have two IDs. That was while you were away on business
> :-)

now we have two IDs in the same variable.
That definitely more confusing. We can name the second variable
group to reduce confusion.

-- Sebastian

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