Skip to contentSkip to conversation

clk: mediatek: fix dependency of MT7986 ADC clocks

PATCH Superseded Daniel Golle 4 participants 8 messages Oct 20, 2022 – Nov 29, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: mediatek: fix dependency of MT7986 ADC clocks

It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c.

---
 drivers/clk/mediatek/clk-mt7986-infracfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/mediatek/clk-mt7986-infracfg.c +1 -1
index d90727a53283c7..49666047bf0ed5 100644
@@ -153,7 +153,7 @@ static const struct mtk_gate infra_clks[] = {
 		    18),
 	GATE_INFRA1(CLK_INFRA_MSDC_66M_CK, "infra_msdc_66m", "infra_sysaxi_d2",
 		    19),
-	GATE_INFRA1(CLK_INFRA_ADC_26M_CK, "infra_adc_26m", "csw_f26m_sel", 20),
+	GATE_INFRA1(CLK_INFRA_ADC_26M_CK, "infra_adc_26m", "infra_adc_frc", 20),
 	GATE_INFRA1(CLK_INFRA_ADC_FRC_CK, "infra_adc_frc", "csw_f26m_sel", 21),
 	GATE_INFRA1(CLK_INFRA_FBIST2FPC_CK, "infra_fbist2fpc", "nfi1x_sel", 23),
 	/* INFRA2 */
Signature · 1 line
2.38.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Il 20/10/22 21:52, Daniel Golle ha scritto:

Quoted 7 lines

It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c.

#2 lore raw
In reply to Daniel Golle

Il 20/10/22 21:52, Daniel Golle ha scritto:

Quoted 7 lines

It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c.

Sorry, I gave you my Reviewed-by tag, but I've just realized that you're missing a Fixes tag.

Please send a v2 with:

Fixes ec97d23c8e22 ("clk: mediatek: add mt7986 clock support")

...and retain my reviewed-by tag after that.

Cheers,
Angelo

#3 lore raw

PATCH v2 1/1 clk: mediatek: fix dependency of MT7986 ADC clocks

It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c.

Fixes ec97d23c8e22 ("clk: mediatek: add mt7986 clock support")

---
v2: add Fixes: tag

 drivers/clk/mediatek/clk-mt7986-infracfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/mediatek/clk-mt7986-infracfg.c +1 -1
index d90727a53283c7..49666047bf0ed5 100644
@@ -153,7 +153,7 @@ static const struct mtk_gate infra_clks[] = {
 		    18),
 	GATE_INFRA1(CLK_INFRA_MSDC_66M_CK, "infra_msdc_66m", "infra_sysaxi_d2",
 		    19),
-	GATE_INFRA1(CLK_INFRA_ADC_26M_CK, "infra_adc_26m", "csw_f26m_sel", 20),
+	GATE_INFRA1(CLK_INFRA_ADC_26M_CK, "infra_adc_26m", "infra_adc_frc", 20),
 	GATE_INFRA1(CLK_INFRA_ADC_FRC_CK, "infra_adc_frc", "csw_f26m_sel", 21),
 	GATE_INFRA1(CLK_INFRA_FBIST2FPC_CK, "infra_fbist2fpc", "nfi1x_sel", 23),
 	/* INFRA2 */
Signature · 1 line
2.38.1
maintainer
#4 lore raw

Quoting Daniel Golle (2022-10-26 09:18:07)

Quoted 4 lines

It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c.

Is this a cleanup patch? Or a pre-requisite for thermal and auxadc drivers? I don't understand the priority of this patch. Should I apply it to fix a regression?

#5 lore raw
Quoted 9 lines · Stephen Boyd

Quoting Daniel Golle (2022-10-26 09:18:07)

Quoted 4 lines

It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c.

Is this a cleanup patch? Or a pre-requisite for thermal and auxadc drivers? I don't understand the priority of this patch. Should I apply it to fix a regression?

I'd say 'no', as AUXADC and thermal has not yet been added to mt7986a.dtsi, also the corresponding clocks are currently still unused. So while this commit does fix a previous commit, it doesn't have a direct impact and will only matter once thermal and auxadc units are added to mt7986.dtsi.

maintainer
#6 lore raw

Quoting Daniel Golle (2022-10-27 16:24:35)

Quoted 11 lines · Stephen Boyd
Quoted 9 lines

Quoting Daniel Golle (2022-10-26 09:18:07)

Quoted 4 lines

It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c.

Is this a cleanup patch? Or a pre-requisite for thermal and auxadc drivers? I don't understand the priority of this patch. Should I apply it to fix a regression?

Quoted 5 lines

I'd say 'no', as AUXADC and thermal has not yet been added to mt7986a.dtsi, also the corresponding clocks are currently still unused. So while this commit does fix a previous commit, it doesn't have a direct impact and will only matter once thermal and auxadc units are added to mt7986.dtsi.

Thanks! Please include these details next time.

Applied
#7 lore raw
In reply to Daniel Golle
Quoted 6 lines · Daniel Golle

It seems like CLK_INFRA_ADC_FRC_CK always need to be enabled for CLK_INFRA_ADC_26M_CK to work. Instead of adding this dependency to the mtk-thermal and mt6577_auxadc drivers, add dependency to the clock driver clk-mt7986-infracfg.c.

Applied, thanks!

[1/1] clk: mediatek: fix dependency of MT7986 ADC clocks

      commit: a46315295489933209e902638cd287aeb5f982ab

Best regards,

Signature · 1 line
Chen-Yu Tsai <[email protected]>