ACPI / init: Flag use of ACPI and ACPI idioms for power supplies to regulator API
[deliverable/linux.git] / drivers / acpi / bus.c
1 /*
2 * acpi_bus.c - ACPI Bus Driver ($Revision: 80 $)
3 *
4 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
5 *
6 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or (at
11 * your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 *
22 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 */
24
25 #include <linux/module.h>
26 #include <linux/init.h>
27 #include <linux/ioport.h>
28 #include <linux/kernel.h>
29 #include <linux/list.h>
30 #include <linux/sched.h>
31 #include <linux/pm.h>
32 #include <linux/device.h>
33 #include <linux/proc_fs.h>
34 #include <linux/acpi.h>
35 #include <linux/slab.h>
36 #include <linux/regulator/machine.h>
37 #ifdef CONFIG_X86
38 #include <asm/mpspec.h>
39 #endif
40 #include <linux/pci.h>
41 #include <acpi/acpi_bus.h>
42 #include <acpi/acpi_drivers.h>
43 #include <acpi/apei.h>
44 #include <linux/dmi.h>
45 #include <linux/suspend.h>
46
47 #include "internal.h"
48
49 #define _COMPONENT ACPI_BUS_COMPONENT
50 ACPI_MODULE_NAME("bus");
51
52 struct acpi_device *acpi_root;
53 struct proc_dir_entry *acpi_root_dir;
54 EXPORT_SYMBOL(acpi_root_dir);
55
56 #define STRUCT_TO_INT(s) (*((int*)&s))
57
58
59 #ifdef CONFIG_X86
60 static int set_copy_dsdt(const struct dmi_system_id *id)
61 {
62 printk(KERN_NOTICE "%s detected - "
63 "force copy of DSDT to local memory\n", id->ident);
64 acpi_gbl_copy_dsdt_locally = 1;
65 return 0;
66 }
67
68 static struct dmi_system_id dsdt_dmi_table[] __initdata = {
69 /*
70 * Invoke DSDT corruption work-around on all Toshiba Satellite.
71 * https://bugzilla.kernel.org/show_bug.cgi?id=14679
72 */
73 {
74 .callback = set_copy_dsdt,
75 .ident = "TOSHIBA Satellite",
76 .matches = {
77 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
78 DMI_MATCH(DMI_PRODUCT_NAME, "Satellite"),
79 },
80 },
81 {}
82 };
83 #else
84 static struct dmi_system_id dsdt_dmi_table[] __initdata = {
85 {}
86 };
87 #endif
88
89 /* --------------------------------------------------------------------------
90 Device Management
91 -------------------------------------------------------------------------- */
92
93 acpi_status acpi_bus_get_status_handle(acpi_handle handle,
94 unsigned long long *sta)
95 {
96 acpi_status status;
97
98 status = acpi_evaluate_integer(handle, "_STA", NULL, sta);
99 if (ACPI_SUCCESS(status))
100 return AE_OK;
101
102 if (status == AE_NOT_FOUND) {
103 *sta = ACPI_STA_DEVICE_PRESENT | ACPI_STA_DEVICE_ENABLED |
104 ACPI_STA_DEVICE_UI | ACPI_STA_DEVICE_FUNCTIONING;
105 return AE_OK;
106 }
107 return status;
108 }
109
110 int acpi_bus_get_status(struct acpi_device *device)
111 {
112 acpi_status status;
113 unsigned long long sta;
114
115 status = acpi_bus_get_status_handle(device->handle, &sta);
116 if (ACPI_FAILURE(status))
117 return -ENODEV;
118
119 STRUCT_TO_INT(device->status) = (int) sta;
120
121 if (device->status.functional && !device->status.present) {
122 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]: "
123 "functional but not present;\n",
124 device->pnp.bus_id,
125 (u32) STRUCT_TO_INT(device->status)));
126 }
127
128 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]\n",
129 device->pnp.bus_id,
130 (u32) STRUCT_TO_INT(device->status)));
131 return 0;
132 }
133 EXPORT_SYMBOL(acpi_bus_get_status);
134
135 void acpi_bus_private_data_handler(acpi_handle handle,
136 void *context)
137 {
138 return;
139 }
140 EXPORT_SYMBOL(acpi_bus_private_data_handler);
141
142 int acpi_bus_get_private_data(acpi_handle handle, void **data)
143 {
144 acpi_status status;
145
146 if (!*data)
147 return -EINVAL;
148
149 status = acpi_get_data(handle, acpi_bus_private_data_handler, data);
150 if (ACPI_FAILURE(status) || !*data) {
151 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No context for object [%p]\n",
152 handle));
153 return -ENODEV;
154 }
155
156 return 0;
157 }
158 EXPORT_SYMBOL(acpi_bus_get_private_data);
159
160 void acpi_bus_no_hotplug(acpi_handle handle)
161 {
162 struct acpi_device *adev = NULL;
163
164 acpi_bus_get_device(handle, &adev);
165 if (adev)
166 adev->flags.no_hotplug = true;
167 }
168 EXPORT_SYMBOL_GPL(acpi_bus_no_hotplug);
169
170 static void acpi_print_osc_error(acpi_handle handle,
171 struct acpi_osc_context *context, char *error)
172 {
173 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER};
174 int i;
175
176 if (ACPI_FAILURE(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer)))
177 printk(KERN_DEBUG "%s\n", error);
178 else {
179 printk(KERN_DEBUG "%s:%s\n", (char *)buffer.pointer, error);
180 kfree(buffer.pointer);
181 }
182 printk(KERN_DEBUG"_OSC request data:");
183 for (i = 0; i < context->cap.length; i += sizeof(u32))
184 printk("%x ", *((u32 *)(context->cap.pointer + i)));
185 printk("\n");
186 }
187
188 acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
189 {
190 int i;
191 static int opc_map_to_uuid[16] = {6, 4, 2, 0, 11, 9, 16, 14, 19, 21,
192 24, 26, 28, 30, 32, 34};
193
194 if (strlen(str) != 36)
195 return AE_BAD_PARAMETER;
196 for (i = 0; i < 36; i++) {
197 if (i == 8 || i == 13 || i == 18 || i == 23) {
198 if (str[i] != '-')
199 return AE_BAD_PARAMETER;
200 } else if (!isxdigit(str[i]))
201 return AE_BAD_PARAMETER;
202 }
203 for (i = 0; i < 16; i++) {
204 uuid[i] = hex_to_bin(str[opc_map_to_uuid[i]]) << 4;
205 uuid[i] |= hex_to_bin(str[opc_map_to_uuid[i] + 1]);
206 }
207 return AE_OK;
208 }
209 EXPORT_SYMBOL_GPL(acpi_str_to_uuid);
210
211 acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
212 {
213 acpi_status status;
214 struct acpi_object_list input;
215 union acpi_object in_params[4];
216 union acpi_object *out_obj;
217 u8 uuid[16];
218 u32 errors;
219 struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
220
221 if (!context)
222 return AE_ERROR;
223 if (ACPI_FAILURE(acpi_str_to_uuid(context->uuid_str, uuid)))
224 return AE_ERROR;
225 context->ret.length = ACPI_ALLOCATE_BUFFER;
226 context->ret.pointer = NULL;
227
228 /* Setting up input parameters */
229 input.count = 4;
230 input.pointer = in_params;
231 in_params[0].type = ACPI_TYPE_BUFFER;
232 in_params[0].buffer.length = 16;
233 in_params[0].buffer.pointer = uuid;
234 in_params[1].type = ACPI_TYPE_INTEGER;
235 in_params[1].integer.value = context->rev;
236 in_params[2].type = ACPI_TYPE_INTEGER;
237 in_params[2].integer.value = context->cap.length/sizeof(u32);
238 in_params[3].type = ACPI_TYPE_BUFFER;
239 in_params[3].buffer.length = context->cap.length;
240 in_params[3].buffer.pointer = context->cap.pointer;
241
242 status = acpi_evaluate_object(handle, "_OSC", &input, &output);
243 if (ACPI_FAILURE(status))
244 return status;
245
246 if (!output.length)
247 return AE_NULL_OBJECT;
248
249 out_obj = output.pointer;
250 if (out_obj->type != ACPI_TYPE_BUFFER
251 || out_obj->buffer.length != context->cap.length) {
252 acpi_print_osc_error(handle, context,
253 "_OSC evaluation returned wrong type");
254 status = AE_TYPE;
255 goto out_kfree;
256 }
257 /* Need to ignore the bit0 in result code */
258 errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);
259 if (errors) {
260 if (errors & OSC_REQUEST_ERROR)
261 acpi_print_osc_error(handle, context,
262 "_OSC request failed");
263 if (errors & OSC_INVALID_UUID_ERROR)
264 acpi_print_osc_error(handle, context,
265 "_OSC invalid UUID");
266 if (errors & OSC_INVALID_REVISION_ERROR)
267 acpi_print_osc_error(handle, context,
268 "_OSC invalid revision");
269 if (errors & OSC_CAPABILITIES_MASK_ERROR) {
270 if (((u32 *)context->cap.pointer)[OSC_QUERY_DWORD]
271 & OSC_QUERY_ENABLE)
272 goto out_success;
273 status = AE_SUPPORT;
274 goto out_kfree;
275 }
276 status = AE_ERROR;
277 goto out_kfree;
278 }
279 out_success:
280 context->ret.length = out_obj->buffer.length;
281 context->ret.pointer = kmemdup(out_obj->buffer.pointer,
282 context->ret.length, GFP_KERNEL);
283 if (!context->ret.pointer) {
284 status = AE_NO_MEMORY;
285 goto out_kfree;
286 }
287 status = AE_OK;
288
289 out_kfree:
290 kfree(output.pointer);
291 if (status != AE_OK)
292 context->ret.pointer = NULL;
293 return status;
294 }
295 EXPORT_SYMBOL(acpi_run_osc);
296
297 bool osc_sb_apei_support_acked;
298 static u8 sb_uuid_str[] = "0811B06E-4A27-44F9-8D60-3CBBC22E7B48";
299 static void acpi_bus_osc_support(void)
300 {
301 u32 capbuf[2];
302 struct acpi_osc_context context = {
303 .uuid_str = sb_uuid_str,
304 .rev = 1,
305 .cap.length = 8,
306 .cap.pointer = capbuf,
307 };
308 acpi_handle handle;
309
310 capbuf[OSC_QUERY_DWORD] = OSC_QUERY_ENABLE;
311 capbuf[OSC_SUPPORT_DWORD] = OSC_SB_PR3_SUPPORT; /* _PR3 is in use */
312 #if defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) ||\
313 defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE)
314 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PAD_SUPPORT;
315 #endif
316
317 #if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
318 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PPC_OST_SUPPORT;
319 #endif
320
321 #ifdef ACPI_HOTPLUG_OST
322 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
323 #endif
324
325 if (!ghes_disable)
326 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_APEI_SUPPORT;
327 if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
328 return;
329 if (ACPI_SUCCESS(acpi_run_osc(handle, &context))) {
330 u32 *capbuf_ret = context.ret.pointer;
331 if (context.ret.length > OSC_SUPPORT_DWORD)
332 osc_sb_apei_support_acked =
333 capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_APEI_SUPPORT;
334 kfree(context.ret.pointer);
335 }
336 /* do we need to check other returned cap? Sounds no */
337 }
338
339 /* --------------------------------------------------------------------------
340 Notification Handling
341 -------------------------------------------------------------------------- */
342
343 static void acpi_bus_check_device(acpi_handle handle)
344 {
345 struct acpi_device *device;
346 acpi_status status;
347 struct acpi_device_status old_status;
348
349 if (acpi_bus_get_device(handle, &device))
350 return;
351 if (!device)
352 return;
353
354 old_status = device->status;
355
356 /*
357 * Make sure this device's parent is present before we go about
358 * messing with the device.
359 */
360 if (device->parent && !device->parent->status.present) {
361 device->status = device->parent->status;
362 return;
363 }
364
365 status = acpi_bus_get_status(device);
366 if (ACPI_FAILURE(status))
367 return;
368
369 if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status))
370 return;
371
372 /*
373 * Device Insertion/Removal
374 */
375 if ((device->status.present) && !(old_status.present)) {
376 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device insertion detected\n"));
377 /* TBD: Handle device insertion */
378 } else if (!(device->status.present) && (old_status.present)) {
379 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device removal detected\n"));
380 /* TBD: Handle device removal */
381 }
382 }
383
384 static void acpi_bus_check_scope(acpi_handle handle)
385 {
386 /* Status Change? */
387 acpi_bus_check_device(handle);
388
389 /*
390 * TBD: Enumerate child devices within this device's scope and
391 * run acpi_bus_check_device()'s on them.
392 */
393 }
394
395 /**
396 * acpi_bus_notify
397 * ---------------
398 * Callback for all 'system-level' device notifications (values 0x00-0x7F).
399 */
400 static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
401 {
402 struct acpi_device *device = NULL;
403 struct acpi_driver *driver;
404
405 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Notification %#02x to handle %p\n",
406 type, handle));
407
408 switch (type) {
409
410 case ACPI_NOTIFY_BUS_CHECK:
411 acpi_bus_check_scope(handle);
412 /*
413 * TBD: We'll need to outsource certain events to non-ACPI
414 * drivers via the device manager (device.c).
415 */
416 break;
417
418 case ACPI_NOTIFY_DEVICE_CHECK:
419 acpi_bus_check_device(handle);
420 /*
421 * TBD: We'll need to outsource certain events to non-ACPI
422 * drivers via the device manager (device.c).
423 */
424 break;
425
426 case ACPI_NOTIFY_DEVICE_WAKE:
427 /* TBD */
428 break;
429
430 case ACPI_NOTIFY_EJECT_REQUEST:
431 /* TBD */
432 break;
433
434 case ACPI_NOTIFY_DEVICE_CHECK_LIGHT:
435 /* TBD: Exactly what does 'light' mean? */
436 break;
437
438 case ACPI_NOTIFY_FREQUENCY_MISMATCH:
439 /* TBD */
440 break;
441
442 case ACPI_NOTIFY_BUS_MODE_MISMATCH:
443 /* TBD */
444 break;
445
446 case ACPI_NOTIFY_POWER_FAULT:
447 /* TBD */
448 break;
449
450 default:
451 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
452 "Received unknown/unsupported notification [%08x]\n",
453 type));
454 break;
455 }
456
457 acpi_bus_get_device(handle, &device);
458 if (device) {
459 driver = device->driver;
460 if (driver && driver->ops.notify &&
461 (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS))
462 driver->ops.notify(device, type);
463 }
464 }
465
466 /* --------------------------------------------------------------------------
467 Initialization/Cleanup
468 -------------------------------------------------------------------------- */
469
470 static int __init acpi_bus_init_irq(void)
471 {
472 acpi_status status;
473 char *message = NULL;
474
475
476 /*
477 * Let the system know what interrupt model we are using by
478 * evaluating the \_PIC object, if exists.
479 */
480
481 switch (acpi_irq_model) {
482 case ACPI_IRQ_MODEL_PIC:
483 message = "PIC";
484 break;
485 case ACPI_IRQ_MODEL_IOAPIC:
486 message = "IOAPIC";
487 break;
488 case ACPI_IRQ_MODEL_IOSAPIC:
489 message = "IOSAPIC";
490 break;
491 case ACPI_IRQ_MODEL_PLATFORM:
492 message = "platform specific model";
493 break;
494 default:
495 printk(KERN_WARNING PREFIX "Unknown interrupt routing model\n");
496 return -ENODEV;
497 }
498
499 printk(KERN_INFO PREFIX "Using %s for interrupt routing\n", message);
500
501 status = acpi_execute_simple_method(NULL, "\\_PIC", acpi_irq_model);
502 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
503 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC"));
504 return -ENODEV;
505 }
506
507 return 0;
508 }
509
510 u8 acpi_gbl_permanent_mmap;
511
512
513 void __init acpi_early_init(void)
514 {
515 acpi_status status;
516
517 if (acpi_disabled)
518 return;
519
520 printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION);
521
522 /* enable workarounds, unless strict ACPI spec. compliance */
523 if (!acpi_strict)
524 acpi_gbl_enable_interpreter_slack = TRUE;
525
526 acpi_gbl_permanent_mmap = 1;
527
528 /*
529 * If the machine falls into the DMI check table,
530 * DSDT will be copied to memory
531 */
532 dmi_check_system(dsdt_dmi_table);
533
534 status = acpi_reallocate_root_table();
535 if (ACPI_FAILURE(status)) {
536 printk(KERN_ERR PREFIX
537 "Unable to reallocate ACPI tables\n");
538 goto error0;
539 }
540
541 status = acpi_initialize_subsystem();
542 if (ACPI_FAILURE(status)) {
543 printk(KERN_ERR PREFIX
544 "Unable to initialize the ACPI Interpreter\n");
545 goto error0;
546 }
547
548 status = acpi_load_tables();
549 if (ACPI_FAILURE(status)) {
550 printk(KERN_ERR PREFIX
551 "Unable to load the System Description Tables\n");
552 goto error0;
553 }
554
555 #ifdef CONFIG_X86
556 if (!acpi_ioapic) {
557 /* compatible (0) means level (3) */
558 if (!(acpi_sci_flags & ACPI_MADT_TRIGGER_MASK)) {
559 acpi_sci_flags &= ~ACPI_MADT_TRIGGER_MASK;
560 acpi_sci_flags |= ACPI_MADT_TRIGGER_LEVEL;
561 }
562 /* Set PIC-mode SCI trigger type */
563 acpi_pic_sci_set_trigger(acpi_gbl_FADT.sci_interrupt,
564 (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) >> 2);
565 } else {
566 /*
567 * now that acpi_gbl_FADT is initialized,
568 * update it with result from INT_SRC_OVR parsing
569 */
570 acpi_gbl_FADT.sci_interrupt = acpi_sci_override_gsi;
571 }
572 #endif
573
574 status = acpi_enable_subsystem(~ACPI_NO_ACPI_ENABLE);
575 if (ACPI_FAILURE(status)) {
576 printk(KERN_ERR PREFIX "Unable to enable ACPI\n");
577 goto error0;
578 }
579
580 /*
581 * If the system is using ACPI then we can be reasonably
582 * confident that any regulators are managed by the firmware
583 * so tell the regulator core it has everything it needs to
584 * know.
585 */
586 regulator_has_full_constraints();
587
588 return;
589
590 error0:
591 disable_acpi();
592 return;
593 }
594
595 static int __init acpi_bus_init(void)
596 {
597 int result;
598 acpi_status status;
599
600 acpi_os_initialize1();
601
602 status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE);
603 if (ACPI_FAILURE(status)) {
604 printk(KERN_ERR PREFIX
605 "Unable to start the ACPI Interpreter\n");
606 goto error1;
607 }
608
609 /*
610 * ACPI 2.0 requires the EC driver to be loaded and work before
611 * the EC device is found in the namespace (i.e. before acpi_initialize_objects()
612 * is called).
613 *
614 * This is accomplished by looking for the ECDT table, and getting
615 * the EC parameters out of that.
616 */
617 status = acpi_ec_ecdt_probe();
618 /* Ignore result. Not having an ECDT is not fatal. */
619
620 status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
621 if (ACPI_FAILURE(status)) {
622 printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n");
623 goto error1;
624 }
625
626 /*
627 * _OSC method may exist in module level code,
628 * so it must be run after ACPI_FULL_INITIALIZATION
629 */
630 acpi_bus_osc_support();
631
632 /*
633 * _PDC control method may load dynamic SSDT tables,
634 * and we need to install the table handler before that.
635 */
636 acpi_sysfs_init();
637
638 acpi_early_processor_set_pdc();
639
640 /*
641 * Maybe EC region is required at bus_scan/acpi_get_devices. So it
642 * is necessary to enable it as early as possible.
643 */
644 acpi_boot_ec_enable();
645
646 printk(KERN_INFO PREFIX "Interpreter enabled\n");
647
648 /* Initialize sleep structures */
649 acpi_sleep_init();
650
651 /*
652 * Get the system interrupt model and evaluate \_PIC.
653 */
654 result = acpi_bus_init_irq();
655 if (result)
656 goto error1;
657
658 /*
659 * Register the for all standard device notifications.
660 */
661 status =
662 acpi_install_notify_handler(ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY,
663 &acpi_bus_notify, NULL);
664 if (ACPI_FAILURE(status)) {
665 printk(KERN_ERR PREFIX
666 "Unable to register for device notifications\n");
667 goto error1;
668 }
669
670 /*
671 * Create the top ACPI proc directory
672 */
673 acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL);
674
675 return 0;
676
677 /* Mimic structured exception handling */
678 error1:
679 acpi_terminate();
680 return -ENODEV;
681 }
682
683 struct kobject *acpi_kobj;
684 EXPORT_SYMBOL_GPL(acpi_kobj);
685
686 static int __init acpi_init(void)
687 {
688 int result;
689
690 if (acpi_disabled) {
691 printk(KERN_INFO PREFIX "Interpreter disabled.\n");
692 return -ENODEV;
693 }
694
695 acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
696 if (!acpi_kobj) {
697 printk(KERN_WARNING "%s: kset create error\n", __func__);
698 acpi_kobj = NULL;
699 }
700
701 init_acpi_device_notify();
702 result = acpi_bus_init();
703 if (result) {
704 disable_acpi();
705 return result;
706 }
707
708 pci_mmcfg_late_init();
709 acpi_scan_init();
710 acpi_ec_init();
711 acpi_debugfs_init();
712 acpi_sleep_proc_init();
713 acpi_wakeup_device_init();
714 return 0;
715 }
716
717 subsys_initcall(acpi_init);
This page took 0.060252 seconds and 5 git commands to generate.