diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2009-10-15 06:31:37 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-01-15 16:59:50 -0500 |
commit | 16698857fba1b10af4890055272975adf5686e83 (patch) | |
tree | 13189c16f28314ed9f8c515ac456583c3fdd68f8 /drivers | |
parent | c955fe8e0bdd7be7a6bc2d49245d570a816f7cc5 (diff) |
ACPI: SBS: Export cycle_count
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/sbs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 52b9db8afc20..38412ec2332d 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -217,6 +217,9 @@ static int acpi_sbs_battery_get_property(struct power_supply *psy, | |||
217 | case POWER_SUPPLY_PROP_TECHNOLOGY: | 217 | case POWER_SUPPLY_PROP_TECHNOLOGY: |
218 | val->intval = acpi_battery_technology(battery); | 218 | val->intval = acpi_battery_technology(battery); |
219 | break; | 219 | break; |
220 | case POWER_SUPPLY_PROP_CYCLE_COUNT: | ||
221 | val->intval = battery->cycle_count; | ||
222 | break; | ||
220 | case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: | 223 | case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: |
221 | val->intval = battery->design_voltage * | 224 | val->intval = battery->design_voltage * |
222 | acpi_battery_vscale(battery) * 1000; | 225 | acpi_battery_vscale(battery) * 1000; |
@@ -276,6 +279,7 @@ static enum power_supply_property sbs_charge_battery_props[] = { | |||
276 | POWER_SUPPLY_PROP_STATUS, | 279 | POWER_SUPPLY_PROP_STATUS, |
277 | POWER_SUPPLY_PROP_PRESENT, | 280 | POWER_SUPPLY_PROP_PRESENT, |
278 | POWER_SUPPLY_PROP_TECHNOLOGY, | 281 | POWER_SUPPLY_PROP_TECHNOLOGY, |
282 | POWER_SUPPLY_PROP_CYCLE_COUNT, | ||
279 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, | 283 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, |
280 | POWER_SUPPLY_PROP_VOLTAGE_NOW, | 284 | POWER_SUPPLY_PROP_VOLTAGE_NOW, |
281 | POWER_SUPPLY_PROP_CURRENT_NOW, | 285 | POWER_SUPPLY_PROP_CURRENT_NOW, |
@@ -560,6 +564,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset) | |||
560 | battery->design_voltage * acpi_battery_vscale(battery)); | 564 | battery->design_voltage * acpi_battery_vscale(battery)); |
561 | seq_printf(seq, "design capacity warning: unknown\n"); | 565 | seq_printf(seq, "design capacity warning: unknown\n"); |
562 | seq_printf(seq, "design capacity low: unknown\n"); | 566 | seq_printf(seq, "design capacity low: unknown\n"); |
567 | seq_printf(seq, "cycle count: %i\n", battery->cycle_count); | ||
563 | seq_printf(seq, "capacity granularity 1: unknown\n"); | 568 | seq_printf(seq, "capacity granularity 1: unknown\n"); |
564 | seq_printf(seq, "capacity granularity 2: unknown\n"); | 569 | seq_printf(seq, "capacity granularity 2: unknown\n"); |
565 | seq_printf(seq, "model number: %s\n", battery->device_name); | 570 | seq_printf(seq, "model number: %s\n", battery->device_name); |