From nobody Sat Nov 23 17:52:19 2024 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E23D042A87; Mon, 11 Nov 2024 18:35:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350140; cv=none; b=F3c1IYkhmU0rOtqMhsAF+Zixu1X6NbJJvgjlVw0PKiWsjtgrFlHlaFZhXOUQywWNx3L7VJROxww8Cqi8RxIA5sDwNDe0hMXj+tyJFr4rj8jyiZPv98rH0Kxn7+lFxtFhjDIqCimCmXUiUkHGJey3eu3SsCG7SumqNoVrHFnZGOM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350140; c=relaxed/simple; bh=qyqmzcAlV/qU/gs1YCXoIR/oEsuJpUJ02rP8Oa49I3c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bnnlpuserUQ9KGoPguOlBzDgz2KSEzSByckJmjJMtUXqpjOs2sVDIPKiOjbrfsNrrMBQkj8kbd/Z4McQZeMzhIf23iu0Kz6404WW+qg/ja2d30bQqkt1H8YxiIpBHj7JSyBtPlVSwQQVOkNk/8DvW6xcb1ETgRRH3FP45MOi1Zk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JcTnxx6t; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JcTnxx6t" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-720d01caa66so4507210b3a.2; Mon, 11 Nov 2024 10:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731350138; x=1731954938; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6IH3L7vfz84/AAdgY9zkGi3PamyVUn0pY3KRZfJhanY=; b=JcTnxx6tQEp9iaPsJPbWj10gyqXcnQA0X9Z65qf5MvZn5rOAOimljw8cb015d4ZHYd OovpDjY2i322q6hkmqbzF89eXBGPhcvS74DkRbjoorw6DGpufe5JdXP5eYR0YE9HQQjq dkTui4YA/+3v1MBIqknWqhhimp2qvg8gvOLgxRAr9t/iHlpd0uv/zgJiSpiCUGGgYjBR yMrs7iCFndOflpwgX/oXI0yE/GvCxNyiWKSw147cfitdByECnr9I8zy5CG+lg/laU0lA WZILFbpZZQbF5SGZK75egRqTmgMX+cmY+iqi/ApmtCPFpQVKa0qupUKPr9JILudJTON8 0pVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731350138; x=1731954938; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6IH3L7vfz84/AAdgY9zkGi3PamyVUn0pY3KRZfJhanY=; b=nJ5WleVIMOhv0EqTlVZU6G+ntqNWclEat+KXBzt95jDrYuzr6gcHhGTy1v4THR/jv9 Lz0Ydu9845BsoHUK5AQZDHwLY8lzgtqMr+s8NsRBe0TKESQOMHXrgOoKzHQH8Gp8N3m4 x2eG5O2B2gftcn7mvShgPFYixDfn6W0fw6uUkHRJAW9hLPG6Jgl6Qo+dvMD0bxmDj240 i/Ucezwj0CQMcpCS1QvR323fneg2NRQz606NhlQgxuDCreclPGdG3Kmga6K/gUX+6kP1 0XrKsazEAYBbJQzEw7SW0PJy99Yj1lDdlBA4EzhHRVpBC7mVKcEmcoWQWWmRPbymi0th m/ZQ== X-Forwarded-Encrypted: i=1; AJvYcCUkUiGiI/KgZ5TTgba6Y0JbR3Xokg/D7LZL7cEz0d7FHi1WK8jgme4JjvEWktX9UAd+v6rp6ZV1vcbAjQARRklou+7uZQ==@vger.kernel.org, AJvYcCVKyiVCmFgCyXAa3wULVRPzuomPnJJkdKqM8uUPXNN43qsGXTqHobX9UIET56p1/auswF4J5QXcGekk74o=@vger.kernel.org X-Gm-Message-State: AOJu0YyGKw9u+wXJ4KaLQDM4goVSB/bG3c6gg94hzBfNuiIf/OHg6J+n m/j/gEebEet3btoz57wOrfjB9uGmEwWOU8BD7XTHFvWxsBAQbuEnxmqliuAX X-Google-Smtp-Source: AGHT+IFrfuSVWF6DRA/DPq7pG6u1Mh3tou2LR1cZ07CaKiCzVI2+LS71JcVDGIpPlEPB7qAFXp5KSA== X-Received: by 2002:a05:6a21:8cca:b0:1db:df7b:471a with SMTP id adf61e73a8af0-1dc22b9162amr20555970637.43.1731350138124; Mon, 11 Nov 2024 10:35:38 -0800 (PST) Received: from localhost.localdomain (host95.181-12-202.telecom.net.ar. [181.12.202.95]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7f41f5b48c6sm8818616a12.18.2024.11.11.10.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 10:35:37 -0800 (PST) From: Kurt Borja To: kuurtb@gmail.com Cc: ilpo.jarvinen@linux.intel.com, w_armin@gmx.de, hdegoede@redhat.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com Subject: [PATCH 1/5] alienware-wmi: order alienware_quirks[] alphabetically Date: Mon, 11 Nov 2024 15:35:20 -0300 Message-ID: <20241111183520.14573-1-kuurtb@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111183308.14081-3-kuurtb@gmail.com> References: <20241111183308.14081-3-kuurtb@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" alienware_quirks[] entries are now ordered alphabetically Signed-off-by: Kurt Borja Reviewed-by: Ilpo J=C3=A4rvinen --- drivers/platform/x86/dell/alienware-wmi.c | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x= 86/dell/alienware-wmi.c index a800c28bb4d5..bcc80ca8861c 100644 --- a/drivers/platform/x86/dell/alienware-wmi.c +++ b/drivers/platform/x86/dell/alienware-wmi.c @@ -206,75 +206,75 @@ static int __init dmi_matched(const struct dmi_system= _id *dmi) static const struct dmi_system_id alienware_quirks[] __initconst =3D { { .callback =3D dmi_matched, - .ident =3D "Alienware X51 R3", + .ident =3D "Alienware ASM100", .matches =3D { DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R3"), + DMI_MATCH(DMI_PRODUCT_NAME, "ASM100"), }, - .driver_data =3D &quirk_x51_r3, + .driver_data =3D &quirk_asm100, }, { .callback =3D dmi_matched, - .ident =3D "Alienware X51 R2", + .ident =3D "Alienware ASM200", .matches =3D { DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R2"), + DMI_MATCH(DMI_PRODUCT_NAME, "ASM200"), }, - .driver_data =3D &quirk_x51_r1_r2, + .driver_data =3D &quirk_asm200, }, { .callback =3D dmi_matched, - .ident =3D "Alienware X51 R1", + .ident =3D "Alienware ASM201", .matches =3D { DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51"), + DMI_MATCH(DMI_PRODUCT_NAME, "ASM201"), }, - .driver_data =3D &quirk_x51_r1_r2, + .driver_data =3D &quirk_asm201, }, { .callback =3D dmi_matched, - .ident =3D "Alienware ASM100", + .ident =3D "Alienware x15 R1", .matches =3D { DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "ASM100"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R1"), }, - .driver_data =3D &quirk_asm100, + .driver_data =3D &quirk_x_series, }, { .callback =3D dmi_matched, - .ident =3D "Alienware ASM200", + .ident =3D "Alienware X51 R1", .matches =3D { DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "ASM200"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51"), }, - .driver_data =3D &quirk_asm200, + .driver_data =3D &quirk_x51_r1_r2, }, { .callback =3D dmi_matched, - .ident =3D "Alienware ASM201", + .ident =3D "Alienware X51 R2", .matches =3D { DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "ASM201"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R2"), }, - .driver_data =3D &quirk_asm201, + .driver_data =3D &quirk_x51_r1_r2, }, { .callback =3D dmi_matched, - .ident =3D "Dell Inc. Inspiron 5675", + .ident =3D "Alienware X51 R3", .matches =3D { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5675"), + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R3"), }, - .driver_data =3D &quirk_inspiron5675, + .driver_data =3D &quirk_x51_r3, }, { .callback =3D dmi_matched, - .ident =3D "Alienware x15 R1", + .ident =3D "Dell Inc. Inspiron 5675", .matches =3D { - DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), - DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R1"), + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5675"), }, - .driver_data =3D &quirk_x_series, + .driver_data =3D &quirk_inspiron5675, }, {} }; --=20 2.47.0 From nobody Sat Nov 23 17:52:19 2024 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09C221A256F; Mon, 11 Nov 2024 18:35:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350160; cv=none; b=PGfWB+pYKFd0MYxuQtlxSa5caIstKUvuRUHyZtYCR9mP83ptA+CGIc5P5FZ6sQ+tPl/2+M9mTX5rwd33BVw4XLEWFnMyl4nhi1fXq2KQHR6ZQ2NmUyRrIH1Y4KzRMEuZAQ9MjNxfBHOb1DOU4xZBmF4BeyB/IGrA1hWgrnhBgF4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350160; c=relaxed/simple; bh=uVnSBa6MPZa4wpsyJv9t4bQvwFnuLkX2JkCiZXDD3Cw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xew5r1w/bijoSeqQ52p2gwWRUH85aKgATcCOx0eREjpPTAI/YBPuz7fgJmsU0sXIXezG9u0w5D3Yhbo/RWFZ+sBY4GzcyVf6kWqiw7F/7cdDLoqggWM7pVGqF1azJH8XFHTVog31Ictf3htBDYmS2WioaLrGeId8SwD5Ll2VhFE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cLLkgw8+; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cLLkgw8+" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-720e94d36c8so4976238b3a.1; Mon, 11 Nov 2024 10:35:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731350158; x=1731954958; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VrlF2QlkqvavRaB0bhBayO6wL9geqfEeiXA9NsnbbN4=; b=cLLkgw8+oHrhfsBrZiRNhy7L1xMeYD9Tin4Ckw8I/KGXZOY+MLISbzQkd8UI/i0YZB 6Js1hQ7bhypTQ3RZmW7og21b1hRpPvcLipTUbKKg+l7GCareiHNbRKWtapplbR1hS+co 4qZkUC9iWsJGXJYHBmz4H5E738Xy4AsC9RptwRnIoWqRZFqL0PX6QEWFbK3upDq2CMXf ZUoba1HEFBIjV7pDEZR0jkdW5Qi2aDhdS2UUpNlAQWbD5inJ20Hcf1r6Z6/D3rZk3f+6 QKnsSgwWHHr+csebPhLZoKEEyNT7OWslthF0qZeyFVZ+x59tq7x4i16hGfl3stB/PxAU txdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731350158; x=1731954958; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VrlF2QlkqvavRaB0bhBayO6wL9geqfEeiXA9NsnbbN4=; b=VnwPI6N6MC5a+soy2sjNXe0m2c2cFjQKDYtm7l0snlltvhet/szJE8MvPLsb0HXwhH 4ju/YLSYOqL5cfZidJ2SB/W9bFYwDuOJSlwFGFTB+ISa7NyCircv9I7IEVKbABcM4D2h 1uk2I1DGF4VO97OvqayJXMuXmZEmDkk9XqxC3MtlEOSpgfHfSkPcJaxdfaO7FmJlz/eo GDA1es/F0aQvlgI6SUuQ9ygJvmYaP+dOQsPCHfeGAzw/sfCP6J6JfBGcQamYOl3JVAzy rJrOFVgn2zTegJkG0gxYSaz8kPxyN1CEVtixZB1jUj4xDibXRMCmDtuAgkwOHAUprbOB xvGg== X-Forwarded-Encrypted: i=1; AJvYcCUDQFhSHzypJk6RSUl4/VWX96UlYmI0d3KbRm1XUPPOfyXoJ6Mi4b9utLcVvfN2jlOJulx9bBjVKZGvxnM=@vger.kernel.org, AJvYcCXSRCXY9/C5azSHMQBr+GRJ8Ty9ihYgAnoQEa/vi6bc2jYun1meIToAHIwN3z2RIC3Mef/A3RfBvEqboHXVrbmGXJSz9A==@vger.kernel.org X-Gm-Message-State: AOJu0YzT9JEuQVomSsVSfVcJphLQMo/L2n6KWHlNR/H/j83iW1Vhvdgo a/VKAIjSYn3Bq9FtihFhdIGhtphL+01WOwTox4mBbsL9uRwkbeZR6UOcyA9U X-Google-Smtp-Source: AGHT+IEV8akVw3PnQgIm9B3KPwlRTcK3Lpdc+GHqupHLhwXliAnZslzKHxx66jWPMsNaowBQMvj8nw== X-Received: by 2002:a05:6a20:3944:b0:1d9:19bc:9085 with SMTP id adf61e73a8af0-1dc234afb33mr21248096637.14.1731350158318; Mon, 11 Nov 2024 10:35:58 -0800 (PST) Received: from localhost.localdomain (host95.181-12-202.telecom.net.ar. [181.12.202.95]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72407a57210sm9737603b3a.186.2024.11.11.10.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 10:35:58 -0800 (PST) From: Kurt Borja To: kuurtb@gmail.com Cc: ilpo.jarvinen@linux.intel.com, w_armin@gmx.de, hdegoede@redhat.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com Subject: [PATCH 2/5] alienware-wmi: extends the list of supported models Date: Mon, 11 Nov 2024 15:35:46 -0300 Message-ID: <20241111183546.14617-1-kuurtb@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111183308.14081-3-kuurtb@gmail.com> References: <20241111183308.14081-3-kuurtb@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Adds thermal + gmode quirk to: - Dell G15 5510 - Dell G15 5511 - Dell G15 5515 - Dell G3 3500 - Dell G3 3590 - Dell G5 5500 Adds thermal quirk to: - Alienware m18 R2 - Alienware m17 R5 AMD Support for these models was manually verified by reading their respective ACPI tables. Signed-off-by: Kurt Borja Reviewed-by: Ilpo J=C3=A4rvinen --- drivers/platform/x86/dell/alienware-wmi.c | 81 +++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x= 86/dell/alienware-wmi.c index bcc80ca8861c..d1e72915ed4d 100644 --- a/drivers/platform/x86/dell/alienware-wmi.c +++ b/drivers/platform/x86/dell/alienware-wmi.c @@ -188,6 +188,15 @@ static struct quirk_entry quirk_asm201 =3D { .gmode =3D false, }; =20 +static struct quirk_entry quirk_g_series =3D { + .num_zones =3D 2, + .hdmi_mux =3D 0, + .amplifier =3D 0, + .deepslp =3D 0, + .thermal =3D true, + .gmode =3D true, +}; + static struct quirk_entry quirk_x_series =3D { .num_zones =3D 2, .hdmi_mux =3D 0, @@ -231,6 +240,24 @@ static const struct dmi_system_id alienware_quirks[] _= _initconst =3D { }, .driver_data =3D &quirk_asm201, }, + { + .callback =3D dmi_matched, + .ident =3D "Alienware m17 R5", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"), + }, + .driver_data =3D &quirk_x_series, + }, + { + .callback =3D dmi_matched, + .ident =3D "Alienware m18 R2", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m18 R2"), + }, + .driver_data =3D &quirk_x_series, + }, { .callback =3D dmi_matched, .ident =3D "Alienware x15 R1", @@ -267,6 +294,60 @@ static const struct dmi_system_id alienware_quirks[] _= _initconst =3D { }, .driver_data =3D &quirk_x51_r3, }, + { + .callback =3D dmi_matched, + .ident =3D "Dell Inc. G15 5510", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5510"), + }, + .driver_data =3D &quirk_g_series, + }, + { + .callback =3D dmi_matched, + .ident =3D "Dell Inc. G15 5511", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5511"), + }, + .driver_data =3D &quirk_g_series, + }, + { + .callback =3D dmi_matched, + .ident =3D "Dell Inc. G15 5515", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5515"), + }, + .driver_data =3D &quirk_g_series, + }, + { + .callback =3D dmi_matched, + .ident =3D "Dell Inc. G3 3500", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "G3 3500"), + }, + .driver_data =3D &quirk_g_series, + }, + { + .callback =3D dmi_matched, + .ident =3D "Dell Inc. G3 3590", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "G3 3590"), + }, + .driver_data =3D &quirk_g_series, + }, + { + .callback =3D dmi_matched, + .ident =3D "Dell Inc. G5 5500", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "G5 5500"), + }, + .driver_data =3D &quirk_g_series, + }, { .callback =3D dmi_matched, .ident =3D "Dell Inc. Inspiron 5675", --=20 2.47.0 From nobody Sat Nov 23 17:52:19 2024 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36A411A256F; Mon, 11 Nov 2024 18:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350177; cv=none; b=R8A8dOaMHVKuggp8eC27XvmqyBlYoZIpEo5W0sBoQldUD3aE4qcMbb7uHLm4dMt2g8D4EtXdaWhRJmZ6u7TTjLKxS1bCGu8yVJv/8pG0dd5a2jhwEoU8P/PuEzfQgAo1sSGrIEoae18oc7J6rIdI8kOayHL8Xtedh95Zin3J1S8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350177; c=relaxed/simple; bh=DbgYVrU1T/Jco0gW7WgvvAhR4NOMUZazw9rmf/J6xqc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ePhwRT/SChhlibPFUgW9u3J8dzkQEHRKpCCj5YTtNLv3wnUB0OBn0n2iJvHh0zgSLvhzpVZLM+TEKjJaOxPKEHhRCOfYAWg2KDtCfSvyXeYY+Lp3SGWORes5ojGS1S6JxQXFD+X78xdCbG0oDcqSEkyUmyGGF/KRODRNO7Y2Qcc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=USFHa0lO; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="USFHa0lO" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-72041ff06a0so3824218b3a.2; Mon, 11 Nov 2024 10:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731350175; x=1731954975; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EzB1/T95TNZaUk1g4DmHaqoqF0Us50Ixc5KittyVt3I=; b=USFHa0lOaqiZuvykQAklDdls3oYs4yCUFGDop0bVw3mjhEMm3oMkj1ezqkRS65saJ3 x99mTkWiWD6n9YuVN2rRC/eBxc5SXLx2hU/LhBsyMA7EqZQ+yxg78Jtz4tXQrFtc9hgC gyBZ4GtINdxhtDKZd8OnDukdJvazjgjY8oP92HS5jXrXq+54bvWQpWhUcBJFKwLNGlFU IeaUdNju9ZuwngI5YBFvFiznvAdE4W/lCNBbutGzKNJThnJMwqZZwOjbRXz0+eRK0y9h 3JIlhEE7H468pMOBuD1FyxtjlvmqIYRsKVM8wPBqCWpLeB6BDhMaglu1V2awm/6of5my W5wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731350175; x=1731954975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EzB1/T95TNZaUk1g4DmHaqoqF0Us50Ixc5KittyVt3I=; b=BbIoYzwXC5LqIPk4uRzjSlESYQcvd/gyE9ildWC5dIsjQZG105q2inzIsnaYuOp5LJ Y97lqJyLezaRZDDnlBVcvO6rY1u0OmHzyIiswUgTDuvV6KO9fsGCQCcfUzakwQbx1lY3 3ryQt2SxV4jbiudD651PWd+Db4Mr1G5zmrOVfnGW8ynTKA5UvYBYv+urCKbtDAmEDgwD JZaRI2vIH6K9QJF7x6OJwgwYfJxs7VsZzG1dBkb4Vo6cAQG0cVWkU99gESE8lmkObR6K 9En2AfbavgiFbjEcZ0ZTm/UUJDZYHWauIP/uwUclO7XnA0FKPaVNG+d+U/DWY1v4e8sS 8u7A== X-Forwarded-Encrypted: i=1; AJvYcCWu7P+DdrexpGb1mpfKmZEhTx1tykMiRSrZBdRsHq94vioTFgONBHsKfsteRlMM+NO3LfuOyBxoxoo1MT4=@vger.kernel.org, AJvYcCXX1+3cZqx4tdob17K+TGIQ8dgwJR/d+L2XkuqR8y8rLqp1U2QBoYIDrrchKWqenlhHiWWdjrxC0fEWT0WFL0T8LonWvQ==@vger.kernel.org X-Gm-Message-State: AOJu0Yz/OVjqBYw3wLd9/LIDMEG8cwyf5jNI2zX6/+aDQ9ksGzZe3Qga XuDKYrEhtJeOFRtsqJIZbUS6VK5oScy10HBIXvg4FpYijRuRXxYO X-Google-Smtp-Source: AGHT+IG7pHJQb3NymywxGIf5AJDXLs7NQcLOo7hdLcX+hR5xLfwhJbLRHfxMof5cZfI/h6Ic68XN7A== X-Received: by 2002:a05:6a20:1595:b0:1db:e884:6370 with SMTP id adf61e73a8af0-1dc228693a7mr20675279637.7.1731350175135; Mon, 11 Nov 2024 10:36:15 -0800 (PST) Received: from localhost.localdomain (host95.181-12-202.telecom.net.ar. [181.12.202.95]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72407a57210sm9737897b3a.186.2024.11.11.10.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 10:36:14 -0800 (PST) From: Kurt Borja To: kuurtb@gmail.com Cc: ilpo.jarvinen@linux.intel.com, w_armin@gmx.de, hdegoede@redhat.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com, Samith Castro Subject: [PATCH 3/5] alienware-wmi: Adds support to Alienware x17 R2 Date: Mon, 11 Nov 2024 15:36:09 -0300 Message-ID: <20241111183609.14653-1-kuurtb@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111183308.14081-3-kuurtb@gmail.com> References: <20241111183308.14081-3-kuurtb@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Adds support to Alienware x17 R2 Tested-by: Samith Castro Signed-off-by: Kurt Borja Reviewed-by: Ilpo J=C3=A4rvinen --- drivers/platform/x86/dell/alienware-wmi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x= 86/dell/alienware-wmi.c index d1e72915ed4d..36d182f217e2 100644 --- a/drivers/platform/x86/dell/alienware-wmi.c +++ b/drivers/platform/x86/dell/alienware-wmi.c @@ -267,6 +267,15 @@ static const struct dmi_system_id alienware_quirks[] _= _initconst =3D { }, .driver_data =3D &quirk_x_series, }, + { + .callback =3D dmi_matched, + .ident =3D "Alienware x17 R2", + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"), + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x17 R2"), + }, + .driver_data =3D &quirk_x_series, + }, { .callback =3D dmi_matched, .ident =3D "Alienware X51 R1", --=20 2.47.0 From nobody Sat Nov 23 17:52:19 2024 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C19601AAE13; Mon, 11 Nov 2024 18:36:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350191; cv=none; b=Y0MKG3VnCM9FS9FJj9CKRCpyGK6Jscpr2oC2TJ/1oxARChtxuvY2RRlMwlBrDxLNJ7cRX1nvJOA6s/k3knBVl26Q85cJCOiNmrHVM/v1X9sfufAyCa4Nd4Bp+9sQ91+Db1qNRQloTO6xysewNf4xY4AYBqeBfFeDTeVLZQGVSO4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350191; c=relaxed/simple; bh=npFH5UHaCbdQUl4s0bE97PA9ZIxx3/oEitT9i+OrTQo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mmwqv3UZbudt2bO5kxitSVn8EQVUeqCEOZNBhJpTYmUhFlC1krHDj8DKF9vj4TgpHeUnXTL/rTTK6I0N/2get1KqxNbQCBrRsLlF9C3C+6SJXhlelIOaC2IFLMLZCeRGExfCp3wdw0RU3L/lZb2OYk1BQwmoh0l9yv7+1BCuCt0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QFNbg1tL; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QFNbg1tL" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20ca1b6a80aso51533165ad.2; Mon, 11 Nov 2024 10:36:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731350189; x=1731954989; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HH6jhSkN/16Cl04BKJOtxSm6lU3/J3emxmBivgKISP4=; b=QFNbg1tLlZnEz61vYwI6NNza2IpQslVdr5UBft8LlI2LmfzscvI9t5O9Sn6lI4IjR7 0Z6YbaFV0PvxVmphZ7ppuY09sFzGcs02/uRbindELnBxU6gaiQqxp8uPTGcER3xEozeM awyQjc2wnl58rvtEp0A7v0yK3OWZoVKf7Qsq18Bd/BRjfBxeOlijPOM1ll8RqAzFa8oS 4E+6WjcYreziV047VIQcEAi9zfLGoNrkCW6Ow2QUT/0mGOlcRkodINj0XgOWt8pgdqL+ WhtN7WQv5lXe94DNCWiMA8mU3NU4gG8+FIfLys/lVtDaUF51JjQcjA7017hLdWydt4BJ J2yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731350189; x=1731954989; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HH6jhSkN/16Cl04BKJOtxSm6lU3/J3emxmBivgKISP4=; b=NYOeAgKRstNjcP8ohTypzzVlKmm/tcJBFW9VH3ICh0n6u0gkemS/TCYHq+EMGOgABV 0jbjPAK3KumZ/3klJDX3vuvqgoKqTC4/L4vaW6M5nDCInFGvWyG4saq+AkY+T1MbiV4+ akTKMWM+0m44mWRAwCfT1SOOJ5efMxrBZQ39UDy341IX7Tba9nsQiWeS4MSz8nw24Gte e4Ihwinsu6nD4dF/OfdDoDUCBFplt/ESJivu52Eg6s8PoX0IkwD6Z49M3UqtaJpm6YPA vKtR2cEZIGVKIXgvCNeHeng/vulBqWwWef5awRepQa1P+0BwdTH7ZRf3aAG8hDTYeDkQ lpfw== X-Forwarded-Encrypted: i=1; AJvYcCVFNVGO5BZB7MU08I1Y/bLz1pNJWZGUq2VX0UHCiw+kFQyJNeb3S7aaNKixQVvC9WqOVwIgKsEbtPbX3cM=@vger.kernel.org, AJvYcCXQ67OQmIcAngTjmlRs1hELSL4krhkrmWlWx/q+7lAUgRfyWDAwAERkb7f2VvmWt4y2X2RHLEZwm/PbZq4/Jm90EJK9uw==@vger.kernel.org X-Gm-Message-State: AOJu0YzMmicjmuXOdvt9wkTPIi3OPFnbSdTmbf79Aca4nHnwFT9tadif 4Hm6r7hybWNqQsQpZN/tXmO1ibli+4WqJAAJ2Gdwzr7wIB4otXGjszpa1YRW X-Google-Smtp-Source: AGHT+IHcD9h4VAWGyFcZAZfLvrUFYyvbbkvRN7M10hgNdrzal9lhpFdUsKJkwuhabdt8p+CSwwp5Ww== X-Received: by 2002:a17:902:eccf:b0:20c:e2ff:4a2e with SMTP id d9443c01a7336-21183d7cf32mr212791995ad.53.1731350189029; Mon, 11 Nov 2024 10:36:29 -0800 (PST) Received: from localhost.localdomain (host95.181-12-202.telecom.net.ar. [181.12.202.95]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21177dde262sm79156765ad.68.2024.11.11.10.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 10:36:28 -0800 (PST) From: Kurt Borja To: kuurtb@gmail.com Cc: ilpo.jarvinen@linux.intel.com, w_armin@gmx.de, hdegoede@redhat.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com Subject: [PATCH 4/5] alienware-wmi: create_thermal_profile no longer brute-forces IDs Date: Mon, 11 Nov 2024 15:36:23 -0300 Message-ID: <20241111183623.14691-1-kuurtb@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111183308.14081-3-kuurtb@gmail.com> References: <20241111183308.14081-3-kuurtb@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" WMAX_METHOD_THERMAL_INFORMATION has a *system description* operation that outputs a buffer with the following structure: out[0] -> Number of fans out[1] -> Number of sensors out[2] -> 0x00 out[3] -> Number of thermal modes This is now used by create_thermal_profile to retrieve available thermal codes instead of brute-forcing every ID. Tested on an Alienware x15 R1. Verified by checking ACPI tables of supported models. Signed-off-by: Kurt Borja Reviewed-by: Ilpo J=C3=A4rvinen --- drivers/platform/x86/dell/alienware-wmi.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x= 86/dell/alienware-wmi.c index 36d182f217e2..77465ed9b449 100644 --- a/drivers/platform/x86/dell/alienware-wmi.c +++ b/drivers/platform/x86/dell/alienware-wmi.c @@ -68,6 +68,7 @@ enum WMAX_CONTROL_STATES { }; =20 enum WMAX_THERMAL_INFORMATION_OPERATIONS { + WMAX_OPERATION_SYS_DESCRIPTION =3D 0x02, WMAX_OPERATION_LIST_IDS =3D 0x03, WMAX_OPERATION_CURRENT_PROFILE =3D 0x0B, }; @@ -1110,13 +1111,22 @@ static int thermal_profile_set(struct platform_prof= ile_handler *pprof, static int create_thermal_profile(void) { u32 out_data; + u8 sys_desc[4]; + u32 first_mode; enum wmax_thermal_mode mode; enum platform_profile_option profile; int ret; =20 - for (u8 i =3D 0x2; i <=3D 0xD; i++) { + ret =3D wmax_thermal_information(WMAX_OPERATION_SYS_DESCRIPTION, + 0, (u32 *) &sys_desc); + if (ret < 0) + return ret; + + first_mode =3D sys_desc[0] + sys_desc[1]; + + for (u32 i =3D 0; i < sys_desc[3]; i++) { ret =3D wmax_thermal_information(WMAX_OPERATION_LIST_IDS, - i, &out_data); + i + first_mode, &out_data); =20 if (ret =3D=3D -EIO) return ret; --=20 2.47.0 From nobody Sat Nov 23 17:52:19 2024 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9BD91A256F; Mon, 11 Nov 2024 18:36:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350207; cv=none; b=QHBKvomvcsupiZNQQLAQY73/Iltd1nyLKBmagcCceNzGg5D4PRd8bckKPe1TEj+ez/OoR2h1KFjOqjspH9hBYjZHENv57z3eYPjQarv+GhBxyN8lPloiQS1ehFo1vGoxQ7FegXmEwjFSXOJFnBbbm4hs321G8vRpXV2eJdnxE8I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731350207; c=relaxed/simple; bh=w0bgBy0n2+FCH3qmin0izJA7cA3pLvtXIFYWTmL7ySc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hNyvQjjlwfSRvohB3HRcREEbxJTT1ZXknDGHi19pXYSqBkAmupPZEc5Js2+JhEWT7o6jvUY9LFXhWoQ1pLBjX8RRxfPCu31LI4+3jVtoDC3cjrla6xgrCkliwi5TvlVnP9fbJCezE2g3sjJXrjdqeY6jed8qmVp7SuhQ5/DhMJg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gDawcZu4; arc=none smtp.client-ip=209.85.210.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gDawcZu4" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-7206304f93aso4346995b3a.0; Mon, 11 Nov 2024 10:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731350205; x=1731955005; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N7lAsNA45V3HSSzdWqgKjfdEZSKR1i8UxGyHjvsXyqM=; b=gDawcZu4rOfugq6yE2l5eCvLlGoy8aXpj4FnxLKLyZ6U5KsYHfjylLNcj8/akOZla5 x5Z8ctandoucu4iSgSrefxkRCqgkjStFNXFEqAmPPnH9l4Oq4iz8UMnbXjdxsD919rO0 07bDYv6uHTz6xjAhE5R8WjBat+aWrmJA0uSyuLQPbC7bHQdOuClfbkUZ/2Wjb8v26Uve IRnrdag6UdDLq8lq8hME62Z2DeHU6P1wYVuUqldxRlOcqctNRUVFy2ROjnKRqkzSFSnQ BwkAebJj7pxe5TPZ+cwCyNmAyposSlRVLgXVevOty0g6dU6r1p8fX8vjOhnXJPTamSH0 3uVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731350205; x=1731955005; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N7lAsNA45V3HSSzdWqgKjfdEZSKR1i8UxGyHjvsXyqM=; b=any2nHtEDpq0xvtt/9G62sLmZ/Gg9WmAE+dAv9VzqrJs+lCJSvCIW7pAu2p5+EStuf GexByGFazWEQhQ+ruYG2ALAwPyK5c4ZGJC7t0aZZ4GCj4OVtPXEgfFn1JMJGIgLx+xYO kJCsnVW+2sLT2UL7b536nYD1PVtF+gEagASctz1rQXnLZZAfh0ZyJDdTiVZzE7lk+saQ uTPzHkg/5q1zy+uiFAdZYjmvDSbXqeJL6mkf1+31X/uXFG6LnTmPZu/mGf5SUutP3TvU m6X/Gzj0EndHQCztMmYv48+v9a5o4g1UoC3XVq5I0wHV0eJcB1D2TeLt2bgeimZz/LGn LjzA== X-Forwarded-Encrypted: i=1; AJvYcCUC9xIypy6zFxyej6Qlb224P5xsweP89ykZz9dt594PELczs4qryxodC6wE63EZGCzwiC7f9ewspYkZzu4=@vger.kernel.org, AJvYcCVFPLsVwNz7/d5DAv1w/3AQ6KwIQR37q7miDO+N1xr1mpILHsxVtXMELT5G3uV7JwnL2T4rBNRoCZ9SX66pYdibZNB9Mw==@vger.kernel.org X-Gm-Message-State: AOJu0YwHnOSBc+wbhtnEH9Q57q/PXYsZEUG4XA4OGmrRisups4TtA6cw +5rAJkzNFaJ1qTgjY8DAuYyYQoLvVjLj5BAHl7z+n8NpE0AgplPX X-Google-Smtp-Source: AGHT+IEI3sYbbEXw0OXsJMF0sKWakQUpRqp4j15sbyH+SPVCKurUp7KmrgdH98Ww7+3iCHmTuoTKTQ== X-Received: by 2002:a05:6a20:9f45:b0:1db:ed44:ba68 with SMTP id adf61e73a8af0-1dc229afa0cmr19550349637.17.1731350205015; Mon, 11 Nov 2024 10:36:45 -0800 (PST) Received: from localhost.localdomain (host95.181-12-202.telecom.net.ar. [181.12.202.95]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72407a18eebsm9700266b3a.147.2024.11.11.10.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 10:36:44 -0800 (PST) From: Kurt Borja To: kuurtb@gmail.com Cc: ilpo.jarvinen@linux.intel.com, w_armin@gmx.de, hdegoede@redhat.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com Subject: [PATCH 5/5] Documentation: alienware-wmi: Describe THERMAL_INFORMATION operation 0x02 Date: Mon, 11 Nov 2024 15:36:39 -0300 Message-ID: <20241111183639.14726-1-kuurtb@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241111183308.14081-3-kuurtb@gmail.com> References: <20241111183308.14081-3-kuurtb@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This operation is used by alienware-wmi driver to avoid brute-forcing operation 0x03. Signed-off-by: Kurt Borja Reviewed-by: Ilpo J=C3=A4rvinen --- Documentation/wmi/devices/alienware-wmi.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/wmi/devices/alienware-wmi.rst b/Documentation/wm= i/devices/alienware-wmi.rst index 03f932494d58..ddc5e561960e 100644 --- a/Documentation/wmi/devices/alienware-wmi.rst +++ b/Documentation/wmi/devices/alienware-wmi.rst @@ -96,7 +96,7 @@ WMI method Thermal_Information([in] uint32 arg2, [out] ui= nt32 argr) argr =3D 1 =20 if BYTE_0(arg2) =3D=3D 0x02: - argr =3D UNKNOWN_CONSTANT + argr =3D SYSTEM_DESCRIPTION =20 if BYTE_0(arg2) =3D=3D 0x03: if BYTE_1(arg2) =3D=3D 0x00: @@ -179,6 +179,16 @@ WMI method Thermal_Information([in] uint32 arg2, [out]= uint32 argr) else: argr =3D 0xFFFFFFFF =20 +Operation 0x02 returns a *system description* buffer with the following +structure: + +:: + + out[0] -> Number of fans + out[1] -> Number of sensors + out[2] -> 0x00 + out[3] -> Number of thermal modes + Operation 0x03 list all available fan IDs, sensor IDs and thermal profile codes in order, but different models may have different number of fans and thermal profiles. These are the known ranges: --=20 2.47.0