Re: [PATCH 4/4] power_supply: bq24261 charger driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux