Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp161904lqe; Fri, 5 Apr 2024 17:01:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXsqU+4DJHtzrPCgNIJ++mIQV3RjydZ79X7imTi12wtzPgLLQtEMPW1eemjKe5V6zx4L+tquCK8uohFS4FMerFXSBgwXRBzTZgFwBjfwA== X-Google-Smtp-Source: AGHT+IH0sj5JyckWmt2vEgKVGMSZinUfqq+el1752GKgdrePP6WzOdfQv7Ev7+Ikl63iRxcKIdGK X-Received: by 2002:a17:90b:124f:b0:2a2:c16:d673 with SMTP id gx15-20020a17090b124f00b002a20c16d673mr3202108pjb.36.1712361719306; Fri, 05 Apr 2024 17:01:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712361719; cv=pass; d=google.com; s=arc-20160816; b=CYFZiUi63HTFx5TTrnrmjCwDfGDkHDuwMikQcJwNmN1qOzhSidS8pYx3xYH/1/gfy5 ZrhgHDZmYoRRepVjHKdrdvbfLXB4WwykxkEj8C+WJzDJD6gHefkK2JNbrt2Rz8M6kUfs 7kgUKSzyD/Kq1KNpI0A+gCqMwz4Q3SPKUBeUHZ2+n+YT+4hSMbW5Y9HopVAAXDIRSOX9 hsIDVioGe3n7Ti2ZBa2yo8UR8PL4e57QbxwWEffUWfMj6tvkqL46LMfBk4vy297ixtvp 40a1Rz4zdka6a7wxjKkK72voYD7wRJeUT/RdrV/AiGp7bkczNWahVf1QJ3aLakoSWoMq cS4Q== 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:message-id:date:subject:cc:to :from; bh=+yZ8c+qDM0+OhN+UomyVwokEImIn6pQCIB6nol9v1ZU=; fh=6ItT6a40bb2SjcEub3w2uacgTqy3t+UXXWJueNXo/1w=; b=Z+BTvFLpt/gmBbUY6XC4p02vL31VmX2tF8iFDvO66dm398xboLY9zt7leOnW/FjBQl QbeGw8yNwfPYypTS6uNaO2v0ZnF2suHWdDXWaj3vh0IoAz/XhkWYYtVFfPX2XiLuouOg 13TAb26SIelUXAP8XeE0MxsL3O6FFHvyUaxOQZpm3rmeKxjCKWqPN0dPdQjNZBGmLgnC /usN+85bi7YWPt8F2fmBtMfBq8eFblJT9h6+F2UuXU8VKEgDMB4OBOYwbLE6UZRNxnwp ZjNNjsPru4ny8O9KwmewhmuCvoQgMSAjzZ+8xZg1B4XnKnSpwfSpY9NOfPY1PZhjLV00 Umhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-133723-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133723-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t1-20020a17090ae50100b002a2b752a32esi4725694pjy.1.2024.04.05.17.01.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 17:01:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133723-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-133723-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133723-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu 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 F13FB283BAB for ; Sat, 6 Apr 2024 00:01:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 459981DDF6; Sat, 6 Apr 2024 00:01:51 +0000 (UTC) Received: from irl.hu (irl.hu [95.85.9.111]) (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 17205374E9; Sat, 6 Apr 2024 00:01:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.85.9.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712361710; cv=none; b=QHIoht/tYkifOwk1N+n2GBvCe8VcU2ku+u7ISAZ/NsdBBMRwq9pl8+UugXUIEhTJtPK4Ph2LeNpumE6+hQQOEHhuibsorFYsIBFRjjNgpW1QQYT0Rrf+XIMcojLVl26A2g1l2KLDARiAa77amye0J9lQzl9DiNzdWA8dDk9JOw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712361710; c=relaxed/simple; bh=p6x8emMlb5sgZ91fMZ4D2Et3LnvjKvx11+hGtjrV5vM=; h=From:To:Cc:Subject:Date:Message-ID:Mime-Version:Content-Type; b=blTpMWN/wcaxNlAR06a186HM+uk6I1kiTdgzM160/KrtG5wdTq57c+tI4B1Qp7I9xsJKUvSJJ2seQuJ97jP/pyviMK+BHDPwVBI5kuJD3b/fc/847moWVkSKkhblMQzN+icTAOpcPa0UKBVdkdg/6dc99LVUkE7FNJL35IuCaS0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu; spf=pass smtp.mailfrom=irl.hu; arc=none smtp.client-ip=95.85.9.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=irl.hu Received: from fedori.lan (51b69f53.dsl.pool.telekom.hu [::ffff:81.182.159.83]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 000000000006F985.00000000661090EA.0025D55A; Sat, 06 Apr 2024 02:01:46 +0200 From: Gergo Koteles To: "Rafael J. Wysocki" , Len Brown , Ike Panhc , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Henrique de Moraes Holschuh , Daniel Lezcano , =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Cc: linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Gergo Koteles Subject: [PATCH v5 0/3] switch platform profiles with Lenovo laptops Date: Sat, 6 Apr 2024 02:01:30 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 Hi All, This patch series adds a platform_profile_cycle function to the platform profile module, which allows modules to easily switch between the enabled profiles. Use it in ideapad-laptop and thinkpad-acpi modules. Best regards, Gergo Changes in v5: - use find_next_bit_wrap function to find the next enabled profile instead of multiple ffs calls Changes in v4: - move the cycle to the platform profile module where it can switch between the enabled profiles - add a patch to use it in the thinkpad-acpi module Changes in v3: - add dytc_profile_cycle function Changes in v2: - only switch platform profiles if supported, otherwise keep the behavior. [4]: https://lore.kernel.org/all/cover.1712282976.git.soyer@irl.hu/ [3]: https://lore.kernel.org/all/7c358ad8dd6de7889fa887954145a181501ac362.1712236099.git.soyer@irl.hu/ [2]: https://lore.kernel.org/all/797884d8cab030d3a2b656dba67f3c423cc58be7.1712174794.git.soyer@irl.hu/ [1]: https://lore.kernel.org/all/85254ce8e87570c05e7f04d6507701bef954ed75.1712149429.git.soyer@irl.hu/ Gergo Koteles (3): ACPI: platform-profile: add platform_profile_cycle() platform/x86: ideapad-laptop: switch platform profiles using thermal management key platform/x86: thinkpad_acpi: use platform_profile_cycle() drivers/acpi/platform_profile.c | 39 +++++++++++++++++++++++++++ drivers/platform/x86/ideapad-laptop.c | 7 +++-- drivers/platform/x86/thinkpad_acpi.c | 19 ++----------- include/linux/platform_profile.h | 1 + 4 files changed, 47 insertions(+), 19 deletions(-) base-commit: 39cd87c4eb2b893354f3b850f916353f2658ae6f -- 2.44.0