This patch set is to make clock voting optinal for adsp bypass
sc7280 platforms.
Changes Since V4:
-- Fix the improper device node variable usage.
-- Optimize the code by removing redundant private
variant data structure variable "is_clk_optional".
Changes Since V3:
-- Revert compatible type change in dt bindings.
-- Update boolean flag description in dt bindings.
-- Drop redundant clock optional flag initialization.
-- Remove redundant if check.
Changes Since V2:
-- Remove redundant lpi pincontrol variant data structure and
compatible entry.
-- Add adsp bypass mode boolean param check.
-- Remove compatible name in dt bindings.
-- Update dt binding bypass mode boolean param.
Changes Since V1:
-- Update commit message.
Srinivasa Rao Mandadapu (2):
dt-bindings: pinctrl: qcom: sc7280: Add boolean param for ADSP bypass
platforms
pinctrl: qcom: sc7280: Add clock optional check for ADSP bypass
targets
.../devicetree/bindings/pinctrl/qcom,sc7280-lpass-lpi-pinctrl.yaml | 5 +++++
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 2 +-
drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 1 -
drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 1 -
4 files changed, 6 insertions(+), 3 deletions(-)
--
2.7.4
Update lpass lpi pin control driver, with clock optional check for ADSP
disabled platforms. This check required for distingushing ADSP based
platforms and ADSP bypass platforms.
In case of ADSP enabled platforms, where audio is routed through ADSP
macro and decodec GDSC Switches are triggered as clocks by pinctrl
driver and ADSP firmware controls them. So It's mandatory to enable
them in ADSP based solutions.
In case of ADSP bypass platforms clock voting is optional as these macro
and dcodec GDSC switches are maintained as power domains and operated from
lpass clock drivers.
Remove redundant private data variable is_clk_optional.
Signed-off-by: Srinivasa Rao Mandadapu <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
---
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 2 +-
drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 1 -
drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
index 74810ec..e97ce45 100644
--- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
@@ -401,7 +401,7 @@ int lpi_pinctrl_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(pctrl->slew_base),
"Slew resource not provided\n");
- if (data->is_clk_optional)
+ if (of_property_read_bool(dev->of_node, "qcom,adsp-bypass-mode"))
ret = devm_clk_bulk_get_optional(dev, MAX_LPI_NUM_CLKS, pctrl->clks);
else
ret = devm_clk_bulk_get(dev, MAX_LPI_NUM_CLKS, pctrl->clks);
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h
index 759d5d8..afbac2a 100644
--- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h
+++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h
@@ -77,7 +77,6 @@ struct lpi_pinctrl_variant_data {
int ngroups;
const struct lpi_function *functions;
int nfunctions;
- bool is_clk_optional;
};
int lpi_pinctrl_probe(struct platform_device *pdev);
diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
index 2add9a4..d615b6c5 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
@@ -141,7 +141,6 @@ static const struct lpi_pinctrl_variant_data sc7280_lpi_data = {
.ngroups = ARRAY_SIZE(sc7280_groups),
.functions = sc7280_functions,
.nfunctions = ARRAY_SIZE(sc7280_functions),
- .is_clk_optional = true,
};
static const struct of_device_id lpi_pinctrl_of_match[] = {
--
2.7.4