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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to