Messages in this thread | | | Date | Wed, 29 Jan 2014 10:36:33 +0100 | From | Pavel Machek <> | 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
| |