Lines Matching refs:acpi_battery
87 struct acpi_battery {
120 #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
132 struct acpi_battery battery[MAX_SBS_BAT];
148 static inline int acpi_battery_vscale(struct acpi_battery *battery)
153 static inline int acpi_battery_ipscale(struct acpi_battery *battery)
158 static inline int acpi_battery_mode(struct acpi_battery *battery)
163 static inline int acpi_battery_scale(struct acpi_battery *battery)
185 static int acpi_battery_technology(struct acpi_battery *battery)
202 struct acpi_battery *battery = to_acpi_battery(psy);
329 {0x01, SMBUS_READ_WORD, offsetof(struct acpi_battery, alarm_capacity)},
330 {0x03, SMBUS_READ_WORD, offsetof(struct acpi_battery, mode)},
331 {0x10, SMBUS_READ_WORD, offsetof(struct acpi_battery, full_charge_capacity)},
332 {0x17, SMBUS_READ_WORD, offsetof(struct acpi_battery, cycle_count)},
333 {0x18, SMBUS_READ_WORD, offsetof(struct acpi_battery, design_capacity)},
334 {0x19, SMBUS_READ_WORD, offsetof(struct acpi_battery, design_voltage)},
335 {0x1a, SMBUS_READ_WORD, offsetof(struct acpi_battery, spec)},
336 {0x1c, SMBUS_READ_WORD, offsetof(struct acpi_battery, serial_number)},
337 {0x20, SMBUS_READ_BLOCK, offsetof(struct acpi_battery, manufacturer_name)},
338 {0x21, SMBUS_READ_BLOCK, offsetof(struct acpi_battery, device_name)},
339 {0x22, SMBUS_READ_BLOCK, offsetof(struct acpi_battery, device_chemistry)},
343 {0x08, SMBUS_READ_WORD, offsetof(struct acpi_battery, temp_now)},
344 {0x09, SMBUS_READ_WORD, offsetof(struct acpi_battery, voltage_now)},
345 {0x0a, SMBUS_READ_WORD, offsetof(struct acpi_battery, rate_now)},
346 {0x0b, SMBUS_READ_WORD, offsetof(struct acpi_battery, rate_avg)},
347 {0x0f, SMBUS_READ_WORD, offsetof(struct acpi_battery, capacity_now)},
348 {0x0e, SMBUS_READ_WORD, offsetof(struct acpi_battery, state_of_charge)},
349 {0x16, SMBUS_READ_WORD, offsetof(struct acpi_battery, state)},
364 static int acpi_battery_get_info(struct acpi_battery *battery)
381 static int acpi_battery_get_state(struct acpi_battery *battery)
404 static int acpi_battery_get_alarm(struct acpi_battery *battery)
411 static int acpi_battery_set_alarm(struct acpi_battery *battery)
457 struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
468 struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
538 static inline char *acpi_battery_units(struct acpi_battery *battery)
546 struct acpi_battery *battery = seq->private;
590 struct acpi_battery *battery = seq->private;
629 struct acpi_battery *battery = seq->private;
659 struct acpi_battery *battery = seq->private;
753 static int acpi_battery_read(struct acpi_battery *battery)
785 struct acpi_battery *battery = &sbs->battery[id];
832 struct acpi_battery *battery = &sbs->battery[id];
893 struct acpi_battery *bat;