clk: mediatek: fix dependency of MT7986 ADC clocks
Subsystems (2)
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
@@ -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
Il 20/10/22 21:52, Daniel Golle ha scritto:
Quoted 7 lines
It seems like
CLK_INFRA_ADC_FRC_CKalways need to be enabled forCLK_INFRA_ADC_26M_CKto work. Instead of adding this dependency to the mtk-thermal andmt6577_auxadcdrivers, add dependency to the clock driverclk-mt7986-infracfg.c.Suggested-by AngeloGioacchino Del Regno <[email protected]>Signed-off-by Daniel Golle <[email protected]>
AngeloGioacchino Del Regno
maintainerIl 20/10/22 21:52, Daniel Golle ha scritto:
Quoted 7 lines
It seems like
CLK_INFRA_ADC_FRC_CKalways need to be enabled forCLK_INFRA_ADC_26M_CKto work. Instead of adding this dependency to the mtk-thermal andmt6577_auxadcdrivers, add dependency to the clock driverclk-mt7986-infracfg.c.Suggested-by AngeloGioacchino Del Regno <[email protected]>Signed-off-by Daniel Golle <[email protected]>
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:
...and retain my reviewed-by tag after that.
Cheers,
Angelo
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.
---
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
@@ -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
Stephen Boyd
maintainerQuoting Daniel Golle (2022-10-26 09:18:07)
Quoted 4 lines
It seems like
CLK_INFRA_ADC_FRC_CKalways need to be enabled forCLK_INFRA_ADC_26M_CKto work. Instead of adding this dependency to the mtk-thermal andmt6577_auxadcdrivers, add dependency to the clock driverclk-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 9 lines · Stephen Boyd
Quoting Daniel Golle (2022-10-26 09:18:07)
Quoted 4 lines
It seems like
CLK_INFRA_ADC_FRC_CKalways need to be enabled forCLK_INFRA_ADC_26M_CKto work. Instead of adding this dependency to the mtk-thermal andmt6577_auxadcdrivers, add dependency to the clock driverclk-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.
Stephen Boyd
maintainerQuoting 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_CKalways need to be enabled forCLK_INFRA_ADC_26M_CKto work. Instead of adding this dependency to the mtk-thermal andmt6577_auxadcdrivers, add dependency to the clock driverclk-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 tomt7986.dtsi.
Thanks! Please include these details next time.
Chen-Yu Tsai
AppliedQuoted 6 lines · Daniel Golle
It seems like
CLK_INFRA_ADC_FRC_CKalways need to be enabled forCLK_INFRA_ADC_26M_CKto work. Instead of adding this dependency to the mtk-thermal andmt6577_auxadcdrivers, add dependency to the clock driverclk-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]>