Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp868395lqo; Fri, 10 May 2024 19:38:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9FcsmvyNPvG4yY+QgpJRHyPshNury7umvgm5zNvOR2h1VTDyTsBzjZvUNb5bFVgAgLZx2iXPPCsmerqSW2obZlGowYA3dBfh2IRR2jQ== X-Google-Smtp-Source: AGHT+IHD162y5JcESo6X6kxq9mAEFvGmZCENOkp6jEbzuaXBlFt2LE33tOCu270slc78GHE9RmiK X-Received: by 2002:a05:622a:14:b0:43a:d4e1:1dcb with SMTP id d75a77b69052e-43dfda8e62cmr47888311cf.13.1715395129381; Fri, 10 May 2024 19:38:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715395129; cv=pass; d=google.com; s=arc-20160816; b=rUzuOJfp8VCEJFsgNKXM3e8TK9GtmiO+Dh/MhhOxc3hLvsiCIRhwBh+Sor/9TdaTtE kJxbdB6HvfLx3S8Nv2/zE6mjLjyYmDL3uVt2sOP43f9TFKddH+3G4lw+iHG0VZ50vUOv EUUfyejGGid2ct273boFNNyszCRwQ2u8j+lQH2qGID/JCUHpWmyP6QzHmIFa8bCqqD9H ZYIEvoZeOGOj81aHjy4Be9ha4e2fWMk559jtLvKRpbv6FuZVhFBgUKFcnQTr+jSe6id3 beC8JgKRUjj2VhNbdLGny1kMuMEb+Xc0A+KWxjPKl/3Qn96yumKrAXL8aIGQw+vviefc /Y0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature:dkim-signature; bh=vz1erGw23082AM7aJVdhF7aJINrmP0eysxVIQ7I0X9A=; fh=/wOgbpoH9JY3wiyPSb9Ps1buF3d+io97+v9ITTFLAkg=; b=KlhGq0iPTaGsNVr5DtDiYklacmKROjblbAbaXuv409mL4mjoUVmluNYG2u/qcfAHEC xBL0o2QBk3Xmu2pLpc5aZ3jtBXUmf1i0jCCgn60KH/5q48XbTCyDUkAGwWa1Les0VPbh fR7dQ2wQ9RJsyvxHkQtgbxX85gciG9Xjlnq6HzCBooT5O+2h7x3yTjVW0QmmkaEhdZsd XPoZfKdlghwIxobiCmpS5ZYwm5Ujt1Vo8zf2P15iI5PWKVsX7rzIAT4NnzDyNcidK2la iZrycTfkn4XrazDCrnd4e/IrKarj3r3gxfrc/NnZ8wblDuX+HEpAsWBM8rJmrTRndE36 WOMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lyndeno.ca header.s=fm2 header.b=B6o8E9vm; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=VWENNb7y; arc=pass (i=1 spf=pass spfdomain=lyndeno.ca dkim=pass dkdomain=lyndeno.ca dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=lyndeno.ca); spf=pass (google.com: domain of linux-kernel+bounces-176392-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176392-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lyndeno.ca Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df56c5630si48349481cf.623.2024.05.10.19.38.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 19:38:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176392-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lyndeno.ca header.s=fm2 header.b=B6o8E9vm; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=VWENNb7y; arc=pass (i=1 spf=pass spfdomain=lyndeno.ca dkim=pass dkdomain=lyndeno.ca dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=lyndeno.ca); spf=pass (google.com: domain of linux-kernel+bounces-176392-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176392-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lyndeno.ca Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1E5361C213A5 for ; Sat, 11 May 2024 02:38:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9E0821A04; Sat, 11 May 2024 02:38:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lyndeno.ca header.i=@lyndeno.ca header.b="B6o8E9vm"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VWENNb7y" Received: from wfhigh3-smtp.messagingengine.com (wfhigh3-smtp.messagingengine.com [64.147.123.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9424E125C0; Sat, 11 May 2024 02:38:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715395121; cv=none; b=s2SsPQaXz/g0PIB9Ij89MUPhKcIjB7LcL7U6dISwp5S6N81H7UjgIVYIJ4Qd7j5jyOMd2R+seLnTygW2atc1cg1Ep+xboEXfeb5pg4jH0W86ezKPgBCOLDZm7HNpu/yY/gfpq3znKL1us6fBI9BFWRsVgotW+eF5QHEkhszFkZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715395121; c=relaxed/simple; bh=vt+CBkRTpChhguZmAsmOJ+xaJIA+507ew6mlrucxVGA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TmJmQLfZXmyjTK0S3YFCLuvdrpYYdj6M8zKXDzfTgIRlVWujX4XlVr1/XErODvPtTmpFEEcUkUBx6KaKmWvrwAm5UB/8NPk4nHyv9igZ5em9A+aDwNTkDl1llegGGmPjSkP86oombwQfsFRjVDQPaiXsOjSmlosL32LLhsRchu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lyndeno.ca; spf=pass smtp.mailfrom=lyndeno.ca; dkim=pass (2048-bit key) header.d=lyndeno.ca header.i=@lyndeno.ca header.b=B6o8E9vm; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=VWENNb7y; arc=none smtp.client-ip=64.147.123.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lyndeno.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lyndeno.ca Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.west.internal (Postfix) with ESMTP id 9D91B18000A9; Fri, 10 May 2024 22:38:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 10 May 2024 22:38:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyndeno.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1715395117; x= 1715481517; bh=vz1erGw23082AM7aJVdhF7aJINrmP0eysxVIQ7I0X9A=; b=B 6o8E9vmIAyNPlW3Z+rN9kh7BiDzQ22V6Ovz4y7snrC2fQr//DcVPp/5SOdQIKkwc S0Oc1W2+bVka9XphF1XSY3VEfZU6S/8kEA7zmLBXsSxd7Tot4fsNCGidT3Hr7pXQ ifP6USv3rRb2rHze7LYCJMvHkRR2RK9ZbOlxOELHDRODHlq3tYlyMD0ulaMWfWhu hkMUT4AKxcdAGBpISNrYS3UQfQHgsAm64qdhL8Rf+1ZRMAcOjAWUHrWWFnZyl2zl Vxtr2gDTbpFTajQld/+f9w+/Xit8VUkTobexRHTqqF/dzkkUSv31fhcKYaPYvXQG W5GWtNTDemBpETh2coR1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715395117; x= 1715481517; bh=vz1erGw23082AM7aJVdhF7aJINrmP0eysxVIQ7I0X9A=; b=V WENNb7y70GmG+tSlbe9ZAI4JZfw8015djn23giIqTN/q9CNdug9A6oJMl6X2HnkC Zc1qkzxNr6dEeRBTTIt5iQIHKXWfdhuQWHBIvlwrTUS8E+LWBQWGtfO/2UQmTXh1 I8+UisqAWJGsw+eRi5kILKGavmx8Nff6jd1mzzgMuK+2z33jkUUKX8VP0vT30sLD Yt6f5cAdfzURxRZs8Yx7lDausRKasY1GpC5/N1UCWya2thLdvLKgeewT3Ws96ggq F7447iAJR6Dy3ZBX7fVNBWOn3TmC5wzbvFj8A7yyLPP2iZFIMxDm1ldBUKCjkiUE WYYvq6Y3ZxLcdrMGDO4iQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdefledgieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goteeftdduqddtudculdduhedmnecujfgurhephffvvefufffkofgjfhgggfestdekredt redttdenucfhrhhomhepnfihnhguohhnucfurghntghhvgcuoehlshgrnhgthhgvsehlhi hnuggvnhhordgtrgeqnecuggftrfgrthhtvghrnheplefhieffkedtledugfetgfegfeeh hfethffhffeuvefhtdekvdeikeehleejieetnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomheplhhsrghntghhvgeslhihnhguvghnohdrtggr X-ME-Proxy: Feedback-ID: i1719461a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 May 2024 22:38:36 -0400 (EDT) From: Lyndon Sanche To: lsanche@lyndeno.ca Cc: mario.limonciello@amd.com, pali@kernel.org, W_Armin@gmx.de, srinivas.pandruvada@linux.intel.com, ilpo.jarvinen@linux.intel.com, lkp@intel.com, hdegoede@redhat.com, Yijun.Shen@dell.com, Matthew Garrett , Heiner Kallweit , Vegard Nossum , Jonathan Corbet , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Dell.Client.Kernel@dell.com Subject: [PATCH v6 0/2] platform/x86: dell-laptop: Implement platform_profile Date: Fri, 10 May 2024 20:36:50 -0600 Message-ID: <20240511023726.7408-2-lsanche@lyndeno.ca> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240425172758.67831-1-lsanche@lyndeno.ca> References: <20240425172758.67831-1-lsanche@lyndeno.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Some Dell laptops support configuration of preset fan modes through smbios tables. If the platform supports these fan modes, set up platform_profile to change these modes. If not supported, skip enabling platform_profile. v6: - Add ACPI dependency for dell-laptop - Add and use helper symbol for checking supported commands v5: - Fix indent in smbios-thermal-ctl comment - Remove linux/wmi.h include - Add 'select ACPI_PLATFORM_PROFILE' to Dell KConfig v4: - Make thermal_init and thermal_cleanup static - Rearrange order of added includes, did not edit current includes - Include bits.h - Switch comment style - Return error if platform_profile registering failed - Add thermal calls to call_blacklist - Align defines with tabs - Correct separation of function and error handling - Propagate error codes up v3: - Convert smbios-thermal-ctl docs to multiline comment and wrap - Change thermal_mode_bits enum to directly be BIT() values - Convert related code to use this - Use FIELD_GET/PREP and GENNMASK for getting/setting thermal modes - Correct offset for getting current ACC mode, setting offset unchanged - Check if thermal_handler is allocated before freeing and unregistering platform_profile v2: - Wrap smbios-thermal-ctl comment - Return proper error code when invalid state returned - Simplify platform_profile_get returns - Propogate ENOMEM error Lyndon Sanche (2): platform/x86: dell-smbios: Add helper for checking supported commands platform/x86: dell-laptop: Implement platform_profile drivers/platform/x86/dell/Kconfig | 2 + drivers/platform/x86/dell/dell-laptop.c | 242 +++++++++++++++++++ drivers/platform/x86/dell/dell-smbios-base.c | 7 + drivers/platform/x86/dell/dell-smbios.h | 2 + 4 files changed, 253 insertions(+) -- 2.42.0