1
0
Fork 0
Commit Graph

6 Commits (55167453111d3a1e600e29ba6c8e63906bb4821b)

Author SHA1 Message Date
Mattias Jacobsson 440c4983de platform/x86: wmi: add context argument to the probe function
The struct wmi_device_id has a context pointer field, forward this
pointer as an argument to the probe function in struct wmi_driver.

Update existing users of the same probe function to accept this new
context argument.

Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-06-17 15:22:47 +03:00
Mattias Jacobsson 7381460286 platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
WMI drivers can if they have specified an array of struct wmi_device_id
use the MODULE_DEVICE_TABLE() macro to automatically generate the
appropriate MODULE_ALIAS() output. Thus avoiding to keep both the array
of struct wmi_device_id and the MODULE_ALIAS() declaration(s) in sync.

Change driver to use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS().

Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2019-03-07 08:46:29 -08:00
Mario Limonciello 7eccb5edba platform/x86: intel-wmi-thunderbolt: Add dynamic debugging
Some users have been reporting issues with thunderbolt being turned off
before fully initialized. This is suspected to be caused by userspace
turning off the Thunderbolt controller using intel-wmi-thunderbolt
prematurely.

Userspace has already made some mitigations for this situation:
https://github.com/hughsie/fwupd/commit/ef6f1d76983c9b66
https://github.com/hughsie/fwupd/commit/c07ce5b4889a5384

To allow easier debugging of this situation add output that can be turned
on with dynamic debugging to better root cause this problem.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199631
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201227
Suggested-by: Mika Westerberg <mika.westerberg@intel.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2018-09-27 12:18:20 +03:00
Andy Shevchenko a8694eebae platform/x86: intel-wmi-thunderbolt: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

While here, correct MODULE_LICENSE() string to be aligned with license text.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-09-27 12:18:20 +03:00
Mario Limonciello 12933ea2b8 platform/x86: intel-wmi-thunderbolt: Silence error cases
These were raised by Lukas Wunner as potential DOS attacks against
the system log by passing bad data to sysfs.

Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-09-22 15:08:19 -07:00
Mario Limonciello ce6a90027c platform/x86: Add driver to force WMI Thunderbolt controller power status
Current implementations of Intel Thunderbolt controllers will go
into a low power mode when not in use.

Many machines containing these controllers also have a GPIO wired up
that can force the controller awake.  This is offered via a ACPI-WMI
interface intended to be manipulated by a userspace utility.

This mechanism is provided by Intel to OEMs to include in BIOS.
It uses an industry wide GUID that is populated in a separate _WDG
entry with no binary MOF.

This interface allows software such as fwupd to wake up thunderbolt
controllers to query the firmware version or flash new firmware.

Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
[andy fixed merge conflicts and bump kernel version for ABI]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-09-20 16:07:22 +03:00