Skip to content

platform/x86: wmi: add WMI support to

Mattias Jacobsson lkml platform-driver-x86 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 1 replyIn review
  2. v33 patches 7 repliesSuperseded
  3. v23 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches5 repliesSuperseded

Changes in v4 from the cover letter

* formatting(declare/assignment, line-breaks) according to comments
* split "PATCH 3/3" into one patch per driver according to comments
* depend upon patch [3] (macro ALIAS_SIZE)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8platform/x86: wmi: move struct wmi_device_id to mod_devicetable.hdrivers/platform/x86/wmi.c include/linux/mod_devicetable.h include/linux/wmi.h+14 -50 replies
2/8platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()scripts/mod/devicetable-offsets.c scripts/mod/file2alias.c+26 -00 replies
3/8platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()drivers/platform/x86/dell-smbios-wmi.c+1 -10 replies
4/8platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()drivers/platform/x86/dell-wmi-descriptor.c+1 -10 replies
5/8platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()drivers/platform/x86/dell-wmi.c+2 -20 replies
6/8platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()drivers/platform/x86/huawei-wmi.c+1 -20 replies
7/8platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()drivers/platform/x86/intel-wmi-thunderbolt.c+1 -10 replies
8/8platform/x86: wmi-bmof: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()drivers/platform/x86/wmi-bmof.c+1 -10 replies

Reviews trailers per patch

3 of 8 patches have a Reviewed-by or Acked-by.

PatchMario Limonciello
1/8
2/8
3/8R-b
4/8R-b
5/8R-b
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/8] platform/x86: wmi: add WMI support to

The kernel provides the macro MODULE_DEVICE_TABLE() which can help driver authors to generate the appropriate MODULE_ALIAS() output. The WMI device type is currently not supported by MODULE_DEVICE_TABLE().

While using MODULE_DEVICE_TABLE() does increase the complexity as well as spreading out the implementation across the kernel, it does come with some benefits too;
* It makes different drivers look more similar; if you can specify the array of device_ids any device type specific input to MODULE_ALIAS() will automatically be generated for you.
* It helps each driver avoid keeping multiple versions of the same information in sync. That is, both the array of device_ids and the potential multitude of MODULE_ALIAS()'s.
* Other things eg. [2]

This patchset adds WMI support to MODULE_DEVICE_TABLE().

[PATCH 1/3]: prepare struct wmi_device_id
[PATCH 2/3]: add support
[PATCH 3+/3]: update existing drivers to use MODULE_DEVICE_TABLE()

Changes in v4:
* formatting(declare/assignment, line-breaks) according to comments
* split "PATCH 3/3" into one patch per driver according to comments
* depend upon patch [3] (macro ALIAS_SIZE)

Changes in v3:
* use UUID_STRING_LEN instead of self-defined
* change loop condition in wmi_dev_match() according to comments
* change the usage of snprintf return code in do_wmi_entry()

Changes in v2:
* add one Suggested-by and one Reviewed-by tag
* depend upon patch [1]
* reword commit message for [PATCH 2/3] and [PATCH 3/3] to document the reasoning behind the changes

[1]: https://lkml.kernel.org/r/[email protected]
[2]: https://lkml.kernel.org/r/20190126210634.GB13882@wrath
[3]: https://lore.kernel.org/lkml/[email protected]/

Mattias Jacobsson (8):
platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE() platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of
MODULE_ALIAS()
platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead
of MODULE_ALIAS()
platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of
MODULE_ALIAS()
platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of
MODULE_ALIAS()
platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead
of MODULE_ALIAS()
platform/x86: wmi-bmof: use MODULE_DEVICE_TABLE() instead of
MODULE_ALIAS()

 drivers/platform/x86/dell-smbios-wmi.c       |  2 +-
 drivers/platform/x86/dell-wmi-descriptor.c   |  2 +-
 drivers/platform/x86/dell-wmi.c              |  4 ++--
 drivers/platform/x86/huawei-wmi.c            |  3 +--
 drivers/platform/x86/intel-wmi-thunderbolt.c |  2 +-
 drivers/platform/x86/wmi-bmof.c              |  2 +-
 drivers/platform/x86/wmi.c                   |  2 +-
 include/linux/mod_devicetable.h              | 12 ++++++++++
 include/linux/wmi.h                          |  5 +----
 scripts/mod/devicetable-offsets.c            |  3 +++
 scripts/mod/file2alias.c                     | 23 ++++++++++++++++++++
 11 files changed, 47 insertions(+), 13 deletions(-)
Signature · 1 line
2.20.1