2020-10-09 18:41:47

by Maximilian Luz

[permalink] [raw]
Subject: [PATCH v4 0/5] platform/surface: Create a platform subdirectory for Microsoft Surface devices

As has come up in the discussion around

[RFC PATCH] Add support for Microsoft Surface System Aggregator Module

it may make sense to add a Microsoft Surface specific platform
subdirectory. Andy has suggested drivers/platform/surface for that.
This series follows said suggestion and creates that subdirectory, as
well as moves Microsoft Surface related drivers over to it and updates
their MAINTAINERS entries (if available) accordingly.

This series does not modify any existing driver code, symbols, or help
text.

More details regarding maintainership can be found in

[PATCH v4 1/5] platform: Add Surface platform directory

Thanks,
Max

Link to discussion:
https://lore.kernel.org/lkml/CAHp75Vfp86h38Rd-VEgER7ASADdmz5ymAkuHvD0Q6WPDqZBqHw@mail.gmail.com/

Cc: Hans de Goede <[email protected]>
Cc: Andy Shevchenko <[email protected]>

Changes in v2:
- Rebase onto linux-platform-drivers-x86/for-next to incorporate
changes in Maintainer file.

Changes in v3:
- Add separate MAINTAINERS entry for platform/surface
- Add Maximilian Luz as reviewer for platform/surface

Changes in v4:
- Rebase onto platform-drivers-x86/for-next.
- Restructure MAINTAINERS entry and Kconfig option to be more similar
to platform/chrome.
- Drop placeholder comments.

For more details regarding changes, refer to the individual patches.

P.S: for Andy:
I have not added your Rb tag for 1 and 2 as I was not completely sure
that the changes are as you intended.

Maximilian Luz (5):
platform: Add Surface platform directory
platform/surface: Move Surface 3 WMI driver to platform/surface
platform/surface: Move Surface 3 Button driver to platform/surface
platform/surface: Move Surface 3 Power OpRegion driver to
platform/surface
platform/surface: Move Surface Pro 3 Button driver to platform/surface

MAINTAINERS | 11 ++++-
drivers/platform/Kconfig | 2 +
drivers/platform/Makefile | 1 +
drivers/platform/surface/Kconfig | 49 +++++++++++++++++++
drivers/platform/surface/Makefile | 10 ++++
.../platform/{x86 => surface}/surface3-wmi.c | 0
.../{x86 => surface}/surface3_button.c | 0
.../{x86 => surface}/surface3_power.c | 0
.../{x86 => surface}/surfacepro3_button.c | 0
drivers/platform/x86/Kconfig | 31 ------------
drivers/platform/x86/Makefile | 6 ---
11 files changed, 72 insertions(+), 38 deletions(-)
create mode 100644 drivers/platform/surface/Kconfig
create mode 100644 drivers/platform/surface/Makefile
rename drivers/platform/{x86 => surface}/surface3-wmi.c (100%)
rename drivers/platform/{x86 => surface}/surface3_button.c (100%)
rename drivers/platform/{x86 => surface}/surface3_power.c (100%)
rename drivers/platform/{x86 => surface}/surfacepro3_button.c (100%)

--
2.28.0


2020-10-09 19:44:09

by Maximilian Luz

[permalink] [raw]
Subject: [PATCH v4 2/5] platform/surface: Move Surface 3 WMI driver to platform/surface

Move the Surface 3 WMI driver from platform/x86 to the newly created
platform/surface directory.

Signed-off-by: Maximilian Luz <[email protected]>
---
drivers/platform/surface/Kconfig | 16 ++++++++++++++++
drivers/platform/surface/Makefile | 2 ++
drivers/platform/{x86 => surface}/surface3-wmi.c | 0
drivers/platform/x86/Kconfig | 12 ------------
drivers/platform/x86/Makefile | 1 -
5 files changed, 18 insertions(+), 13 deletions(-)
rename drivers/platform/{x86 => surface}/surface3-wmi.c (100%)

diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig
index b67926ece95f..326f7bbf83d7 100644
--- a/drivers/platform/surface/Kconfig
+++ b/drivers/platform/surface/Kconfig
@@ -12,3 +12,19 @@ menuconfig SURFACE_PLATFORMS
kernel code.

If you say N, all options in this submenu will be skipped and disabled.
+
+if SURFACE_PLATFORMS
+
+config SURFACE3_WMI
+ tristate "Surface 3 WMI Driver"
+ depends on ACPI_WMI
+ depends on DMI
+ depends on INPUT
+ depends on SPI
+ help
+ Say Y here if you have a Surface 3.
+
+ To compile this driver as a module, choose M here: the module will
+ be called surface3-wmi.
+
+endif # SURFACE_PLATFORMS
diff --git a/drivers/platform/surface/Makefile b/drivers/platform/surface/Makefile
index 3700f9e84299..f889d521420f 100644
--- a/drivers/platform/surface/Makefile
+++ b/drivers/platform/surface/Makefile
@@ -3,3 +3,5 @@
# Makefile for linux/drivers/platform/surface
# Microsoft Surface Platform-Specific Drivers
#
+
+obj-$(CONFIG_SURFACE3_WMI) += surface3-wmi.o
diff --git a/drivers/platform/x86/surface3-wmi.c b/drivers/platform/surface/surface3-wmi.c
similarity index 100%
rename from drivers/platform/x86/surface3-wmi.c
rename to drivers/platform/surface/surface3-wmi.c
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 0d91d136bc3b..0759913c9846 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -870,18 +870,6 @@ config INTEL_VBTN
To compile this driver as a module, choose M here: the module will
be called intel_vbtn.

-config SURFACE3_WMI
- tristate "Surface 3 WMI Driver"
- depends on ACPI_WMI
- depends on DMI
- depends on INPUT
- depends on SPI
- help
- Say Y here if you have a Surface 3.
-
- To compile this driver as a module, choose M here: the module will
- be called surface3-wmi.
-
config SURFACE_3_BUTTON
tristate "Power/home/volume buttons driver for Microsoft Surface 3 tablet"
depends on ACPI && KEYBOARD_GPIO && I2C
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 5f823f7eff45..29563a32b3e3 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -82,7 +82,6 @@ obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o
obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o

# Microsoft
-obj-$(CONFIG_SURFACE3_WMI) += surface3-wmi.o
obj-$(CONFIG_SURFACE_3_BUTTON) += surface3_button.o
obj-$(CONFIG_SURFACE_3_POWER_OPREGION) += surface3_power.o
obj-$(CONFIG_SURFACE_PRO3_BUTTON) += surfacepro3_button.o
--
2.28.0

2020-10-27 14:43:06

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH v4 0/5] platform/surface: Create a platform subdirectory for Microsoft Surface devices

Hi,

On 10/9/20 4:11 PM, Maximilian Luz wrote:
> As has come up in the discussion around
>
> [RFC PATCH] Add support for Microsoft Surface System Aggregator Module
>
> it may make sense to add a Microsoft Surface specific platform
> subdirectory. Andy has suggested drivers/platform/surface for that.
> This series follows said suggestion and creates that subdirectory, as
> well as moves Microsoft Surface related drivers over to it and updates
> their MAINTAINERS entries (if available) accordingly.
>
> This series does not modify any existing driver code, symbols, or help
> text.

Thank you for your patch-series, I've applied the series to my
review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up there once I've pushed my local branch there,
which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans