2005-04-16 22:20:36 +00:00
|
|
|
/*
|
2013-03-03 22:05:55 +00:00
|
|
|
* container.c - ACPI Generic Container Driver
|
2005-04-16 22:20:36 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2004 Anil S Keshavamurthy (anil.s.keshavamurthy@intel.com)
|
|
|
|
* Copyright (C) 2004 Keiichiro Tokunaga (tokunaga.keiich@jp.fujitsu.com)
|
|
|
|
* Copyright (C) 2004 Motoyuki Ito (motoyuki@soft.fujitsu.com)
|
|
|
|
* Copyright (C) 2004 FUJITSU LIMITED
|
2013-03-03 22:05:55 +00:00
|
|
|
* Copyright (C) 2004, 2013 Intel Corp.
|
|
|
|
* Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
2005-04-16 22:20:36 +00:00
|
|
|
*
|
|
|
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
|
|
|
*
|
|
|
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
*/
|
|
|
|
#include <linux/acpi.h>
|
2013-03-03 22:05:55 +00:00
|
|
|
|
|
|
|
#include "internal.h"
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2013-03-11 09:17:07 +00:00
|
|
|
#include "internal.h"
|
|
|
|
|
2009-07-28 20:45:54 +00:00
|
|
|
#define PREFIX "ACPI: "
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
#define _COMPONENT ACPI_CONTAINER_COMPONENT
|
2007-02-13 03:42:12 +00:00
|
|
|
ACPI_MODULE_NAME("container");
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2007-07-23 12:44:41 +00:00
|
|
|
static const struct acpi_device_id container_device_ids[] = {
|
|
|
|
{"ACPI0004", 0},
|
|
|
|
{"PNP0A05", 0},
|
|
|
|
{"PNP0A06", 0},
|
|
|
|
{"", 0},
|
|
|
|
};
|
|
|
|
|
2013-02-08 22:52:39 +00:00
|
|
|
static int container_device_attach(struct acpi_device *device,
|
|
|
|
const struct acpi_device_id *not_used)
|
|
|
|
{
|
2013-03-03 22:05:55 +00:00
|
|
|
/* This is necessary for container hotplug to work. */
|
2013-02-08 22:52:39 +00:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2013-03-03 22:08:45 +00:00
|
|
|
static struct acpi_scan_handler container_handler = {
|
2007-07-23 12:44:41 +00:00
|
|
|
.ids = container_device_ids,
|
2013-02-08 22:52:39 +00:00
|
|
|
.attach = container_device_attach,
|
2013-03-03 22:05:55 +00:00
|
|
|
.hotplug = {
|
|
|
|
.enabled = true,
|
|
|
|
.mode = AHM_CONTAINER,
|
|
|
|
},
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
2013-02-08 22:52:39 +00:00
|
|
|
void __init acpi_container_init(void)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2013-03-03 22:08:45 +00:00
|
|
|
acpi_scan_add_handler_with_hotplug(&container_handler, "container");
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|