platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/surface: aggregator_registry: Add initial support for Surface Pro 8
@ 2021-10-28  1:28 Maximilian Luz
  2021-10-28  7:58 ` Hans de Goede
  2021-10-28  9:35 ` Hans de Goede
  0 siblings, 2 replies; 4+ messages in thread
From: Maximilian Luz @ 2021-10-28  1:28 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: Maximilian Luz, Hans de Goede, Mark Gross, linux-kernel

Add preliminary support for the Surface Pro 8 to the Surface Aggregator
registry. This includes battery/charger status and platform profile
support.

In contrast to earlier Surface Pro generations, the keyboard cover is
now also connected via the Surface Aggregator Module (whereas it was
previously connected via USB or HID-over-I2C). To properly support the
HID devices of that cover, however, more changes regarding hot-removal
of Surface Aggregator client devices as well as a new device hub driver
are required. We will address those things in a follow-up series, so do
not add any HID device IDs just yet.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
---
 .../platform/surface/surface_aggregator_registry.c   | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
index 2e0d3a808d47..ce2bd88feeaa 100644
--- a/drivers/platform/surface/surface_aggregator_registry.c
+++ b/drivers/platform/surface/surface_aggregator_registry.c
@@ -228,6 +228,15 @@ static const struct software_node *ssam_node_group_sp7[] = {
 	NULL,
 };
 
+static const struct software_node *ssam_node_group_sp8[] = {
+	&ssam_node_root,
+	&ssam_node_bat_ac,
+	&ssam_node_bat_main,
+	&ssam_node_tmp_pprof,
+	/* TODO: Add support for keyboard cover. */
+	NULL,
+};
+
 
 /* -- Device registry helper functions. ------------------------------------- */
 
@@ -520,6 +529,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
 	/* Surface Pro 7+ */
 	{ "MSHW0119", (unsigned long)ssam_node_group_sp7 },
 
+	/* Surface Pro 8 */
+	{ "MSHW0263", (unsigned long)ssam_node_group_sp8 },
+
 	/* Surface Book 2 */
 	{ "MSHW0107", (unsigned long)ssam_node_group_gen5 },
 
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform/surface: aggregator_registry: Add initial support for Surface Pro 8
  2021-10-28  1:28 [PATCH] platform/surface: aggregator_registry: Add initial support for Surface Pro 8 Maximilian Luz
@ 2021-10-28  7:58 ` Hans de Goede
  2021-10-28  8:52   ` Maximilian Luz
  2021-10-28  9:35 ` Hans de Goede
  1 sibling, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2021-10-28  7:58 UTC (permalink / raw)
  To: Maximilian Luz, platform-driver-x86; +Cc: Mark Gross, linux-kernel

Hi Maximilian,

On 10/28/21 03:28, Maximilian Luz wrote:
> Add preliminary support for the Surface Pro 8 to the Surface Aggregator
> registry. This includes battery/charger status and platform profile
> support.
> 
> In contrast to earlier Surface Pro generations, the keyboard cover is
> now also connected via the Surface Aggregator Module (whereas it was
> previously connected via USB or HID-over-I2C). To properly support the
> HID devices of that cover, however, more changes regarding hot-removal
> of Surface Aggregator client devices as well as a new device hub driver
> are required. We will address those things in a follow-up series, so do
> not add any HID device IDs just yet.
> 
> Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>

Since it is just device-id additions I can still pick this up for
5.16 if you want / if this is useful.

Do you want me to pick this up for 5.16 ? 

Regards,

Hans



> ---
>  .../platform/surface/surface_aggregator_registry.c   | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
> index 2e0d3a808d47..ce2bd88feeaa 100644
> --- a/drivers/platform/surface/surface_aggregator_registry.c
> +++ b/drivers/platform/surface/surface_aggregator_registry.c
> @@ -228,6 +228,15 @@ static const struct software_node *ssam_node_group_sp7[] = {
>  	NULL,
>  };
>  
> +static const struct software_node *ssam_node_group_sp8[] = {
> +	&ssam_node_root,
> +	&ssam_node_bat_ac,
> +	&ssam_node_bat_main,
> +	&ssam_node_tmp_pprof,
> +	/* TODO: Add support for keyboard cover. */
> +	NULL,
> +};
> +
>  
>  /* -- Device registry helper functions. ------------------------------------- */
>  
> @@ -520,6 +529,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
>  	/* Surface Pro 7+ */
>  	{ "MSHW0119", (unsigned long)ssam_node_group_sp7 },
>  
> +	/* Surface Pro 8 */
> +	{ "MSHW0263", (unsigned long)ssam_node_group_sp8 },
> +
>  	/* Surface Book 2 */
>  	{ "MSHW0107", (unsigned long)ssam_node_group_gen5 },
>  
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform/surface: aggregator_registry: Add initial support for Surface Pro 8
  2021-10-28  7:58 ` Hans de Goede
@ 2021-10-28  8:52   ` Maximilian Luz
  0 siblings, 0 replies; 4+ messages in thread
From: Maximilian Luz @ 2021-10-28  8:52 UTC (permalink / raw)
  To: Hans de Goede, platform-driver-x86; +Cc: Mark Gross, linux-kernel



On 10/28/21 09:58, Hans de Goede wrote:
> Hi Maximilian,
> 
> On 10/28/21 03:28, Maximilian Luz wrote:
>> Add preliminary support for the Surface Pro 8 to the Surface Aggregator
>> registry. This includes battery/charger status and platform profile
>> support.
>>
>> In contrast to earlier Surface Pro generations, the keyboard cover is
>> now also connected via the Surface Aggregator Module (whereas it was
>> previously connected via USB or HID-over-I2C). To properly support the
>> HID devices of that cover, however, more changes regarding hot-removal
>> of Surface Aggregator client devices as well as a new device hub driver
>> are required. We will address those things in a follow-up series, so do
>> not add any HID device IDs just yet.
>>
>> Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
> 
> Since it is just device-id additions I can still pick this up for
> 5.16 if you want / if this is useful.
> 
> Do you want me to pick this up for 5.16 ?

Hmm, usefulness is somewhat limited, because the device currently has
neither touchscreen nor keyboard cover support, so external peripherals
are required.

I think including it might still be a good idea though because it at
least makes that scenario somewhat viable by providing battery stats.

Thanks,
Max

> Regards,
> 
> Hans
> 
> 
> 
>> ---
>>   .../platform/surface/surface_aggregator_registry.c   | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
>> index 2e0d3a808d47..ce2bd88feeaa 100644
>> --- a/drivers/platform/surface/surface_aggregator_registry.c
>> +++ b/drivers/platform/surface/surface_aggregator_registry.c
>> @@ -228,6 +228,15 @@ static const struct software_node *ssam_node_group_sp7[] = {
>>   	NULL,
>>   };
>>   
>> +static const struct software_node *ssam_node_group_sp8[] = {
>> +	&ssam_node_root,
>> +	&ssam_node_bat_ac,
>> +	&ssam_node_bat_main,
>> +	&ssam_node_tmp_pprof,
>> +	/* TODO: Add support for keyboard cover. */
>> +	NULL,
>> +};
>> +
>>   
>>   /* -- Device registry helper functions. ------------------------------------- */
>>   
>> @@ -520,6 +529,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
>>   	/* Surface Pro 7+ */
>>   	{ "MSHW0119", (unsigned long)ssam_node_group_sp7 },
>>   
>> +	/* Surface Pro 8 */
>> +	{ "MSHW0263", (unsigned long)ssam_node_group_sp8 },
>> +
>>   	/* Surface Book 2 */
>>   	{ "MSHW0107", (unsigned long)ssam_node_group_gen5 },
>>   
>>
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform/surface: aggregator_registry: Add initial support for Surface Pro 8
  2021-10-28  1:28 [PATCH] platform/surface: aggregator_registry: Add initial support for Surface Pro 8 Maximilian Luz
  2021-10-28  7:58 ` Hans de Goede
@ 2021-10-28  9:35 ` Hans de Goede
  1 sibling, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2021-10-28  9:35 UTC (permalink / raw)
  To: Maximilian Luz, platform-driver-x86; +Cc: Mark Gross, linux-kernel

Hi,

On 10/28/21 03:28, Maximilian Luz wrote:
> Add preliminary support for the Surface Pro 8 to the Surface Aggregator
> registry. This includes battery/charger status and platform profile
> support.
> 
> In contrast to earlier Surface Pro generations, the keyboard cover is
> now also connected via the Surface Aggregator Module (whereas it was
> previously connected via USB or HID-over-I2C). To properly support the
> HID devices of that cover, however, more changes regarding hot-removal
> of Surface Aggregator client devices as well as a new device hub driver
> are required. We will address those things in a follow-up series, so do
> not add any HID device IDs just yet.
> 
> Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>

Thank you for your patch, I've applied this patch 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 in my review-hans branch 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


> ---
>  .../platform/surface/surface_aggregator_registry.c   | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
> index 2e0d3a808d47..ce2bd88feeaa 100644
> --- a/drivers/platform/surface/surface_aggregator_registry.c
> +++ b/drivers/platform/surface/surface_aggregator_registry.c
> @@ -228,6 +228,15 @@ static const struct software_node *ssam_node_group_sp7[] = {
>  	NULL,
>  };
>  
> +static const struct software_node *ssam_node_group_sp8[] = {
> +	&ssam_node_root,
> +	&ssam_node_bat_ac,
> +	&ssam_node_bat_main,
> +	&ssam_node_tmp_pprof,
> +	/* TODO: Add support for keyboard cover. */
> +	NULL,
> +};
> +
>  
>  /* -- Device registry helper functions. ------------------------------------- */
>  
> @@ -520,6 +529,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
>  	/* Surface Pro 7+ */
>  	{ "MSHW0119", (unsigned long)ssam_node_group_sp7 },
>  
> +	/* Surface Pro 8 */
> +	{ "MSHW0263", (unsigned long)ssam_node_group_sp8 },
> +
>  	/* Surface Book 2 */
>  	{ "MSHW0107", (unsigned long)ssam_node_group_gen5 },
>  
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-28  9:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28  1:28 [PATCH] platform/surface: aggregator_registry: Add initial support for Surface Pro 8 Maximilian Luz
2021-10-28  7:58 ` Hans de Goede
2021-10-28  8:52   ` Maximilian Luz
2021-10-28  9:35 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).