Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149078102
D10531.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D10531.diff
View Options
Index: sys/conf/files
===================================================================
--- sys/conf/files
+++ sys/conf/files
@@ -673,6 +673,7 @@
dev/acpica/acpi_powerres.c optional acpi
dev/acpica/acpi_quirk.c optional acpi
dev/acpica/acpi_resource.c optional acpi
+dev/acpica/acpi_container.c optional acpi
dev/acpica/acpi_smbat.c optional acpi
dev/acpica/acpi_thermal.c optional acpi
dev/acpica/acpi_throttle.c optional acpi
Index: sys/dev/acpica/acpi_container.c
===================================================================
--- /dev/null
+++ sys/dev/acpica/acpi_container.c
@@ -0,0 +1,75 @@
+/*-
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/kernel.h>
+#include <sys/bus.h>
+#include <sys/module.h>
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <dev/acpica/acpivar.h>
+
+ACPI_MODULE_NAME("CONTAINER")
+
+static int
+acpi_syscon_probe(device_t dev)
+{
+ static char *syscon_ids[] = { "ACPI0004", "PNP0A05", "PNP0A06", NULL };
+
+ if (acpi_disabled("syscontainer") ||
+ ACPI_ID_PROBE(device_get_parent(dev), dev, syscon_ids) == NULL)
+ return (ENXIO);
+
+ device_set_desc(dev, "System Container");
+ device_quiet(dev);
+ return (BUS_PROBE_DEFAULT);
+}
+
+static int
+acpi_syscon_attach(device_t dev)
+{
+
+ /* Nothing is realy needed. */
+ return (0);
+}
+static device_method_t acpi_syscon_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, acpi_syscon_probe),
+ DEVMETHOD(device_attach, acpi_syscon_attach),
+
+ DEVMETHOD_END
+};
+
+static driver_t acpi_syscon_driver = {
+ "acpi_syscontainer",
+ acpi_syscon_methods,
+ 0,
+};
+
+static devclass_t acpi_syscon_devclass;
+DRIVER_MODULE(acpi_syscontainer, acpi, acpi_syscon_driver, acpi_syscon_devclass,
+ 0, 0);
+MODULE_DEPEND(acpi_syscontainer, acpi, 1, 1, 1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 23, 4:25 AM (2 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30159330
Default Alt Text
D10531.diff (3 KB)
Attached To
Mode
D10531: add acpi_container.c to handle ACPI0004, PNP0A05, and PNP0A06
Attached
Detach File
Event Timeline
Log In to Comment