[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <41840b750705032155w21d98b5g6236daf9bff66606@mail.gmail.com>
Date: Fri, 4 May 2007 00:55:21 -0400
From: "Shem Multinymous" <multinymous@...il.com>
To: "Anton Vorontsov" <cbou@...l.ru>
Cc: "Greg KH" <gregkh@...e.de>, linux-kernel@...r.kernel.org,
kernel-discuss@...dhelds.org,
"David Woodhouse" <dwmw2@...radead.org>,
"Henrique de Moraes Holschuh" <hmh@...ian.org>
Subject: Re: [PATCH 3/8] Universal power supply class (was: battery class)
On 5/3/07, Anton Vorontsov <cbou@...l.ru> wrote:
> This class is result of "external power" and "battery" classes merge,
> as suggested by David Woodhouse. He also implemented uevent support.
Looks great. In particular, the policies you've chosen for the
attributes and units are very reasonable.
I'll gladly accept patches moving tp_smapi to this interface (or
eventually do it myself when I have time).
A few minor points:
> +#define POWER_SUPPLY_TECHNOLOGY_UNKNOWN 0
> +#define POWER_SUPPLY_TECHNOLOGY_NIMH 1
> +#define POWER_SUPPLY_TECHNOLOGY_LION 2
> +#define POWER_SUPPLY_TECHNOLOGY_LIPO 3
Might as well add NiCd (common in UPS).
> +#define POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN 0
> +#define POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL 1
> +#define POWER_SUPPLY_CAPACITY_LEVEL_LOW 2
> +#define POWER_SUPPLY_CAPACITY_LEVEL_NORMAL 3
> +#define POWER_SUPPLY_CAPACITY_LEVEL_HIGH 4
> +#define POWER_SUPPLY_CAPACITY_LEVEL_FULL 5
Should this be synthesized by the driver if the hardware gives only
quantitative values? If so, maybe provide some guidelines.
> +enum power_supply_type {
> + POWER_SUPPLY_TYPE_BATTERY = 0,
> + POWER_SUPPLY_TYPE_UPS,
> + POWER_SUPPLY_TYPE_AC,
> + POWER_SUPPLY_TYPE_USB,
> +};
How about dumb (non-USB) DC power? Any reason to distinguish it from AC?
Shem
-
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