Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp800210lqb; Wed, 29 May 2024 10:49:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUS+tlurftXA0M1cCS/5S2gDXXQp/O7LEI55ETNgJYPwPSkL0DgQ6fUpC0Vpl31Ncalx/wMk1f4Fr6Yziw0PHL5a6hzSBteSYFkzj/Npw== X-Google-Smtp-Source: AGHT+IFAcSFvj7G/NuWGR1v9/YQI+tKlo7rtmXYfptxLzw3VnaWYHsLHgWuQoS4DRAKVXotqzm/D X-Received: by 2002:a17:90a:ad84:b0:2bd:85bc:5986 with SMTP id 98e67ed59e1d1-2bf5e137063mr16093653a91.9.1717004958409; Wed, 29 May 2024 10:49:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717004958; cv=pass; d=google.com; s=arc-20160816; b=QyT6fEtip+9LzErVNtdkYDieZtED1ivI4AI8OHzE3m2bz+q5hp3ymrhWTJpckgbmI8 ky4UjNjvpU1GXok5qUoOu/z1UJ3hN/akAkqN3ZRH/6ZmhqLk970JB66FqRTxJxFjr3YR wN6v4nlXTXEHUBO15pbbJpU6mBTaMXE+4he9ELekHkzjlSrsK2CGJCSs0lEcPBUWm1d9 TklBUfWZhsP5249XmcIq3B1cLhHG/4uzhkkp2T/vitiI9KTDzWUSIsiPH8MQ27+ecCSY aPT73bURclrYkvcRt1HZGJkHIRFZpP9A7Pds5FxUucApDYeYRenFpE4DqSw/k3iX+CSE Qd6w== 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=PXl9fO+mKVd+QaDNKbGTKkIfq05G+W/dSXotzP2lPfY=; fh=ZByt/iYHu1QOZew6FibI3Lo6iYJ/4RBCXGCb1CFMWmU=; b=plpkZHurHiyxva5KVg9J0rVFV+qUyFG+6qoMWM/UoOTz1e0L8Q5rCon6kGDf1MqYd/ 1gynFj0meP3EHRRsKYXfcnOI8w//i6Rd/5suQfrNZeqADvXYWBqoFwSVbIUd4HafY5iF ZzlD/DZqx7WZKciTsBYEQGJc2UNAjy0J005yIuGJmUroBn9u6Vyj3fEtXdlUTS6r7z00 gNgDkAnIqxB3MAPpEtybOOWaiD4GH5j0snUDVpTbgJc8CxdTpHclY6cXklt3Zig4jocO VrWWJCTzTl8zs77EhBdH1KWKfuezFkdVT3y7OfrS6pG2T4R4VPxGRPWWiY2nQ8RdoiCv zUww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lyndeno.ca header.s=fm3 header.b=OL3VWOxY; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=j7c0q17r; 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-194533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lyndeno.ca Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a7799c94si68880a91.138.2024.05.29.10.49.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 10:49:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lyndeno.ca header.s=fm3 header.b=OL3VWOxY; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=j7c0q17r; 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-194533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194533-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 05E092857D1 for ; Wed, 29 May 2024 17:49:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A68C41A38D6; Wed, 29 May 2024 17:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lyndeno.ca header.i=@lyndeno.ca header.b="OL3VWOxY"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="j7c0q17r" Received: from wfhigh1-smtp.messagingengine.com (wfhigh1-smtp.messagingengine.com [64.147.123.152]) (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 7A9D91A0B1D; Wed, 29 May 2024 17:49:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717004945; cv=none; b=mKYNzTpaF+3ihtQ7wGFOCrfpsG8kelNAqwYj9LVk3nv6gNmMc3bxelYC/4OtzAnOjHJwB6jWjHi9tWY4lOzvvut2vuq0gW9+D0lis2l5HjFTJjQ+yFo9dwcCAfBfmzU6Xf8WwSauWt+oETGfeXk9Zpuk3Xem74XcbNBvSkHs2l4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717004945; c=relaxed/simple; bh=UyvASCKPhoRBnZoC2uhslJpc1RGyYwlGtJ4JMey614U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rH6XPjW4Dbn2jlxvDg+4q5SlHX89FdTpBJSDhX1KMlv/qxHQG+P5zEL6nOoH/mHr09vbm4+rDxj6nfu4/SGixPdsggiHfrYZogMZ/NDDauCllZW3C9/tXLQPXVgmMObl/M797YIzswSzST70Lu6ne6IDm4HQ9p7GQBGWVjkLapM= 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=OL3VWOxY; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=j7c0q17r; arc=none smtp.client-ip=64.147.123.152 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 compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.west.internal (Postfix) with ESMTP id 4C4D718000B1; Wed, 29 May 2024 13:49:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 29 May 2024 13:49:02 -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=fm3; t=1717004940; x= 1717091340; bh=PXl9fO+mKVd+QaDNKbGTKkIfq05G+W/dSXotzP2lPfY=; b=O L3VWOxY/tNvc/jxoJc+Eof0QI5dIYCCfVruLAJ7aglsJgSA9gQgJLYiQNrB4n82r n6w3Btmj9xnDpdJbO8q9YxolS2Z/u75+BLMT0z96B/9dNuG72/y4ZQ8Df2nlIzT+ zQ9jwo+ZrIyDQiEzo/Twx8zPns1NVkv5F7X9NZTfFTk4t1zwoCgYblrws2rn2eqh Ub6onGcV/lHHriRBvQ383cxgukauoT4rZHdh96yZGkBIknGG52c6Y7cY+XdZZyYd v+i2oTZoHg18L+Pr2LTpWjy5fVgXVidEJDLeKKjD+aCtZI3aco1k+HFGiQQRuJvP XWAh2QGC9gP/w00JAtxtg== 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=fm1; t=1717004940; x= 1717091340; bh=PXl9fO+mKVd+QaDNKbGTKkIfq05G+W/dSXotzP2lPfY=; b=j 7c0q17rRXosah0p0Qm4qSGNJkBCma/iEZUo1KR5lEiq2W1kQPfs1XGDybQk9LveE a74cUq48oxONPDrVoe72wOjcfmvvljEazbCcQWN+NYyK6UfOkUCQKG2FtYam73g+ 2XR9j4WQ8mye2fNM+Et/w2Xef0oLnzRsDErXZecCQNLhMZDoG6TAtLL3balmljMy AnlWWCVmjknuqM3MuQ3RD8H8RjnjsJPzItiCwGCY8HzES9FtBEdAgXx0d7PwYxne G58IhDuxhEkJt1moSlVHKP5WKSjcIzva1pDU3DA49GR5022f+LqJFkmJZX/VfRUn dtQNFPXCqHhfWv6wvsOkg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekuddgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enogetfedtuddqtdduucdludehmdenucfjughrpefhvfevufffkffojghfggfgsedtkeer tdertddtnecuhfhrohhmpefnhihnughonhcuufgrnhgthhgvuceolhhsrghntghhvgeslh ihnhguvghnohdrtggrqeenucggtffrrghtthgvrhhnpeelhfeiffektdeludfgtefggeef hefhtefhhfffueevhfdtkedvieekheeljeeiteenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehlshgrnhgthhgvsehlhihnuggvnhhordgtrg X-ME-Proxy: Feedback-ID: i1719461a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 May 2024 13:48:59 -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 , Vegard Nossum , Randy Dunlap , Heiner Kallweit , AceLan Kao , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com Subject: [PATCH v8 0/3] platform/x86: dell: Implement platform_profile Date: Wed, 29 May 2024 11:47:43 -0600 Message-ID: <20240529174843.13226-1-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 v8: - Rebase all patches against master - dell-pc.c: - Separate <> and "" includes - Align thermal_mode_bits with tabs - Flatten nested ifs - Directly return dell_send_request - Correct some grammar v7: - Move platform_profile into new dell-pc module - Add myself as maintainer of dell-pc - Move smbios call and fill functions to dell-smbios-base - Check for classes above 30 and return as not supported - Rename dell_laptop_check_supported_cmds to dell_smbios_class_is_supported - Check for ENXIO and treat as no thermal modes supported 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 - Propagate ENOMEM error Lyndon Sanche (3): platform/x86: dell-smbios: Add helper for checking supported class platform/x86: dell-smbios: Move request functions for reuse platform/x86: dell-pc: Implement platform_profile MAINTAINERS | 6 + drivers/platform/x86/dell/Kconfig | 13 + drivers/platform/x86/dell/Makefile | 1 + drivers/platform/x86/dell/dell-laptop.c | 23 -- drivers/platform/x86/dell/dell-pc.c | 307 +++++++++++++++++++ drivers/platform/x86/dell/dell-smbios-base.c | 35 +++ drivers/platform/x86/dell/dell-smbios.h | 7 + 7 files changed, 369 insertions(+), 23 deletions(-) create mode 100644 drivers/platform/x86/dell/dell-pc.c -- 2.42.0