aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel-smartconnect.c
Commit message (Collapse)AuthorAge
* ACPI: Clean up inclusions of ACPI header filesLv Zheng2013-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace direct inclusions of <acpi/acpi.h>, <acpi/acpi_bus.h> and <acpi/acpi_drivers.h>, which are incorrect, with <linux/acpi.h> inclusions and remove some inclusions of those files that aren't necessary. First of all, <acpi/acpi.h>, <acpi/acpi_bus.h> and <acpi/acpi_drivers.h> should not be included directly from any files that are built for CONFIG_ACPI unset, because that generally leads to build warnings about undefined symbols in !CONFIG_ACPI builds. For CONFIG_ACPI set, <linux/acpi.h> includes those files and for CONFIG_ACPI unset it provides stub ACPI symbols to be used in that case. Second, there are ordering dependencies between those files that always have to be met. Namely, it is required that <acpi/acpi_bus.h> be included prior to <acpi/acpi_drivers.h> so that the acpi_pci_root declarations the latter depends on are always there. And <acpi/acpi.h> which provides basic ACPICA type declarations should always be included prior to any other ACPI headers in CONFIG_ACPI builds. That also is taken care of including <linux/acpi.h> as appropriate. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Tony Luck <tony.luck@intel.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> (drivers/pci stuff) Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> (Xen stuff) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* intel-smartconnect: convert acpi_evaluate_object() to acpi_evaluate_integer()Zhang Rui2013-09-23
| | | | | | | | | | | | | | acpi_evaluate_integer() is an ACPI API introduced to evaluate an ACPI control method that is known to have an integer return value. This API can simplify the code because the calling function does not need to use the specified acpi_buffer structure required by acpi_evaluate_object(); Convert acpi_evaluate_object() to acpi_evaluate_integer() in drivers/platform/x86/intel-smartconnect.c in this patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* intel-smartconnect: convert acpi_evaluate_object() to ↵Zhang Rui2013-09-23
| | | | | | | | | | | | | | acpi_execute_simple_method() acpi_execute_simple_method() is a new ACPI API introduced to invoke an ACPI control method that has single integer parameter and no return value. Convert acpi_evaluate_object() to acpi_execute_simple_method() in drivers/platform/x86/intel-smartconnect.c Signed-off-by: Zhang Rui <rui.zhang@intel.com> CC: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* x86: smartconnect: use module_acpi_driver to simplify the codeWei Yongjun2013-09-05
| | | | | | | | module_acpi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
* Add trivial driver to disable Intel Smart ConnectMatthew Garrett2013-07-10
Intel Smart Connect is an Intel-specific ACPI interface for configuring devices to wake up at regular intervals so they can pull down mail or other internet updates, and then go to sleep again. If a user enables this in Windows and then reboots into Linux, the device may wake up if it's put to sleep. Since there's no Linux userland support for any of this, the machine will then remain awake until something else puts it back to sleep. I haven't figured out all that much about how this works (there's a bunch of different ACPI calls available on the device), but this seems to be enough to turn it off. We can add more features to this driver if anyone ever cares about figuring out what the rest of the calls do or writing some Linux userspace to implement the rest of it. Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>