1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * sbs.c - ACPI Smart Battery System Driver ($Revision: 2.0 $)
5 * Copyright (c) 2007 Alexey Starikovskiy <astarikovskiy@suse.de>
6 * Copyright (c) 2005-2007 Vladimir Lebedev <vladimir.p.lebedev@intel.com>
7 * Copyright (c) 2005 Rich Townsend <rhdt@bartol.udel.edu>
10 #define pr_fmt(fmt) "ACPI: " fmt
12 #include <linux/init.h>
13 #include <linux/slab.h>
14 #include <linux/module.h>
15 #include <linux/moduleparam.h>
16 #include <linux/kernel.h>
18 #include <linux/acpi.h>
19 #include <linux/timer.h>
20 #include <linux/jiffies.h>
21 #include <linux/delay.h>
22 #include <linux/power_supply.h>
23 #include <linux/platform_data/x86/apple.h>
24 #include <acpi/battery.h>
28 #define ACPI_SBS_CLASS "sbs"
29 #define ACPI_AC_CLASS "ac_adapter"
30 #define ACPI_SBS_DEVICE_NAME "Smart Battery System"
31 #define ACPI_BATTERY_DIR_NAME "BAT%i"
32 #define ACPI_AC_DIR_NAME "AC0"
34 #define ACPI_SBS_NOTIFY_STATUS 0x80
35 #define ACPI_SBS_NOTIFY_INFO 0x81
37 MODULE_AUTHOR("Alexey Starikovskiy <astarikovskiy@suse.de>");
38 MODULE_DESCRIPTION("Smart Battery System ACPI interface driver");
39 MODULE_LICENSE("GPL");
41 static unsigned int cache_time
= 1000;
42 module_param(cache_time
, uint
, 0644);
43 MODULE_PARM_DESC(cache_time
, "cache time in milliseconds");
46 #define ACPI_SBS_BLOCK_MAX 32
48 static const struct acpi_device_id sbs_device_ids
[] = {
52 MODULE_DEVICE_TABLE(acpi
, sbs_device_ids
);
55 struct power_supply
*bat
;
56 struct power_supply_desc bat_desc
;
58 unsigned long update_time
;
60 char manufacturer_name
[ACPI_SBS_BLOCK_MAX
];
61 char device_name
[ACPI_SBS_BLOCK_MAX
];
62 char device_chemistry
[ACPI_SBS_BLOCK_MAX
];
64 u16 full_charge_capacity
;
82 #define to_acpi_battery(x) power_supply_get_drvdata(x)
85 struct power_supply
*charger
;
86 struct acpi_device
*device
;
87 struct acpi_smb_hc
*hc
;
89 struct acpi_battery battery
[MAX_SBS_BAT
];
90 u8 batteries_supported
:4;
96 #define to_acpi_sbs(x) power_supply_get_drvdata(x)
98 static void acpi_sbs_remove(struct acpi_device
*device
);
99 static int acpi_battery_get_state(struct acpi_battery
*battery
);
101 static inline int battery_scale(int log
)
109 static inline int acpi_battery_vscale(struct acpi_battery
*battery
)
111 return battery_scale((battery
->spec
& 0x0f00) >> 8);
114 static inline int acpi_battery_ipscale(struct acpi_battery
*battery
)
116 return battery_scale((battery
->spec
& 0xf000) >> 12);
119 static inline int acpi_battery_mode(struct acpi_battery
*battery
)
121 return (battery
->mode
& 0x8000);
124 static inline int acpi_battery_scale(struct acpi_battery
*battery
)
126 return (acpi_battery_mode(battery
) ? 10 : 1) *
127 acpi_battery_ipscale(battery
);
130 static int sbs_get_ac_property(struct power_supply
*psy
,
131 enum power_supply_property psp
,
132 union power_supply_propval
*val
)
134 struct acpi_sbs
*sbs
= to_acpi_sbs(psy
);
136 case POWER_SUPPLY_PROP_ONLINE
:
137 val
->intval
= sbs
->charger_present
;
145 static int acpi_battery_technology(struct acpi_battery
*battery
)
147 if (!strcasecmp("NiCd", battery
->device_chemistry
))
148 return POWER_SUPPLY_TECHNOLOGY_NiCd
;
149 if (!strcasecmp("NiMH", battery
->device_chemistry
))
150 return POWER_SUPPLY_TECHNOLOGY_NiMH
;
151 if (!strcasecmp("LION", battery
->device_chemistry
))
152 return POWER_SUPPLY_TECHNOLOGY_LION
;
153 if (!strcasecmp("LiP", battery
->device_chemistry
))
154 return POWER_SUPPLY_TECHNOLOGY_LIPO
;
155 return POWER_SUPPLY_TECHNOLOGY_UNKNOWN
;
158 static int acpi_sbs_battery_get_property(struct power_supply
*psy
,
159 enum power_supply_property psp
,
160 union power_supply_propval
*val
)
162 struct acpi_battery
*battery
= to_acpi_battery(psy
);
164 if ((!battery
->present
) && psp
!= POWER_SUPPLY_PROP_PRESENT
)
167 acpi_battery_get_state(battery
);
169 case POWER_SUPPLY_PROP_STATUS
:
170 if (battery
->rate_now
< 0)
171 val
->intval
= POWER_SUPPLY_STATUS_DISCHARGING
;
172 else if (battery
->rate_now
> 0)
173 val
->intval
= POWER_SUPPLY_STATUS_CHARGING
;
175 val
->intval
= POWER_SUPPLY_STATUS_FULL
;
177 case POWER_SUPPLY_PROP_PRESENT
:
178 val
->intval
= battery
->present
;
180 case POWER_SUPPLY_PROP_TECHNOLOGY
:
181 val
->intval
= acpi_battery_technology(battery
);
183 case POWER_SUPPLY_PROP_CYCLE_COUNT
:
184 val
->intval
= battery
->cycle_count
;
186 case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN
:
187 val
->intval
= battery
->design_voltage
*
188 acpi_battery_vscale(battery
) * 1000;
190 case POWER_SUPPLY_PROP_VOLTAGE_NOW
:
191 val
->intval
= battery
->voltage_now
*
192 acpi_battery_vscale(battery
) * 1000;
194 case POWER_SUPPLY_PROP_CURRENT_NOW
:
195 case POWER_SUPPLY_PROP_POWER_NOW
:
196 val
->intval
= abs(battery
->rate_now
) *
197 acpi_battery_ipscale(battery
) * 1000;
198 val
->intval
*= (acpi_battery_mode(battery
)) ?
199 (battery
->voltage_now
*
200 acpi_battery_vscale(battery
) / 1000) : 1;
202 case POWER_SUPPLY_PROP_CURRENT_AVG
:
203 case POWER_SUPPLY_PROP_POWER_AVG
:
204 val
->intval
= abs(battery
->rate_avg
) *
205 acpi_battery_ipscale(battery
) * 1000;
206 val
->intval
*= (acpi_battery_mode(battery
)) ?
207 (battery
->voltage_now
*
208 acpi_battery_vscale(battery
) / 1000) : 1;
210 case POWER_SUPPLY_PROP_CAPACITY
:
211 val
->intval
= battery
->state_of_charge
;
213 case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN
:
214 case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN
:
215 val
->intval
= battery
->design_capacity
*
216 acpi_battery_scale(battery
) * 1000;
218 case POWER_SUPPLY_PROP_CHARGE_FULL
:
219 case POWER_SUPPLY_PROP_ENERGY_FULL
:
220 val
->intval
= battery
->full_charge_capacity
*
221 acpi_battery_scale(battery
) * 1000;
223 case POWER_SUPPLY_PROP_CHARGE_NOW
:
224 case POWER_SUPPLY_PROP_ENERGY_NOW
:
225 val
->intval
= battery
->capacity_now
*
226 acpi_battery_scale(battery
) * 1000;
228 case POWER_SUPPLY_PROP_TEMP
:
229 val
->intval
= battery
->temp_now
- 2730; // dK -> dC
231 case POWER_SUPPLY_PROP_MODEL_NAME
:
232 val
->strval
= battery
->device_name
;
234 case POWER_SUPPLY_PROP_MANUFACTURER
:
235 val
->strval
= battery
->manufacturer_name
;
243 static const enum power_supply_property sbs_ac_props
[] = {
244 POWER_SUPPLY_PROP_ONLINE
,
247 static const enum power_supply_property sbs_charge_battery_props
[] = {
248 POWER_SUPPLY_PROP_STATUS
,
249 POWER_SUPPLY_PROP_PRESENT
,
250 POWER_SUPPLY_PROP_TECHNOLOGY
,
251 POWER_SUPPLY_PROP_CYCLE_COUNT
,
252 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN
,
253 POWER_SUPPLY_PROP_VOLTAGE_NOW
,
254 POWER_SUPPLY_PROP_CURRENT_NOW
,
255 POWER_SUPPLY_PROP_CURRENT_AVG
,
256 POWER_SUPPLY_PROP_CAPACITY
,
257 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN
,
258 POWER_SUPPLY_PROP_CHARGE_FULL
,
259 POWER_SUPPLY_PROP_CHARGE_NOW
,
260 POWER_SUPPLY_PROP_TEMP
,
261 POWER_SUPPLY_PROP_MODEL_NAME
,
262 POWER_SUPPLY_PROP_MANUFACTURER
,
265 static const enum power_supply_property sbs_energy_battery_props
[] = {
266 POWER_SUPPLY_PROP_STATUS
,
267 POWER_SUPPLY_PROP_PRESENT
,
268 POWER_SUPPLY_PROP_TECHNOLOGY
,
269 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN
,
270 POWER_SUPPLY_PROP_VOLTAGE_NOW
,
271 POWER_SUPPLY_PROP_CURRENT_NOW
,
272 POWER_SUPPLY_PROP_CURRENT_AVG
,
273 POWER_SUPPLY_PROP_POWER_NOW
,
274 POWER_SUPPLY_PROP_POWER_AVG
,
275 POWER_SUPPLY_PROP_CAPACITY
,
276 POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN
,
277 POWER_SUPPLY_PROP_ENERGY_FULL
,
278 POWER_SUPPLY_PROP_ENERGY_NOW
,
279 POWER_SUPPLY_PROP_TEMP
,
280 POWER_SUPPLY_PROP_MODEL_NAME
,
281 POWER_SUPPLY_PROP_MANUFACTURER
,
284 static const struct power_supply_desc acpi_sbs_charger_desc
= {
285 .name
= "sbs-charger",
286 .type
= POWER_SUPPLY_TYPE_MAINS
,
287 .properties
= sbs_ac_props
,
288 .num_properties
= ARRAY_SIZE(sbs_ac_props
),
289 .get_property
= sbs_get_ac_property
,
292 /* --------------------------------------------------------------------------
293 Smart Battery System Management
294 -------------------------------------------------------------------------- */
296 struct acpi_battery_reader
{
297 u8 command
; /* command for battery */
298 u8 mode
; /* word or block? */
299 size_t offset
; /* offset inside struct acpi_sbs_battery */
302 static struct acpi_battery_reader info_readers
[] = {
303 {0x01, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, alarm_capacity
)},
304 {0x03, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, mode
)},
305 {0x10, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, full_charge_capacity
)},
306 {0x17, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, cycle_count
)},
307 {0x18, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, design_capacity
)},
308 {0x19, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, design_voltage
)},
309 {0x1a, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, spec
)},
310 {0x1c, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, serial_number
)},
311 {0x20, SMBUS_READ_BLOCK
, offsetof(struct acpi_battery
, manufacturer_name
)},
312 {0x21, SMBUS_READ_BLOCK
, offsetof(struct acpi_battery
, device_name
)},
313 {0x22, SMBUS_READ_BLOCK
, offsetof(struct acpi_battery
, device_chemistry
)},
316 static struct acpi_battery_reader state_readers
[] = {
317 {0x08, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, temp_now
)},
318 {0x09, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, voltage_now
)},
319 {0x0a, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, rate_now
)},
320 {0x0b, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, rate_avg
)},
321 {0x0f, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, capacity_now
)},
322 {0x0e, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, state_of_charge
)},
323 {0x16, SMBUS_READ_WORD
, offsetof(struct acpi_battery
, state
)},
326 static int acpi_manager_get_info(struct acpi_sbs
*sbs
)
329 u16 battery_system_info
;
331 result
= acpi_smbus_read(sbs
->hc
, SMBUS_READ_WORD
, ACPI_SBS_MANAGER
,
332 0x04, (u8
*)&battery_system_info
);
334 sbs
->batteries_supported
= battery_system_info
& 0x000f;
338 static int acpi_battery_get_info(struct acpi_battery
*battery
)
342 for (i
= 0; i
< ARRAY_SIZE(info_readers
); ++i
) {
343 result
= acpi_smbus_read(battery
->sbs
->hc
,
344 info_readers
[i
].mode
,
346 info_readers
[i
].command
,
348 info_readers
[i
].offset
);
355 static int acpi_battery_get_state(struct acpi_battery
*battery
)
359 if (battery
->update_time
&&
360 time_before(jiffies
, battery
->update_time
+
361 msecs_to_jiffies(cache_time
)))
363 for (i
= 0; i
< ARRAY_SIZE(state_readers
); ++i
) {
364 result
= acpi_smbus_read(battery
->sbs
->hc
,
365 state_readers
[i
].mode
,
367 state_readers
[i
].command
,
369 state_readers
[i
].offset
);
374 battery
->update_time
= jiffies
;
378 static int acpi_battery_get_alarm(struct acpi_battery
*battery
)
380 return acpi_smbus_read(battery
->sbs
->hc
, SMBUS_READ_WORD
,
381 ACPI_SBS_BATTERY
, 0x01,
382 (u8
*)&battery
->alarm_capacity
);
385 static int acpi_battery_set_alarm(struct acpi_battery
*battery
)
387 struct acpi_sbs
*sbs
= battery
->sbs
;
388 u16 value
, sel
= 1 << (battery
->id
+ 12);
393 if (sbs
->manager_present
) {
394 ret
= acpi_smbus_read(sbs
->hc
, SMBUS_READ_WORD
, ACPI_SBS_MANAGER
,
398 if ((value
& 0xf000) != sel
) {
401 ret
= acpi_smbus_write(sbs
->hc
, SMBUS_WRITE_WORD
,
403 0x01, (u8
*)&value
, 2);
408 ret
= acpi_smbus_write(sbs
->hc
, SMBUS_WRITE_WORD
, ACPI_SBS_BATTERY
,
409 0x01, (u8
*)&battery
->alarm_capacity
, 2);
414 static int acpi_ac_get_present(struct acpi_sbs
*sbs
)
419 result
= acpi_smbus_read(sbs
->hc
, SMBUS_READ_WORD
, ACPI_SBS_CHARGER
,
420 0x13, (u8
*) & status
);
426 * The spec requires that bit 4 always be 1. If it's not set, assume
427 * that the implementation doesn't support an SBS charger.
429 * And on some MacBooks a status of 0xffff is always returned, no
430 * matter whether the charger is plugged in or not, which is also
431 * wrong, so ignore the SBS charger for those too.
433 if (!((status
>> 4) & 0x1) || status
== 0xffff)
436 sbs
->charger_present
= (status
>> 15) & 0x1;
440 static ssize_t
acpi_battery_alarm_show(struct device
*dev
,
441 struct device_attribute
*attr
,
444 struct acpi_battery
*battery
= to_acpi_battery(dev_get_drvdata(dev
));
445 acpi_battery_get_alarm(battery
);
446 return sprintf(buf
, "%d\n", battery
->alarm_capacity
*
447 acpi_battery_scale(battery
) * 1000);
450 static ssize_t
acpi_battery_alarm_store(struct device
*dev
,
451 struct device_attribute
*attr
,
452 const char *buf
, size_t count
)
455 struct acpi_battery
*battery
= to_acpi_battery(dev_get_drvdata(dev
));
456 if (sscanf(buf
, "%lu\n", &x
) == 1)
457 battery
->alarm_capacity
= x
/
458 (1000 * acpi_battery_scale(battery
));
459 if (battery
->present
)
460 acpi_battery_set_alarm(battery
);
464 static struct device_attribute alarm_attr
= {
465 .attr
= {.name
= "alarm", .mode
= 0644},
466 .show
= acpi_battery_alarm_show
,
467 .store
= acpi_battery_alarm_store
,
470 static struct attribute
*acpi_battery_attrs
[] = {
474 ATTRIBUTE_GROUPS(acpi_battery
);
476 /* --------------------------------------------------------------------------
478 -------------------------------------------------------------------------- */
479 static int acpi_battery_read(struct acpi_battery
*battery
)
481 int result
, saved_present
= battery
->present
;
484 if (battery
->sbs
->manager_present
) {
485 result
= acpi_smbus_read(battery
->sbs
->hc
, SMBUS_READ_WORD
,
486 ACPI_SBS_MANAGER
, 0x01, (u8
*)&state
);
490 battery
->present
= state
& (1 << battery
->id
);
491 if (!battery
->present
)
494 /* Masking necessary for Smart Battery Selectors */
496 state
|= 1 << (battery
->id
+ 12);
497 acpi_smbus_write(battery
->sbs
->hc
, SMBUS_WRITE_WORD
,
498 ACPI_SBS_MANAGER
, 0x01, (u8
*)&state
, 2);
500 if (battery
->id
== 0) {
501 battery
->present
= 1;
503 if (!battery
->present
)
508 if (saved_present
!= battery
->present
) {
509 battery
->update_time
= 0;
510 result
= acpi_battery_get_info(battery
);
512 battery
->present
= 0;
516 result
= acpi_battery_get_state(battery
);
518 battery
->present
= 0;
523 static int acpi_battery_add(struct acpi_sbs
*sbs
, int id
)
525 struct acpi_battery
*battery
= &sbs
->battery
[id
];
526 struct power_supply_config psy_cfg
= {
528 .attr_grp
= acpi_battery_groups
,
534 result
= acpi_battery_read(battery
);
538 sprintf(battery
->name
, ACPI_BATTERY_DIR_NAME
, id
);
539 battery
->bat_desc
.name
= battery
->name
;
540 battery
->bat_desc
.type
= POWER_SUPPLY_TYPE_BATTERY
;
541 if (!acpi_battery_mode(battery
)) {
542 battery
->bat_desc
.properties
= sbs_charge_battery_props
;
543 battery
->bat_desc
.num_properties
=
544 ARRAY_SIZE(sbs_charge_battery_props
);
546 battery
->bat_desc
.properties
= sbs_energy_battery_props
;
547 battery
->bat_desc
.num_properties
=
548 ARRAY_SIZE(sbs_energy_battery_props
);
550 battery
->bat_desc
.get_property
= acpi_sbs_battery_get_property
;
551 battery
->bat
= power_supply_register(&sbs
->device
->dev
,
552 &battery
->bat_desc
, &psy_cfg
);
553 if (IS_ERR(battery
->bat
)) {
554 result
= PTR_ERR(battery
->bat
);
560 pr_info("%s [%s]: Battery Slot [%s] (battery %s)\n",
561 ACPI_SBS_DEVICE_NAME
, acpi_device_bid(sbs
->device
),
562 battery
->name
, battery
->present
? "present" : "absent");
566 static void acpi_battery_remove(struct acpi_sbs
*sbs
, int id
)
568 struct acpi_battery
*battery
= &sbs
->battery
[id
];
571 power_supply_unregister(battery
->bat
);
574 static int acpi_charger_add(struct acpi_sbs
*sbs
)
577 struct power_supply_config psy_cfg
= { .drv_data
= sbs
, };
579 result
= acpi_ac_get_present(sbs
);
583 sbs
->charger_exists
= 1;
584 sbs
->charger
= power_supply_register(&sbs
->device
->dev
,
585 &acpi_sbs_charger_desc
, &psy_cfg
);
586 if (IS_ERR(sbs
->charger
)) {
587 result
= PTR_ERR(sbs
->charger
);
590 pr_info("%s [%s]: AC Adapter [%s] (%s)\n",
591 ACPI_SBS_DEVICE_NAME
, acpi_device_bid(sbs
->device
),
592 ACPI_AC_DIR_NAME
, sbs
->charger_present
? "on-line" : "off-line");
597 static void acpi_charger_remove(struct acpi_sbs
*sbs
)
600 power_supply_unregister(sbs
->charger
);
603 static void acpi_sbs_callback(void *context
)
606 struct acpi_sbs
*sbs
= context
;
607 struct acpi_battery
*bat
;
608 u8 saved_charger_state
= sbs
->charger_present
;
609 u8 saved_battery_state
;
611 if (sbs
->charger_exists
) {
612 acpi_ac_get_present(sbs
);
613 if (sbs
->charger_present
!= saved_charger_state
)
614 power_supply_changed(sbs
->charger
);
617 if (sbs
->manager_present
) {
618 for (id
= 0; id
< MAX_SBS_BAT
; ++id
) {
619 if (!(sbs
->batteries_supported
& (1 << id
)))
621 bat
= &sbs
->battery
[id
];
622 saved_battery_state
= bat
->present
;
623 acpi_battery_read(bat
);
624 if (saved_battery_state
== bat
->present
)
626 power_supply_changed(bat
->bat
);
631 static int acpi_sbs_add(struct acpi_device
*device
)
633 struct acpi_sbs
*sbs
;
637 sbs
= kzalloc(sizeof(struct acpi_sbs
), GFP_KERNEL
);
643 mutex_init(&sbs
->lock
);
645 sbs
->hc
= acpi_driver_data(acpi_dev_parent(device
));
646 sbs
->device
= device
;
647 strscpy(acpi_device_name(device
), ACPI_SBS_DEVICE_NAME
);
648 strscpy(acpi_device_class(device
), ACPI_SBS_CLASS
);
649 device
->driver_data
= sbs
;
651 result
= acpi_charger_add(sbs
);
652 if (result
&& result
!= -ENODEV
)
657 if (!x86_apple_machine
) {
658 result
= acpi_manager_get_info(sbs
);
660 sbs
->manager_present
= 1;
661 for (id
= 0; id
< MAX_SBS_BAT
; ++id
)
662 if ((sbs
->batteries_supported
& (1 << id
)))
663 acpi_battery_add(sbs
, id
);
667 if (!sbs
->manager_present
)
668 acpi_battery_add(sbs
, 0);
670 acpi_smbus_register_callback(sbs
->hc
, acpi_sbs_callback
, sbs
);
673 acpi_sbs_remove(device
);
677 static void acpi_sbs_remove(struct acpi_device
*device
)
679 struct acpi_sbs
*sbs
;
684 sbs
= acpi_driver_data(device
);
687 mutex_lock(&sbs
->lock
);
688 acpi_smbus_unregister_callback(sbs
->hc
);
689 for (id
= 0; id
< MAX_SBS_BAT
; ++id
)
690 acpi_battery_remove(sbs
, id
);
691 acpi_charger_remove(sbs
);
692 mutex_unlock(&sbs
->lock
);
693 mutex_destroy(&sbs
->lock
);
697 #ifdef CONFIG_PM_SLEEP
698 static int acpi_sbs_resume(struct device
*dev
)
700 struct acpi_sbs
*sbs
;
703 sbs
= to_acpi_device(dev
)->driver_data
;
704 acpi_sbs_callback(sbs
);
708 #define acpi_sbs_resume NULL
711 static SIMPLE_DEV_PM_OPS(acpi_sbs_pm
, NULL
, acpi_sbs_resume
);
713 static struct acpi_driver acpi_sbs_driver
= {
715 .class = ACPI_SBS_CLASS
,
716 .ids
= sbs_device_ids
,
719 .remove
= acpi_sbs_remove
,
721 .drv
.pm
= &acpi_sbs_pm
,
723 module_acpi_driver(acpi_sbs_driver
);