@@ -5,4 +5,28 @@
void __init acpi_device_quirks(void);
+/* Check of resource interference between native drivers and ACPI
+ * OperationRegions (SystemIO and System Memory only).
+ * IO ports and memory declared in ACPI might be used by the ACPI subsystem
+ * in arbitrary AML code and can interfere with legacy drivers.
+ * acpi_enforce_resources= can be set to:
+ *
+ * - strict (2)
+ * -> further driver trying to access the resources will not load
+ * - lax (default) (1)
+ * -> further driver trying to access the resources will load, but you
+ * get a system message that something might go wrong...
+ *
+ * - no (0)
+ * -> ACPI Operation Region resources will not be registered
+ *
+ */
+#define ENFORCE_RESOURCES_AUTO 3
+#define ENFORCE_RESOURCES_STRICT 2
+#define ENFORCE_RESOURCES_LAX 1
+#define ENFORCE_RESOURCES_NO 0
+
+extern unsigned int acpi_enforce_resources;
+
+
#endif /* _LINUX_LOCAL_ACPI_H */
@@ -50,6 +50,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi_bus.h>
#include <acpi/processor.h>
+#include "acpi.h"
#define _COMPONENT ACPI_OS_SERVICES
ACPI_MODULE_NAME("osl");
@@ -1057,27 +1058,7 @@ static int __init acpi_wake_gpes_always_on_setup(char *str)
__setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
-/* Check of resource interference between native drivers and ACPI
- * OperationRegions (SystemIO and System Memory only).
- * IO ports and memory declared in ACPI might be used by the ACPI subsystem
- * in arbitrary AML code and can interfere with legacy drivers.
- * acpi_enforce_resources= can be set to:
- *
- * - strict (2)
- * -> further driver trying to access the resources will not load
- * - lax (default) (1)
- * -> further driver trying to access the resources will load, but you
- * get a system message that something might go wrong...
- *
- * - no (0)
- * -> ACPI Operation Region resources will not be registered
- *
- */
-#define ENFORCE_RESOURCES_STRICT 2
-#define ENFORCE_RESOURCES_LAX 1
-#define ENFORCE_RESOURCES_NO 0
-
-static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_LAX;
+unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_AUTO;
static int __init acpi_enforce_resources_setup(char *str)
{
@@ -30,6 +30,20 @@ struct acpi_device_fixup {
};
/*
+ * ATK0110 is known to interfere with several hwmon drivers, as it also
+ * reads temperture, fan, etc. on the same device hwmon drivers do.
+ * Make sure possibly interfering hwmon/i2c/smbus drivers touching IO areas
+ * which already got declared as ACPI Operation Regions cannot be loaded.
+ */
+int __init atk0110_interfere_fixups (struct acpi_device *dev) {
+
+ printk ("Found device: %s\n", acpi_device_bid(dev));
+ if (acpi_enforce_resources == ENFORCE_RESOURCES_AUTO)
+ acpi_enforce_resources = ENFORCE_RESOURCES_STRICT;
+ return 0;
+}
+
+/*
* Add a callback here if your module needs to process code after the ACPI
* core has parsed the DSDT and initialized all devices, but the code must
* be processed before module load time.
@@ -37,6 +51,7 @@ struct acpi_device_fixup {
* before the driver is loaded.
*/
const struct acpi_device_fixup __initdata fixup_table[] = {
+ { "ATK0110", atk0110_interfere_fixups },
};
static acpi_status __init