From patchwork Thu Jan 23 11:35:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 13948160 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 6B57E20E331 for ; Thu, 23 Jan 2025 11:38:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737632284; cv=none; b=VY0bbU6RfzqTR7QwoKVKZ11Le8zYtZnYGycyZmn+1/p8Xrfecih4+at+w7xb+HfXHfQTlXANk4b1zKlPPhJlfcJz6nTnC9CYQHHiHUGslWUoKQdAjGYYJBVUGe3ruh5q0UCvu1VKDcZy685uHudhb6fdeeDQqcp14WlXFXzUATc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737632284; c=relaxed/simple; bh=1elHtZeKz6sg8Ec3OUJiSdayZG26nY1iLQravuemXyc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=FQ0v4E3nR1iJ9FMIgtqFTJL6zcYerb3s2N9cUOQjW1WLENm8drn/6NaTzSv+UoJFSnKWwXIDdeagliTUWaoDCtURcNFNgKkxUVdxAFOGnRf7JPeN9OLwszz5DtAobtrCydv9jIFjOvF0bDYIfMTiUmh55XexPuVvccT51mSlueg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=x/INv3zS; arc=none smtp.client-ip=209.85.216.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="x/INv3zS" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2efded08c79so1225095a91.0 for ; Thu, 23 Jan 2025 03:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737632281; x=1738237081; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=G5e0D4ceKro9Yb8N26UgxQagAkkEg3LLRP/2T93ftQc=; b=x/INv3zSdogDoqqs3QJA472kZH5DFNV06mEfpskCh/TiC2fqQv/dUe7EpEqns85JLU Smt3Fxz4MlsrcM84IdnNqVwoxaonG8ogVlzY8jbHkwGHeAyNp1NCnYqIPYPR4pT38PPp ZMeqfELdgZ6V7/utpVUqqeYQsiBU6X3Ijj5eJa/ZYkgcitUS/cEWtKZzjwmaN4PWnJlF e+EN9eTYk/yaY4N/LAxLtJ7YRTEZU81UxA+2zUG8iJqwr5Ii7PrhwAWbEtPxqg/LWvNG X/lBwZK9KPxHGF9lyfFSfWGIi7OYkYAUl0n6BrxrMmqRX3H/CWx1RBoooMI3F63ePvrs cBHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737632281; x=1738237081; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G5e0D4ceKro9Yb8N26UgxQagAkkEg3LLRP/2T93ftQc=; b=pkUdEDybdZ5xYUR8C5QuB8VwBo0ozg8WnWNsTuy8apKaxeXhf4ht2HGaK0BbUrFTXq DaxZJIvrCTzV0Alcp/B6jrE6k9NPdGrkvWd3otMNLLKOek3H2DJ7B13UQht0TyCjuATw G0UBbgWOqAqeJZjmE1td2wkBGFHicnBIvr9qs64SVLPGSzIBXTqcpuXRzd4VaY1RnzTw HEhP7BQsUkISETR+WLwxqCmeyC33ZjfeYsbswSTOLBPwpv+vTmfBPhBZpgbBIv15qnP6 WGPEpZOMB7MqwPjZtneNOMifLpc58irCjgWMIZCtKi3A1eroX9JgRBON8iJljFBFb4rZ CpEA== X-Forwarded-Encrypted: i=1; AJvYcCVbuk3ADoyKaTPwfbBUf/N/6oXNb5TAnNXZwC2xqoFy4EM8I+xKj2ioMOIKQyWdCtQ/AFQ=@lists.linux.dev X-Gm-Message-State: AOJu0YxaYcXRLW2vv4A18KbnJsJ0QgOsgVQNclT1E+oluWHFCTyQTO/n 5+1khWcuTNJmdJefB9J+NYvLhvAGJNYVstMhz0cDq5Qn91aiSXflObFNJVchyTY= X-Gm-Gg: ASbGncvXeXYYH1s4Od9V0Sw3I1BJ9EbP2vSl5qGfak5is5PyYs9T4Vii9ToVcr/mcTC s26ZG7VPlm5JmABijrkge8WU+gfLI/3D6/jmwZVcMhS4L/oo+e0U61Igrg5Zs/XqBlXyZMxk5f5 kMsRhHv+HjiZkg38dmh7wm4AjCIu6UE590bHNIpzYSWvWo9r2qEFdd9FpCeaTwhH3hhnPoL6BHU zQYSDpppqendJFG+vY88gDBB1Bwlk8myECscjAWUbQQnS+iic8c9oTTUfB2Q5ObwM9UiLpN9hDc N7WqciM= X-Google-Smtp-Source: AGHT+IGtsIzzGfAcKL/PEpiuES32TcQcp9F7OLmJOeJMP9wYjML8Ng6LAzORWCaFKdsDKOmTsmrEHA== X-Received: by 2002:a17:90b:5206:b0:2f4:f7f8:fc8b with SMTP id 98e67ed59e1d1-2f782d4ed77mr37302192a91.27.1737632280204; Thu, 23 Jan 2025 03:38:00 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f7e6a5e2b2sm3705966a91.3.2025.01.23.03.37.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 03:37:59 -0800 (PST) From: Viresh Kumar To: "Rafael J. Wysocki" , Alyssa Rosenzweig , AngeloGioacchino Del Regno , Broadcom internal kernel review list , Christophe Leroy , Cristian Marussi , Fabio Estevam , Florian Fainelli , Hector Martin , Huacai Chen , Jiaxun Yang , Jonathan Hunter , Kevin Hilman , Madhavan Srinivasan , Markus Mayer , Matthias Brugger , Michael Ellerman , Naveen N Rao , Nicholas Piggin , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Sudeep Holla , Sven Peter , Thierry Reding , Viresh Kumar , WANG Xuerui Cc: linux-pm@vger.kernel.org, Vincent Guittot , arm-scmi@vger.kernel.org, asahi@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-tegra@vger.kernel.org, loongarch@lists.linux.dev Subject: [PATCH 00/33] cpufreq: manage common sysfs attributes from core Date: Thu, 23 Jan 2025 17:05:36 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hello, Most of the drivers add available and boost frequencies related attributes. This patch series tries to avoid duplication and simplify driver's code by managing these from core code. A quick search revealed that only the drivers that set the policy->freq_table field, enable these attributes. Which makes sense as well, since the show_available_freqs() helper works only if the freq_table is present. In order to simplify drivers, create the relevant sysfs files forcefully from cpufreq core. Pushed here: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/core-attr Acked-by: Rafael J. Wysocki --- Viresh Viresh Kumar (33): cpufreq: Always create freq-table related sysfs file cpufreq: dt: Stop setting cpufreq_driver->attr field cpufreq: acpi: Stop setting common freq attributes cpufreq: apple: Stop setting cpufreq_driver->attr field cpufreq: bmips: Stop setting cpufreq_driver->attr field cpufreq: brcmstb: Stop setting common freq attributes cpufreq: davinci: Stop setting cpufreq_driver->attr field cpufreq: e_powersaver: Stop setting cpufreq_driver->attr field cpufreq: elanfreq: Stop setting cpufreq_driver->attr field cpufreq: imx6q: Stop setting cpufreq_driver->attr field cpufreq: kirkwood: Stop setting cpufreq_driver->attr field cpufreq: longhaul: Stop setting cpufreq_driver->attr field cpufreq: loongson: Stop setting cpufreq_driver->attr field cpufreq: mediatek: Stop setting cpufreq_driver->attr field cpufreq: omap: Stop setting cpufreq_driver->attr field cpufreq: p4: Stop setting cpufreq_driver->attr field cpufreq: pasemi: Stop setting cpufreq_driver->attr field cpufreq: pmac: Stop setting cpufreq_driver->attr field cpufreq: powernow: Stop setting cpufreq_driver->attr field cpufreq: powernv: Stop setting common freq attributes cpufreq: qcom: Stop setting cpufreq_driver->attr field cpufreq: qoriq: Stop setting cpufreq_driver->attr field cpufreq: sc520_freq: Stop setting cpufreq_driver->attr field cpufreq: scmi: Stop setting cpufreq_driver->attr field cpufreq: scpi: Stop setting cpufreq_driver->attr field cpufreq: sh: Stop setting cpufreq_driver->attr field cpufreq: spear: Stop setting cpufreq_driver->attr field cpufreq: speedstep: Stop setting cpufreq_driver->attr field cpufreq: tegra: Stop setting cpufreq_driver->attr field cpufreq: vexpress: Stop setting cpufreq_driver->attr field cpufreq: virtual: Stop setting cpufreq_driver->attr field cpufreq: Remove cpufreq_generic_attrs cpufreq: Stop checking for duplicate available/boost freq attributes drivers/cpufreq/acpi-cpufreq.c | 1 - drivers/cpufreq/apple-soc-cpufreq.c | 8 -------- drivers/cpufreq/bmips-cpufreq.c | 1 - drivers/cpufreq/brcmstb-avs-cpufreq.c | 1 - drivers/cpufreq/cpufreq-dt.c | 8 -------- drivers/cpufreq/cpufreq.c | 15 +++++++++++++++ drivers/cpufreq/davinci-cpufreq.c | 1 - drivers/cpufreq/e_powersaver.c | 1 - drivers/cpufreq/elanfreq.c | 1 - drivers/cpufreq/freq_table.c | 8 -------- drivers/cpufreq/imx6q-cpufreq.c | 1 - drivers/cpufreq/kirkwood-cpufreq.c | 1 - drivers/cpufreq/longhaul.c | 1 - drivers/cpufreq/loongson2_cpufreq.c | 1 - drivers/cpufreq/loongson3_cpufreq.c | 1 - drivers/cpufreq/mediatek-cpufreq-hw.c | 1 - drivers/cpufreq/mediatek-cpufreq.c | 1 - drivers/cpufreq/omap-cpufreq.c | 1 - drivers/cpufreq/p4-clockmod.c | 1 - drivers/cpufreq/pasemi-cpufreq.c | 1 - drivers/cpufreq/pmac32-cpufreq.c | 1 - drivers/cpufreq/pmac64-cpufreq.c | 1 - drivers/cpufreq/powernow-k6.c | 1 - drivers/cpufreq/powernow-k7.c | 1 - drivers/cpufreq/powernow-k8.c | 1 - drivers/cpufreq/powernv-cpufreq.c | 2 -- drivers/cpufreq/qcom-cpufreq-hw.c | 7 ------- drivers/cpufreq/qoriq-cpufreq.c | 1 - drivers/cpufreq/sc520_freq.c | 1 - drivers/cpufreq/scmi-cpufreq.c | 8 -------- drivers/cpufreq/scpi-cpufreq.c | 1 - drivers/cpufreq/sh-cpufreq.c | 1 - drivers/cpufreq/spear-cpufreq.c | 1 - drivers/cpufreq/speedstep-centrino.c | 1 - drivers/cpufreq/speedstep-ich.c | 1 - drivers/cpufreq/speedstep-smi.c | 1 - drivers/cpufreq/tegra186-cpufreq.c | 1 - drivers/cpufreq/tegra194-cpufreq.c | 1 - drivers/cpufreq/vexpress-spc-cpufreq.c | 1 - drivers/cpufreq/virtual-cpufreq.c | 1 - include/linux/cpufreq.h | 1 - 41 files changed, 15 insertions(+), 75 deletions(-)