Re: [PATCH 2/4] power_supply: Introduce generic psy charging driver

From: Mark Brown
Date: Fri Mar 14 2014 - 15:27:00 EST


On Fri, Mar 14, 2014 at 11:36:40AM +0100, Linus Walleij wrote:
> On Thu, Mar 13, 2014 at 10:12 AM, Pavel Machek <pavel@xxxxxx> wrote:

> > But... what would actually help: I believe we should introduce
> > milivolt_t, miliamp_t, milisec_t etc... types. Storing milivolts in
> > int, then having comment saying "milivolts" is just wrong.

> Hm! I bet the regulator subsystem maintainers have opinions
> on that.

The regulator subsystem is quite happily using unsigned ints here,
usually we're using hungarian style names to clarify the type where
that's useful (it tends to be closer to the usual naming conventions
when representing these things mathematically). I'm not sure that
having a typedef is going to buy us terribly much unless we convert the
kernel to C++ where we can do more exciting stuff.

I would say that we are using microvolts rather than milivolts since it
does occasionally matter.

Attachment: signature.asc
Description: Digital signature