[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa16bf5a-b0da-2751-7109-fe76acbcd7d8@linux.intel.com>
Date: Mon, 11 Mar 2024 13:46:24 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Ivor Wanders <ivor@...nders.net>
cc: Maximilian Luz <luzmaximilian@...il.com>,
Hans de Goede <hdegoede@...hat.com>, platform-driver-x86@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] platform/surface: platform_profile: add fan profile
switching
On Sat, 2 Mar 2024, Ivor Wanders wrote:
> Change naming from tmp to platform profile to clarify the module may
> interact with both the TMP and FAN subystems. Add functionality that
> switches the fan profile when the platform profile is changed when
> a fan is present.
>
> Signed-off-by: Ivor Wanders <ivor@...nders.net>
> ---
> diff --git a/drivers/platform/surface/surface_platform_profile.c b/drivers/platform/surface/surface_platform_profile.c
> index a5a3941b3f43..e54d0a8f7daa 100644
> --- a/drivers/platform/surface/surface_platform_profile.c
> +++ b/drivers/platform/surface/surface_platform_profile.c
> @@ -42,6 +54,13 @@ SSAM_DEFINE_SYNC_REQUEST_CL_W(__ssam_tmp_profile_set, __le32, {
> .command_id = 0x03,
> });
>
> +SSAM_DEFINE_SYNC_REQUEST_W(__ssam_fan_profile_set, char, {
Is char correct type here or do you perhaps mean e.g., u8 that is more
approriate for 1-byte long binary data?
> + .target_category = SSAM_SSH_TC_FAN,
> + .target_id = SSAM_SSH_TID_SAM,
> + .command_id = 0x0e,
> + .instance_id = 0x01,
> +});
> +
> static int ssam_tmp_profile_get(struct ssam_device *sdev, enum ssam_tmp_profile *p)
> {
> struct ssam_tmp_profile_info info;
> @@ -62,7 +81,14 @@ static int ssam_tmp_profile_set(struct ssam_device *sdev, enum ssam_tmp_profile
> return ssam_retry(__ssam_tmp_profile_set, sdev, &profile_le);
> }
>
> -static int convert_ssam_to_profile(struct ssam_device *sdev, enum ssam_tmp_profile p)
> +static int ssam_fan_profile_set(struct ssam_device *sdev, enum ssam_fan_profile p)
> +{
> + char profile = p;
u8 ?
--
i.
Powered by blists - more mailing lists