lkml.org 
[lkml]   [2011]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subject[PATCH 1/3] power: add two properties: charge_to_use and voltage_to_use -- RESEND

RESEND
On Aug 29, 2011, at 10:03 AM, Philip Rakity wrote:

>
> Add two new properties
> a) POWER_SUPPLY_PROP_VOLTAGE_TO_USE
> b) POWER_SUPPLY_PROP_CHARGE_TO_USE
>
> These 2 properties can be returned by the battery to
> tell the charger what voltage and charge to use.
>
> Signed-off-by: Philip Rakity <prakity@marvell.com>
> ---
> drivers/power/power_supply_sysfs.c | 2 ++
> include/linux/power_supply.h | 4 ++++
> 2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
> index c9e9479..bffc67b 100644
> --- a/drivers/power/power_supply_sysfs.c
> +++ b/drivers/power/power_supply_sysfs.c
> @@ -167,6 +167,8 @@ static struct device_attribute power_supply_attrs[] = {
> POWER_SUPPLY_ATTR(time_to_full_now),
> POWER_SUPPLY_ATTR(time_to_full_avg),
> POWER_SUPPLY_ATTR(type),
> + POWER_SUPPLY_ATTR(charge_to_use),
> + POWER_SUPPLY_ATTR(voltage_to_use),
> /* Properties of type `const char *' */
> POWER_SUPPLY_ATTR(model_name),
> POWER_SUPPLY_ATTR(manufacturer),
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 204c18d..a41b510 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -116,6 +116,8 @@ enum power_supply_property {
> POWER_SUPPLY_PROP_TIME_TO_FULL_NOW,
> POWER_SUPPLY_PROP_TIME_TO_FULL_AVG,
> POWER_SUPPLY_PROP_TYPE, /* use power_supply.type instead */
> + POWER_SUPPLY_PROP_CHARGE_TO_USE,
> + POWER_SUPPLY_PROP_VOLTAGE_TO_USE,
> /* Properties of type `const char *' */
> POWER_SUPPLY_PROP_MODEL_NAME,
> POWER_SUPPLY_PROP_MANUFACTURER,
> @@ -228,6 +230,7 @@ static inline bool power_supply_is_amp_property(enum power_supply_property psp)
> case POWER_SUPPLY_PROP_CURRENT_MAX:
> case POWER_SUPPLY_PROP_CURRENT_NOW:
> case POWER_SUPPLY_PROP_CURRENT_AVG:
> + case POWER_SUPPLY_PROP_CHARGE_TO_USE:
> return 1;
> default:
> break;
> @@ -252,6 +255,7 @@ static inline bool power_supply_is_watt_property(enum power_supply_property psp)
> case POWER_SUPPLY_PROP_VOLTAGE_NOW:
> case POWER_SUPPLY_PROP_VOLTAGE_AVG:
> case POWER_SUPPLY_PROP_POWER_NOW:
> + case POWER_SUPPLY_PROP_VOLTAGE_TO_USE:
> return 1;
> default:
> break;
> --
> 1.7.6
>
>



\
 
 \ /
  Last update: 2011-10-30 10:55    [W:0.050 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site