aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/sbs.c')
-rw-r--r--drivers/acpi/sbs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index b16ddbf23a9c..4ff76e8174eb 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -25,6 +25,7 @@
25 */ 25 */
26 26
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/slab.h>
28#include <linux/module.h> 29#include <linux/module.h>
29#include <linux/moduleparam.h> 30#include <linux/moduleparam.h>
30#include <linux/kernel.h> 31#include <linux/kernel.h>
@@ -217,6 +218,9 @@ static int acpi_sbs_battery_get_property(struct power_supply *psy,
217 case POWER_SUPPLY_PROP_TECHNOLOGY: 218 case POWER_SUPPLY_PROP_TECHNOLOGY:
218 val->intval = acpi_battery_technology(battery); 219 val->intval = acpi_battery_technology(battery);
219 break; 220 break;
221 case POWER_SUPPLY_PROP_CYCLE_COUNT:
222 val->intval = battery->cycle_count;
223 break;
220 case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: 224 case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
221 val->intval = battery->design_voltage * 225 val->intval = battery->design_voltage *
222 acpi_battery_vscale(battery) * 1000; 226 acpi_battery_vscale(battery) * 1000;
@@ -276,6 +280,7 @@ static enum power_supply_property sbs_charge_battery_props[] = {
276 POWER_SUPPLY_PROP_STATUS, 280 POWER_SUPPLY_PROP_STATUS,
277 POWER_SUPPLY_PROP_PRESENT, 281 POWER_SUPPLY_PROP_PRESENT,
278 POWER_SUPPLY_PROP_TECHNOLOGY, 282 POWER_SUPPLY_PROP_TECHNOLOGY,
283 POWER_SUPPLY_PROP_CYCLE_COUNT,
279 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, 284 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
280 POWER_SUPPLY_PROP_VOLTAGE_NOW, 285 POWER_SUPPLY_PROP_VOLTAGE_NOW,
281 POWER_SUPPLY_PROP_CURRENT_NOW, 286 POWER_SUPPLY_PROP_CURRENT_NOW,
@@ -560,6 +565,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
560 battery->design_voltage * acpi_battery_vscale(battery)); 565 battery->design_voltage * acpi_battery_vscale(battery));
561 seq_printf(seq, "design capacity warning: unknown\n"); 566 seq_printf(seq, "design capacity warning: unknown\n");
562 seq_printf(seq, "design capacity low: unknown\n"); 567 seq_printf(seq, "design capacity low: unknown\n");
568 seq_printf(seq, "cycle count: %i\n", battery->cycle_count);
563 seq_printf(seq, "capacity granularity 1: unknown\n"); 569 seq_printf(seq, "capacity granularity 1: unknown\n");
564 seq_printf(seq, "capacity granularity 2: unknown\n"); 570 seq_printf(seq, "capacity granularity 2: unknown\n");
565 seq_printf(seq, "model number: %s\n", battery->device_name); 571 seq_printf(seq, "model number: %s\n", battery->device_name);