[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140129093633.GA16691@amd.pavel.ucw.cz>
Date: Wed, 29 Jan 2014 10:36:33 +0100
From: Pavel Machek <pavel@....cz>
To: Jenny Tc <jenny.tc@...el.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
Anton Vorontsov <cbouatmailru@...il.com>,
Anton Vorontsov <anton.vorontsov@...aro.org>,
Kim Milo <Milo.Kim@...com>, Lee Jones <lee.jones@...aro.org>,
Jingoo Han <jg1.han@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Sachin Kamat <sachin.kamat@...aro.org>,
Rupesh Kumar <rupesh.kumar@...ricsson.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Pali Roh?r <pali.rohar@...il.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Rhyland Klein <rklein@...dia.com>,
David Woodhouse <dwmw2@...radead.org>,
Tony Lindgren <tony@...mide.com>,
Russell King <linux@....linux.org.uk>,
Sebastian Reichel <sre@...g0.de>,
"aaro.koskinen@....fi" <aaro.koskinen@....fi>,
"freemangordon@....bg" <freemangordon@....bg>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>
Subject: Re: [PATCH 4/4] power_supply: bq24261 charger driver
On Wed 2014-01-29 18:53:34, Jenny Tc wrote:
> On Tue, Jan 28, 2014 at 07:14:45AM -0700, Pavel Machek wrote:
> > > +#define BQ24261_ICHRG_MASK (0x1F << 3)
> > > +#define BQ24261_ICHRG_100ma (0x01 << 3)
> > > +#define BQ24261_ICHRG_200ma (0x01 << 4)
> > > +#define BQ24261_ICHRG_400ma (0x01 << 5)
> > > +#define BQ24261_ICHRG_800ma (0x01 << 6)
> > > +#define BQ24261_ICHRG_1600ma (0x01 << 7)
> >
> > First, its mA, not ma.
>
> Camel Case allowed? Ignore Checkpatch.pl warning?
This is not camel case, this is mili ampers.
> > (x/50) << 3, right ?
>
> Few register settings need table mapping, but some can have logic as your
> comment say. Just wanted to keep same logic for all register settings.
> Doesn't it make more readable?
No, it is definitely not readable. Please use logic where you can.
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists