From d4fc91adfde11c41295d1cf001bdbec5d6879016 Mon Sep 17 00:00:00 2001 From: Andy Lutomirski Date: Wed, 25 Nov 2015 14:03:43 -0800 Subject: platform/x86: wmi: Probe data objects for read and write capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Dell XPS 13 9350 has one RW data object, one RO data object, and one totally inaccessible data object. Check for the existence of the accessor methods and report in sysfs. The docs also permit WQxx getters for single-instance objects to take no parameters. Probe for that as well to avoid ACPICA warnings about mismatched signatures. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) --- include/linux/wmi.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/linux/wmi.h b/include/linux/wmi.h index 29ed34b4dae1..53095006821e 100644 --- a/include/linux/wmi.h +++ b/include/linux/wmi.h @@ -21,6 +21,12 @@ struct wmi_device { struct device dev; + + /* + * These are true for data objects that support reads and writes, + * respectively. + */ + bool readable, writeable; }; struct wmi_device_id { -- cgit v1.2.3-59-g8ed1b