diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-01-02 06:17:24 +0100 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2024-02-16 18:30:57 +0100 |
commit | 57e2b067f19b8de616d1e849ce3786df602bfe7f (patch) | |
tree | 229ec4299ad232bd0abc6ef7e37cf287636dcdde /drivers/soc | |
parent | dt-bindings: soc: qcom: qcom,saw2: define optional regulator node (diff) | |
download | linux-57e2b067f19b8de616d1e849ce3786df602bfe7f.tar.xz linux-57e2b067f19b8de616d1e849ce3786df602bfe7f.zip |
soc: qcom: spm: remove driver-internal structures from the driver API
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>
Link: https://lore.kernel.org/r/20240102-saw2-spm-regulator-v7-4-0472ec237f49@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/spm.c | 20 |
1 files changed, 20 insertions, 0 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, |