diff mbox series

[v3,1/5] platform: Add Surface platform directory

Message ID 20201008143455.340599-2-luzmaximilian@gmail.com (mailing list archive)
State Superseded, archived
Headers show
Series platform/surface: Create a platform subdirectory for Microsoft Surface devices | expand

Commit Message

Maximilian Luz Oct. 8, 2020, 2:34 p.m. UTC
It may make sense to split the Microsoft Surface hardware platform
drivers out to a separate subdirectory, since some of it may be shared
between ARM and x86 in the future (regarding devices like the Surface
Pro X).

Further, newer Surface devices will require additional platform drivers
for fundamental support (mostly regarding their embedded controller),
which may also warrant this split from a size perspective.

This commit introduces a new platform/surface subdirectory for the
Surface device family, with subsequent commits moving existing Surface
drivers over from platform/x86.

A new MAINTAINERS entry is added for this directory. Patches to files in
this directory will be taken up by the platform-drivers-x86 team (i.e.
Hans de Goede and Mark Gross) after they have been reviewed by
Maximilian Luz.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
---

Changes in v2:
 - Do not create a separate MAINTAINERS entry for platform/surface.
   Instead add drivers/platform/surface to x86 platform drivers entry.
   This incorporates recent changes in the x86 platform driver
   MAINTAINERS entry.
 - Fix typo in commit message.

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

---
 MAINTAINERS                       |  9 +++++++++
 drivers/platform/Kconfig          |  2 ++
 drivers/platform/Makefile         |  1 +
 drivers/platform/surface/Kconfig  | 20 ++++++++++++++++++++
 drivers/platform/surface/Makefile |  7 +++++++
 5 files changed, 39 insertions(+)
 create mode 100644 drivers/platform/surface/Kconfig
 create mode 100644 drivers/platform/surface/Makefile

Comments

Andy Shevchenko Oct. 8, 2020, 2:52 p.m. UTC | #1
On Thu, Oct 8, 2020 at 5:35 PM Maximilian Luz <luzmaximilian@gmail.com> wrote:
>
> It may make sense to split the Microsoft Surface hardware platform
> drivers out to a separate subdirectory, since some of it may be shared
> between ARM and x86 in the future (regarding devices like the Surface
> Pro X).
>
> Further, newer Surface devices will require additional platform drivers
> for fundamental support (mostly regarding their embedded controller),
> which may also warrant this split from a size perspective.
>
> This commit introduces a new platform/surface subdirectory for the
> Surface device family, with subsequent commits moving existing Surface
> drivers over from platform/x86.
>
> A new MAINTAINERS entry is added for this directory. Patches to files in
> this directory will be taken up by the platform-drivers-x86 team (i.e.
> Hans de Goede and Mark Gross) after they have been reviewed by
> Maximilian Luz.

Thanks for the patch, my minor comments below.

...

> +MICROSOFT SURFACE PLATFORM DRIVERS

(1)

> +M:     Hans de Goede <hdegoede@redhat.com>
> +M:     Mark Gross <mgross@linux.intel.com>
> +M:     Maximilian Luz <luzmaximilian@gmail.com>
> +L:     platform-driver-x86@vger.kernel.org
> +S:     Maintained

> +T:     git git://git.infradead.org/linux-platform-drivers-x86.git

It's now on kernel.org.
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git

> +F:     drivers/platform/surface/

> @@ -9,3 +9,4 @@ obj-$(CONFIG_MIPS)              += mips/
>  obj-$(CONFIG_OLPC_EC)          += olpc/
>  obj-$(CONFIG_GOLDFISH)         += goldfish/
>  obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
> +obj-$(CONFIG_SURFACE_PLATFORM) += surface/

(2)

> +menuconfig SURFACE_PLATFORM

(3a)

> +if SURFACE_PLATFORM

(3b)

> +endif # SURFACE_PLATFORM

(3c)

I think in (1), (2) and (3) it makes sense to mimic Chrome, i.e. use
plural: PLATFORMS.
Maximilian Luz Oct. 8, 2020, 3:18 p.m. UTC | #2
On 10/8/20 4:52 PM, Andy Shevchenko wrote:
> On Thu, Oct 8, 2020 at 5:35 PM Maximilian Luz <luzmaximilian@gmail.com> wrote:
>>
>> It may make sense to split the Microsoft Surface hardware platform
>> drivers out to a separate subdirectory, since some of it may be shared
>> between ARM and x86 in the future (regarding devices like the Surface
>> Pro X).
>>
>> Further, newer Surface devices will require additional platform drivers
>> for fundamental support (mostly regarding their embedded controller),
>> which may also warrant this split from a size perspective.
>>
>> This commit introduces a new platform/surface subdirectory for the
>> Surface device family, with subsequent commits moving existing Surface
>> drivers over from platform/x86.
>>
>> A new MAINTAINERS entry is added for this directory. Patches to files in
>> this directory will be taken up by the platform-drivers-x86 team (i.e.
>> Hans de Goede and Mark Gross) after they have been reviewed by
>> Maximilian Luz.
> 
> Thanks for the patch, my minor comments below.
> 
> ...
> 
>> +MICROSOFT SURFACE PLATFORM DRIVERS
> 
> (1)
> 
>> +M:     Hans de Goede <hdegoede@redhat.com>
>> +M:     Mark Gross <mgross@linux.intel.com>
>> +M:     Maximilian Luz <luzmaximilian@gmail.com>
>> +L:     platform-driver-x86@vger.kernel.org
>> +S:     Maintained
> 
>> +T:     git git://git.infradead.org/linux-platform-drivers-x86.git
> 
> It's now on kernel.org.
> git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git

Thank you, will update this. FYI: The entry was mostly copied from the
X86 PLATFORM DRIVERS entry, so it should probably be updated there, too.

>> +F:     drivers/platform/surface/
> 
>> @@ -9,3 +9,4 @@ obj-$(CONFIG_MIPS)              += mips/
>>   obj-$(CONFIG_OLPC_EC)          += olpc/
>>   obj-$(CONFIG_GOLDFISH)         += goldfish/
>>   obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
>> +obj-$(CONFIG_SURFACE_PLATFORM) += surface/
> 
> (2)
> 
>> +menuconfig SURFACE_PLATFORM
> 
> (3a)
> 
>> +if SURFACE_PLATFORM
> 
> (3b)
> 
>> +endif # SURFACE_PLATFORM
> 
> (3c)
> 
> I think in (1), (2) and (3) it makes sense to mimic Chrome, i.e. use
> plural: PLATFORMS.

I agree with (2) and (3), but I'm not so sure about (1). For Chrome, the
entry is CHROME HARDWARE PLATFORM SUPPORT, so should I change it to
MICROSOFT SURFACE HARDWARE PLATFORM SUPPORT?

Thanks,
Max
Hans de Goede Oct. 8, 2020, 7:43 p.m. UTC | #3
Hi,

On 10/8/20 5:18 PM, Maximilian Luz wrote:
> On 10/8/20 4:52 PM, Andy Shevchenko wrote:
>> On Thu, Oct 8, 2020 at 5:35 PM Maximilian Luz <luzmaximilian@gmail.com> wrote:
>>>
>>> It may make sense to split the Microsoft Surface hardware platform
>>> drivers out to a separate subdirectory, since some of it may be shared
>>> between ARM and x86 in the future (regarding devices like the Surface
>>> Pro X).
>>>
>>> Further, newer Surface devices will require additional platform drivers
>>> for fundamental support (mostly regarding their embedded controller),
>>> which may also warrant this split from a size perspective.
>>>
>>> This commit introduces a new platform/surface subdirectory for the
>>> Surface device family, with subsequent commits moving existing Surface
>>> drivers over from platform/x86.
>>>
>>> A new MAINTAINERS entry is added for this directory. Patches to files in
>>> this directory will be taken up by the platform-drivers-x86 team (i.e.
>>> Hans de Goede and Mark Gross) after they have been reviewed by
>>> Maximilian Luz.
>>
>> Thanks for the patch, my minor comments below.
>>
>> ...
>>
>>> +MICROSOFT SURFACE PLATFORM DRIVERS
>>
>> (1)
>>
>>> +M:     Hans de Goede <hdegoede@redhat.com>
>>> +M:     Mark Gross <mgross@linux.intel.com>
>>> +M:     Maximilian Luz <luzmaximilian@gmail.com>
>>> +L:     platform-driver-x86@vger.kernel.org
>>> +S:     Maintained
>>
>>> +T:     git git://git.infradead.org/linux-platform-drivers-x86.git
>>
>> It's now on kernel.org.
>> git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
> 
> Thank you, will update this. FYI: The entry was mostly copied from the
> X86 PLATFORM DRIVERS entry, so it should probably be updated there, too.

That is a good point I've pushed a commit fixing this to the for-next
branch of: git://git.infradead.org/linux-platform-drivers-x86.git

Please base the next version of this patch-set on top of that.

Regards,

Hans



> 
>>> +F:     drivers/platform/surface/
>>
>>> @@ -9,3 +9,4 @@ obj-$(CONFIG_MIPS)              += mips/
>>>   obj-$(CONFIG_OLPC_EC)          += olpc/
>>>   obj-$(CONFIG_GOLDFISH)         += goldfish/
>>>   obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
>>> +obj-$(CONFIG_SURFACE_PLATFORM) += surface/
>>
>> (2)
>>
>>> +menuconfig SURFACE_PLATFORM
>>
>> (3a)
>>
>>> +if SURFACE_PLATFORM
>>
>> (3b)
>>
>>> +endif # SURFACE_PLATFORM
>>
>> (3c)
>>
>> I think in (1), (2) and (3) it makes sense to mimic Chrome, i.e. use
>> plural: PLATFORMS.
> 
> I agree with (2) and (3), but I'm not so sure about (1). For Chrome, the
> entry is CHROME HARDWARE PLATFORM SUPPORT, so should I change it to
> MICROSOFT SURFACE HARDWARE PLATFORM SUPPORT?
> 
> Thanks,
> Max
>
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index b1c97a16b6ce..1c5be5875769 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11532,6 +11532,15 @@  F:	drivers/scsi/smartpqi/smartpqi*.[ch]
 F:	include/linux/cciss*.h
 F:	include/uapi/linux/cciss*.h
 
+MICROSOFT SURFACE PLATFORM DRIVERS
+M:	Hans de Goede <hdegoede@redhat.com>
+M:	Mark Gross <mgross@linux.intel.com>
+M:	Maximilian Luz <luzmaximilian@gmail.com>
+L:	platform-driver-x86@vger.kernel.org
+S:	Maintained
+T:	git git://git.infradead.org/linux-platform-drivers-x86.git
+F:	drivers/platform/surface/
+
 MICROSOFT SURFACE PRO 3 BUTTON DRIVER
 M:	Chen Yu <yu.c.chen@intel.com>
 L:	platform-driver-x86@vger.kernel.org
diff --git a/drivers/platform/Kconfig b/drivers/platform/Kconfig
index 971426bb4302..18fc6a08569e 100644
--- a/drivers/platform/Kconfig
+++ b/drivers/platform/Kconfig
@@ -13,3 +13,5 @@  source "drivers/platform/chrome/Kconfig"
 source "drivers/platform/mellanox/Kconfig"
 
 source "drivers/platform/olpc/Kconfig"
+
+source "drivers/platform/surface/Kconfig"
diff --git a/drivers/platform/Makefile b/drivers/platform/Makefile
index 6fda58c021ca..af62d93f0e46 100644
--- a/drivers/platform/Makefile
+++ b/drivers/platform/Makefile
@@ -9,3 +9,4 @@  obj-$(CONFIG_MIPS)		+= mips/
 obj-$(CONFIG_OLPC_EC)		+= olpc/
 obj-$(CONFIG_GOLDFISH)		+= goldfish/
 obj-$(CONFIG_CHROME_PLATFORMS)	+= chrome/
+obj-$(CONFIG_SURFACE_PLATFORM)	+= surface/
diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig
new file mode 100644
index 000000000000..806b088ddae2
--- /dev/null
+++ b/drivers/platform/surface/Kconfig
@@ -0,0 +1,20 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Microsoft Surface Platform-Specific Drivers
+#
+
+menuconfig SURFACE_PLATFORM
+	bool "Microsoft Surface Platform-Specific Device Drivers"
+	default y
+	help
+	  Say Y here to get to see options for platform-specific device drivers
+	  for Microsoft Surface devices. This option alone does not add any
+	  kernel code.
+
+	  If you say N, all options in this submenu will be skipped and disabled.
+
+if SURFACE_PLATFORM
+
+# place Microsoft Surface platform drivers here
+
+endif # SURFACE_PLATFORM
diff --git a/drivers/platform/surface/Makefile b/drivers/platform/surface/Makefile
new file mode 100644
index 000000000000..11788a44713f
--- /dev/null
+++ b/drivers/platform/surface/Makefile
@@ -0,0 +1,7 @@ 
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for linux/drivers/platform/surface
+# Microsoft Surface Platform-Specific Drivers
+#
+
+# place Microsoft Surface platform drivers here