Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932153AbZGOQVD (ORCPT ); Wed, 15 Jul 2009 12:21:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932129AbZGOQVB (ORCPT ); Wed, 15 Jul 2009 12:21:01 -0400 Received: from buzzloop.caiaq.de ([212.112.241.133]:43766 "EHLO buzzloop.caiaq.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755592AbZGOQU7 (ORCPT ); Wed, 15 Jul 2009 12:20:59 -0400 From: Daniel Mack To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, Daniel Mack , Szabolcs Gyurko , Matt Reimer , Anton Vorontsov Subject: [PATCH 2/4] ds2760: export more features Date: Wed, 15 Jul 2009 18:20:39 +0200 Message-Id: <1247674841-9909-2-git-send-email-daniel@caiaq.de> X-Mailer: git-send-email 1.6.3.1 In-Reply-To: <1247674841-9909-1-git-send-email-daniel@caiaq.de> References: <1247674841-9909-1-git-send-email-daniel@caiaq.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1478 Lines: 45 Export POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW and POWER_SUPPLY_PROP_CAPACITY features to the power supply core. Signed-off-by: Daniel Mack Cc: Szabolcs Gyurko Cc: Matt Reimer Cc: Anton Vorontsov --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/