Module Name: src
Committed By: thorpej
Date: Sun May 9 23:19:10 UTC 2021
Modified Files:
src/sys/dev/i2c [thorpej-i2c-spi-conf]: i2cmuxvar.h
Log Message:
Revert most of previous -- some consumers of this file still have
ACPI-specific requirements.
To generate a diff of this commit:
cvs rdiff -u -r1.3.4.2 -r1.3.4.3 src/sys/dev/i2c/i2cmuxvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/i2c/i2cmuxvar.h
diff -u src/sys/dev/i2c/i2cmuxvar.h:1.3.4.2 src/sys/dev/i2c/i2cmuxvar.h:1.3.4.3
--- src/sys/dev/i2c/i2cmuxvar.h:1.3.4.2 Sat May 8 15:10:44 2021
+++ src/sys/dev/i2c/i2cmuxvar.h Sun May 9 23:19:10 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: i2cmuxvar.h,v 1.3.4.2 2021/05/08 15:10:44 thorpej Exp $ */
+/* $NetBSD: i2cmuxvar.h,v 1.3.4.3 2021/05/09 23:19:10 thorpej Exp $ */
/*-
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -36,6 +36,23 @@
/* XXX This is not ideal, but... XXX */
+#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__)
+
+#ifdef _KERNEL_OPT
+#include "acpica.h"
+
+#if NACPICA > 0
+#define I2CMUX_USE_ACPI
+#endif
+
+#else /* ! _KERNEL_OPT */
+
+#define I2CMUX_USE_ACPI
+
+#endif /* _KERNEL_OPT */
+
+#endif /* __i386__ || __amd64__ || __aarch64__ */
+
#if defined(__arm__) || defined(__aarch64__)
#ifdef _KERNEL_OPT
@@ -55,6 +72,10 @@
/* XXX ^^^ XXX */
+#if defined(I2CMUX_USE_ACPI)
+#include <dev/acpi/acpivar.h>
+#endif
+
#if defined(I2CMUX_USE_FDT)
#include <dev/fdt/fdtvar.h>
#endif