Lines Matching refs:acpi_battery
84 struct acpi_battery { struct
115 #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat) argument
125 struct acpi_battery battery[MAX_SBS_BAT];
134 static int acpi_battery_get_state(struct acpi_battery *battery);
144 static inline int acpi_battery_vscale(struct acpi_battery *battery) in acpi_battery_vscale()
149 static inline int acpi_battery_ipscale(struct acpi_battery *battery) in acpi_battery_ipscale()
154 static inline int acpi_battery_mode(struct acpi_battery *battery) in acpi_battery_mode()
159 static inline int acpi_battery_scale(struct acpi_battery *battery) in acpi_battery_scale()
180 static int acpi_battery_technology(struct acpi_battery *battery) in acpi_battery_technology()
197 struct acpi_battery *battery = to_acpi_battery(psy); in acpi_sbs_battery_get_property()
331 {0x01, SMBUS_READ_WORD, offsetof(struct acpi_battery, alarm_capacity)},
332 {0x03, SMBUS_READ_WORD, offsetof(struct acpi_battery, mode)},
333 {0x10, SMBUS_READ_WORD, offsetof(struct acpi_battery, full_charge_capacity)},
334 {0x17, SMBUS_READ_WORD, offsetof(struct acpi_battery, cycle_count)},
335 {0x18, SMBUS_READ_WORD, offsetof(struct acpi_battery, design_capacity)},
336 {0x19, SMBUS_READ_WORD, offsetof(struct acpi_battery, design_voltage)},
337 {0x1a, SMBUS_READ_WORD, offsetof(struct acpi_battery, spec)},
338 {0x1c, SMBUS_READ_WORD, offsetof(struct acpi_battery, serial_number)},
339 {0x20, SMBUS_READ_BLOCK, offsetof(struct acpi_battery, manufacturer_name)},
340 {0x21, SMBUS_READ_BLOCK, offsetof(struct acpi_battery, device_name)},
341 {0x22, SMBUS_READ_BLOCK, offsetof(struct acpi_battery, device_chemistry)},
345 {0x08, SMBUS_READ_WORD, offsetof(struct acpi_battery, temp_now)},
346 {0x09, SMBUS_READ_WORD, offsetof(struct acpi_battery, voltage_now)},
347 {0x0a, SMBUS_READ_WORD, offsetof(struct acpi_battery, rate_now)},
348 {0x0b, SMBUS_READ_WORD, offsetof(struct acpi_battery, rate_avg)},
349 {0x0f, SMBUS_READ_WORD, offsetof(struct acpi_battery, capacity_now)},
350 {0x0e, SMBUS_READ_WORD, offsetof(struct acpi_battery, state_of_charge)},
351 {0x16, SMBUS_READ_WORD, offsetof(struct acpi_battery, state)},
366 static int acpi_battery_get_info(struct acpi_battery *battery) in acpi_battery_get_info()
383 static int acpi_battery_get_state(struct acpi_battery *battery) in acpi_battery_get_state()
406 static int acpi_battery_get_alarm(struct acpi_battery *battery) in acpi_battery_get_alarm()
413 static int acpi_battery_set_alarm(struct acpi_battery *battery) in acpi_battery_set_alarm()
458 struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); in acpi_battery_alarm_show()
469 struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); in acpi_battery_alarm_store()
540 static inline char *acpi_battery_units(struct acpi_battery *battery) in acpi_battery_units()
548 struct acpi_battery *battery = seq->private; in acpi_battery_read_info()
592 struct acpi_battery *battery = seq->private; in acpi_battery_read_state()
631 struct acpi_battery *battery = seq->private; in acpi_battery_read_alarm()
661 struct acpi_battery *battery = seq->private; in acpi_battery_write_alarm()
755 static int acpi_battery_read(struct acpi_battery *battery) in acpi_battery_read()
787 struct acpi_battery *battery = &sbs->battery[id]; in acpi_battery_add()
831 struct acpi_battery *battery = &sbs->battery[id]; in acpi_battery_remove()
885 struct acpi_battery *bat; in acpi_sbs_callback()