From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Andy Gross <agross@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: [PATCH v7 04/22] soc: qcom: spm: remove driver-internal structures from the driver API
Date: Tue, 02 Jan 2024 07:17:24 +0200 [thread overview]
Message-ID: <20240102-saw2-spm-regulator-v7-4-0472ec237f49@linaro.org> (raw)
In-Reply-To: <20240102-saw2-spm-regulator-v7-0-0472ec237f49@linaro.org>
Move internal SPM driver structures to the driver itself, removing them
from the public API. The CPUidle driver doesn't use them at all.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/soc/qcom/spm.c | 20 ++++++++++++++++++++
include/soc/qcom/spm.h | 23 +----------------------
2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
index 2f0b1bfe7658..b15435f7cb0d 100644
--- a/drivers/soc/qcom/spm.c
+++ b/drivers/soc/qcom/spm.c
@@ -36,6 +36,26 @@ enum spm_reg {
SPM_REG_NR,
};
+#define MAX_PMIC_DATA 2
+#define MAX_SEQ_DATA 64
+
+struct spm_reg_data {
+ const u16 *reg_offset;
+ u32 spm_cfg;
+ u32 spm_dly;
+ u32 pmic_dly;
+ u32 pmic_data[MAX_PMIC_DATA];
+ u32 avs_ctl;
+ u32 avs_limit;
+ u8 seq[MAX_SEQ_DATA];
+ u8 start_index[PM_SLEEP_MODE_NR];
+};
+
+struct spm_driver_data {
+ void __iomem *reg_base;
+ const struct spm_reg_data *reg_data;
+};
+
static const u16 spm_reg_offset_v4_1[SPM_REG_NR] = {
[SPM_REG_AVS_CTL] = 0x904,
[SPM_REG_AVS_LIMIT] = 0x908,
diff --git a/include/soc/qcom/spm.h b/include/soc/qcom/spm.h
index 4951f9d8b0bd..5b263c685812 100644
--- a/include/soc/qcom/spm.h
+++ b/include/soc/qcom/spm.h
@@ -7,11 +7,6 @@
#ifndef __SPM_H__
#define __SPM_H__
-#include <linux/cpuidle.h>
-
-#define MAX_PMIC_DATA 2
-#define MAX_SEQ_DATA 64
-
enum pm_sleep_mode {
PM_SLEEP_MODE_STBY,
PM_SLEEP_MODE_RET,
@@ -20,23 +15,7 @@ enum pm_sleep_mode {
PM_SLEEP_MODE_NR,
};
-struct spm_reg_data {
- const u16 *reg_offset;
- u32 spm_cfg;
- u32 spm_dly;
- u32 pmic_dly;
- u32 pmic_data[MAX_PMIC_DATA];
- u32 avs_ctl;
- u32 avs_limit;
- u8 seq[MAX_SEQ_DATA];
- u8 start_index[PM_SLEEP_MODE_NR];
-};
-
-struct spm_driver_data {
- void __iomem *reg_base;
- const struct spm_reg_data *reg_data;
-};
-
+struct spm_driver_data;
void spm_set_low_power_mode(struct spm_driver_data *drv,
enum pm_sleep_mode mode);
--
2.39.2
next prev parent reply other threads:[~2024-01-02 5:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 5:17 [PATCH v7 00/22] soc: qcom: spm: add support for SPM regulator Dmitry Baryshkov
2024-01-02 5:17 ` [PATCH v7 01/22] dt-bindings: soc: qcom: merge qcom,saw2.txt into qcom,spm.yaml Dmitry Baryshkov
2024-01-02 5:17 ` [PATCH v7 02/22] dt-bindings: soc: qcom: qcom,saw2: add missing compatible strings Dmitry Baryshkov
2024-01-02 21:58 ` Krzysztof Kozlowski
2024-01-02 5:17 ` [PATCH v7 03/22] dt-bindings: soc: qcom: qcom,saw2: define optional regulator node Dmitry Baryshkov
2024-01-02 5:17 ` Dmitry Baryshkov [this message]
2024-01-02 5:17 ` [PATCH v7 05/22] soc: qcom: spm: add support for voltage regulator Dmitry Baryshkov
2024-01-02 17:15 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 06/22] ARM: dts: qcom: apq8084: use new compat string for L2 SAW2 unit Dmitry Baryshkov
2024-01-02 17:06 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 07/22] ARM: dts: qcom: msm8974: " Dmitry Baryshkov
2024-01-02 17:06 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 08/22] ARM: dts: qcom: msm8960: use SoC-specific compatibles for SAW2 devices Dmitry Baryshkov
2024-01-02 17:06 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 09/22] ARM: dts: qcom: ipq4019: " Dmitry Baryshkov
2024-01-02 17:07 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 10/22] ARM: dts: qcom: ipq8064: " Dmitry Baryshkov
2024-01-02 17:07 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 11/22] ARM: dts: qcom: apq8064: rename SAW nodes to power-manager Dmitry Baryshkov
2024-01-02 5:17 ` [PATCH v7 12/22] ARM: dts: qcom: apq8084: " Dmitry Baryshkov
2024-01-02 17:07 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 13/22] ARM: dts: qcom: msm8960: " Dmitry Baryshkov
2024-01-02 17:07 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 14/22] ARM: dts: qcom: msm8974: " Dmitry Baryshkov
2024-01-02 17:07 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 15/22] ARM: dts: qcom: ipq4019: " Dmitry Baryshkov
2024-01-02 17:08 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 16/22] ARM: dts: qcom: ipq8064: " Dmitry Baryshkov
2024-01-02 17:08 ` Konrad Dybcio
2024-01-02 5:17 ` [PATCH v7 17/22] ARM: dts: qcom: apq8064: declare SAW2 regulators Dmitry Baryshkov
2024-01-02 5:17 ` [PATCH v7 18/22] ARM: dts: qcom: msm8960: " Dmitry Baryshkov
2024-01-02 5:17 ` [PATCH v7 19/22] ARM: dts: qcom: apq8084: drop 'regulator' property from SAW2 device Dmitry Baryshkov
2024-01-02 5:17 ` [PATCH v7 20/22] ARM: dts: qcom: msm8974: " Dmitry Baryshkov
2024-01-02 5:17 ` [PATCH v7 21/22] ARM: dts: qcom: ipq4019: drop 'regulator' property from SAW2 devices Dmitry Baryshkov
2024-01-02 5:17 ` [PATCH v7 22/22] ARM: dts: qcom: ipq8064: " Dmitry Baryshkov
2024-02-16 23:10 ` (subset) [PATCH v7 00/22] soc: qcom: spm: add support for SPM regulator Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240102-saw2-spm-regulator-v7-4-0472ec237f49@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).