platform/x86: wmi: Probe data objects for read and write capabilities

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 <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Mario Limonciello <mario_limonciello@dell.com>
Cc: Pali Rohár <pali.rohar@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-acpi@vger.kernel.org
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
This commit is contained in:
Andy Lutomirski 2015-11-25 14:03:43 -08:00 committed by Darren Hart (VMware)
parent d79b107402
commit d4fc91adfd
2 changed files with 103 additions and 4 deletions

View file

@ -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 {