From: Daniel Mack <daniel@caiaq.de>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, Daniel Mack <daniel@caiaq.de>,
Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>,
Matt Reimer <mreimer@vpop.net>, Anton Vorontsov <cbou@mail.ru>
Subject: [PATCH 2/4] ds2760: export more features
Date: Wed, 15 Jul 2009 18:20:39 +0200 [thread overview]
Message-ID: <1247674841-9909-2-git-send-email-daniel@caiaq.de> (raw)
In-Reply-To: <1247674841-9909-1-git-send-email-daniel@caiaq.de>
Export POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW and POWER_SUPPLY_PROP_CAPACITY
features to the power supply core.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>
Cc: Matt Reimer <mreimer@vpop.net>
Cc: Anton Vorontsov <cbou@mail.ru>
---
drivers/power/ds2760_battery.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c
index cf07c43..f439071 100644
--- a/drivers/power/ds2760_battery.c
+++ b/drivers/power/ds2760_battery.c
@@ -337,6 +337,12 @@ static int ds2760_battery_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_TEMP:
val->intval = di->temp_C;
break;
+ case POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW:
+ val->intval = di->life_sec;
+ break;
+ case POWER_SUPPLY_PROP_CAPACITY:
+ val->intval = di->rem_capacity;
+ break;
default:
return -EINVAL;
}
@@ -353,6 +359,8 @@ static enum power_supply_property ds2760_battery_props[] = {
POWER_SUPPLY_PROP_CHARGE_EMPTY,
POWER_SUPPLY_PROP_CHARGE_NOW,
POWER_SUPPLY_PROP_TEMP,
+ POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW,
+ POWER_SUPPLY_PROP_CAPACITY,
};
static int ds2760_battery_probe(struct platform_device *pdev)
--
1.6.3.1
next prev parent reply other threads:[~2009-07-15 16:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 16:20 [PATCH 1/4] ds2760: delay power supply registration Daniel Mack
2009-07-15 16:20 ` Daniel Mack [this message]
2009-07-15 16:20 ` [PATCH 3/4] ds2760: add rated_capacity module parameter Daniel Mack
2009-07-15 16:20 ` [PATCH 4/4] ds2760: handle full_active_uAh == 0 case correctly Daniel Mack
2009-07-15 18:06 ` Matt Reimer
2009-07-15 18:51 ` Daniel Mack
2009-07-15 19:06 ` Andrew Morton
2009-07-15 19:28 ` Anton Vorontsov
2009-07-15 20:02 ` Daniel Mack
2009-07-15 20:57 ` Daniel Mack
2009-07-15 18:06 ` [PATCH 3/4] ds2760: add rated_capacity module parameter Matt Reimer
2009-07-15 18:06 ` [PATCH 2/4] ds2760: export more features Matt Reimer
2009-07-15 18:05 ` [PATCH 1/4] ds2760: delay power supply registration Matt Reimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1247674841-9909-2-git-send-email-daniel@caiaq.de \
--to=daniel@caiaq.de \
--cc=akpm@linux-foundation.org \
--cc=cbou@mail.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mreimer@vpop.net \
--cc=szabolcs.gyurko@tlt.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox