0001
0002
0003
0004
0005
0006 #include <linux/acpi.h>
0007 #include <linux/module.h>
0008
0009 MODULE_LICENSE("GPL");
0010
0011 static int smartconnect_acpi_init(struct acpi_device *acpi)
0012 {
0013 unsigned long long value;
0014 acpi_status status;
0015
0016 status = acpi_evaluate_integer(acpi->handle, "GAOS", NULL, &value);
0017 if (ACPI_FAILURE(status))
0018 return -EINVAL;
0019
0020 if (value & 0x1) {
0021 dev_info(&acpi->dev, "Disabling Intel Smart Connect\n");
0022 status = acpi_execute_simple_method(acpi->handle, "SAOS", 0);
0023 }
0024
0025 return 0;
0026 }
0027
0028 static const struct acpi_device_id smartconnect_ids[] = {
0029 {"INT33A0", 0},
0030 {"", 0}
0031 };
0032 MODULE_DEVICE_TABLE(acpi, smartconnect_ids);
0033
0034 static struct acpi_driver smartconnect_driver = {
0035 .owner = THIS_MODULE,
0036 .name = "intel_smart_connect",
0037 .class = "intel_smart_connect",
0038 .ids = smartconnect_ids,
0039 .ops = {
0040 .add = smartconnect_acpi_init,
0041 },
0042 };
0043
0044 module_acpi_driver(smartconnect_driver);