diff mbox series

[v2,2/2] platform/surface: aggregator_registry: add entry for fan speed

Message ID 20231228003444.5580-3-ivor@iwanders.net (mailing list archive)
State Changes Requested
Headers show
Series Surface fan monitoring driver | expand

Commit Message

Ivor Wanders Dec. 28, 2023, 12:34 a.m. UTC
Add an entry for the fan speed function.
Add this new entry to the Surface Pro 9 group.

Signed-off-by: Ivor Wanders <ivor@iwanders.net>
Link: https://github.com/linux-surface/kernel/pull/144
---
Changes in v2:
  - No changes in this patch.
---
 drivers/platform/surface/surface_aggregator_registry.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Maximilian Luz Dec. 29, 2023, 10:42 p.m. UTC | #1
On 12/28/23 01:34, Ivor Wanders wrote:
> Add an entry for the fan speed function.
> Add this new entry to the Surface Pro 9 group.
> 
> Signed-off-by: Ivor Wanders <ivor@iwanders.net>
> Link: https://github.com/linux-surface/kernel/pull/144
> ---
> Changes in v2:
>    - No changes in this patch.
> ---
>   drivers/platform/surface/surface_aggregator_registry.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
> index 530db4db7..b0db25886 100644
> --- a/drivers/platform/surface/surface_aggregator_registry.c
> +++ b/drivers/platform/surface/surface_aggregator_registry.c
> @@ -74,6 +74,12 @@ static const struct software_node ssam_node_tmp_pprof = {
>   	.parent = &ssam_node_root,
>   };
>   
> +/* Fan speed function. */
> +static const struct software_node ssam_node_fan_speed = {
> +	.name = "ssam:01:05:01:01:01",
> +	.parent = &ssam_node_root,
> +};

I would prefer if we could keep the subsystem prefix for node names. So
something like `ssam_node_tmp_fan_speed`.

Otherwise, this looks good to me. With that changed:

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

> +
>   /* Tablet-mode switch via KIP subsystem. */
>   static const struct software_node ssam_node_kip_tablet_switch = {
>   	.name = "ssam:01:0e:01:00:01",
> @@ -319,6 +325,7 @@ static const struct software_node *ssam_node_group_sp9[] = {
>   	&ssam_node_bat_ac,
>   	&ssam_node_bat_main,
>   	&ssam_node_tmp_pprof,
> +	&ssam_node_fan_speed,
>   	&ssam_node_pos_tablet_switch,
>   	&ssam_node_hid_kip_keyboard,
>   	&ssam_node_hid_kip_penstash,
Maximilian Luz Dec. 30, 2023, 5:19 p.m. UTC | #2
On 12/29/23 23:42, Maximilian Luz wrote:
> On 12/28/23 01:34, Ivor Wanders wrote:
>> Add an entry for the fan speed function.
>> Add this new entry to the Surface Pro 9 group.
>>
>> Signed-off-by: Ivor Wanders <ivor@iwanders.net>
>> Link: https://github.com/linux-surface/kernel/pull/144
>> ---
>> Changes in v2:
>>    - No changes in this patch.
>> ---
>>   drivers/platform/surface/surface_aggregator_registry.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
>> index 530db4db7..b0db25886 100644
>> --- a/drivers/platform/surface/surface_aggregator_registry.c
>> +++ b/drivers/platform/surface/surface_aggregator_registry.c
>> @@ -74,6 +74,12 @@ static const struct software_node ssam_node_tmp_pprof = {
>>       .parent = &ssam_node_root,
>>   };
>> +/* Fan speed function. */
>> +static const struct software_node ssam_node_fan_speed = {
>> +    .name = "ssam:01:05:01:01:01",
>> +    .parent = &ssam_node_root,
>> +};
> 
> I would prefer if we could keep the subsystem prefix for node names. So
> something like `ssam_node_tmp_fan_speed`.

Please disregard that comment. Somehow I thought it's part of the TMP
subsystem, but it's in its own FAN subsystem. So all is good.

> Otherwise, this looks good to me. With that changed:
> 
> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
> 
>> +
>>   /* Tablet-mode switch via KIP subsystem. */
>>   static const struct software_node ssam_node_kip_tablet_switch = {
>>       .name = "ssam:01:0e:01:00:01",
>> @@ -319,6 +325,7 @@ static const struct software_node *ssam_node_group_sp9[] = {
>>       &ssam_node_bat_ac,
>>       &ssam_node_bat_main,
>>       &ssam_node_tmp_pprof,
>> +    &ssam_node_fan_speed,
>>       &ssam_node_pos_tablet_switch,
>>       &ssam_node_hid_kip_keyboard,
>>       &ssam_node_hid_kip_penstash,
diff mbox series

Patch

diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
index 530db4db7..b0db25886 100644
--- a/drivers/platform/surface/surface_aggregator_registry.c
+++ b/drivers/platform/surface/surface_aggregator_registry.c
@@ -74,6 +74,12 @@  static const struct software_node ssam_node_tmp_pprof = {
 	.parent = &ssam_node_root,
 };
 
+/* Fan speed function. */
+static const struct software_node ssam_node_fan_speed = {
+	.name = "ssam:01:05:01:01:01",
+	.parent = &ssam_node_root,
+};
+
 /* Tablet-mode switch via KIP subsystem. */
 static const struct software_node ssam_node_kip_tablet_switch = {
 	.name = "ssam:01:0e:01:00:01",
@@ -319,6 +325,7 @@  static const struct software_node *ssam_node_group_sp9[] = {
 	&ssam_node_bat_ac,
 	&ssam_node_bat_main,
 	&ssam_node_tmp_pprof,
+	&ssam_node_fan_speed,
 	&ssam_node_pos_tablet_switch,
 	&ssam_node_hid_kip_keyboard,
 	&ssam_node_hid_kip_penstash,