linux-stable/drivers/clk/mediatek
Alper Nebi Yasak 7f294d10eb clk: mediatek: mt8173-infracfg: Handle unallocated infracfg when module
The MT8173 infracfg clock driver does initialization in two steps, via a
CLK_OF_DECLARE_DRIVER declaration. However its early init function
doesn't get to run when it's built as a module, presumably since it's
not loaded by the time it would have been called by of_clk_init(). This
causes its second-step probe() to return -ENOMEM when trying to register
clocks, as the necessary clock_data struct isn't initialized by the
first step.

MT2701 and MT6797 clock drivers also use this mechanism, but they try to
allocate the necessary clock_data structure if missing in the second
step. Mimic that for the MT8173 infracfg clock as well to make it work
as a module.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/r/20240612201211.91683-1-alpernebiyasak@gmail.com
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 12:06:43 -07:00
..
clk-apmixed.c clk: mediatek: clk-apmixed: Add helper function to unregister ref2usb_tx 2022-09-26 11:13:09 +08:00
clk-cpumux.c clk: mediatek: cpumux: Add a determine_rate hook 2023-06-08 18:39:29 -07:00
clk-cpumux.h clk: mediatek: cpumux: Propagate struct device where possible 2023-01-30 16:45:01 -08:00
clk-fhctl.c clk: mediatek: fhctl: Mark local variables static 2023-04-10 16:57:12 -07:00
clk-fhctl.h clk: mediatek: fhctl: Add support for older fhctl register layout 2023-03-13 11:46:23 -07:00
clk-gate.c clk: mediatek: clk-gate: Propagate struct device with mtk_clk_register_gates() 2023-01-30 16:44:56 -08:00
clk-gate.h clk: mediatek: clk-gate: Propagate struct device with mtk_clk_register_gates() 2023-01-30 16:44:56 -08:00
clk-mt2701-aud.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2701-bdp.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2701-eth.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2701-g3d.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2701-hif.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2701-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2701-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2701-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2701.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712-apmixedsys.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712-bdp.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712-jpgdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712-mfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt2712.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6765-audio.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6765-cam.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6765-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6765-mipi0a.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6765-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6765-vcodec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6765.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779-aud.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779-cam.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779-ipe.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779-mfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6779.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6795-apmixedsys.c clk: mediatek: Convert all remaining drivers to platform_driver's .remove_new() 2023-05-10 14:00:46 -07:00
clk-mt6795-infracfg.c clk: mediatek: Convert all remaining drivers to platform_driver's .remove_new() 2023-05-10 14:00:46 -07:00
clk-mt6795-mfg.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt6795-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6795-pericfg.c clk: mediatek: Convert all remaining drivers to platform_driver's .remove_new() 2023-05-10 14:00:46 -07:00
clk-mt6795-topckgen.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt6795-vdecsys.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt6795-vencsys.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt6797-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6797-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6797-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6797-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt6797.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7622-apmixedsys.c clk: mediatek: mt7622-apmixedsys: Fix an error handling path in clk_mt8135_apmixed_probe() 2024-02-21 20:51:57 -08:00
clk-mt7622-aud.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7622-eth.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7622-hif.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7622-infracfg.c clk: mediatek: Convert all remaining drivers to platform_driver's .remove_new() 2023-05-10 14:00:46 -07:00
clk-mt7622.c clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
clk-mt7629-eth.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7629-hif.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7629.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7981-apmixed.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7981-eth.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7981-infracfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7981-topckgen.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7986-apmixed.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7986-eth.c clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
clk-mt7986-infracfg.c clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
clk-mt7986-topckgen.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7988-apmixed.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7988-eth.c clk: mediatek: add drivers for MT7988 SoC 2024-01-03 15:57:02 -08:00
clk-mt7988-infracfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7988-topckgen.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt7988-xfipll.c clk: mediatek: add drivers for MT7988 SoC 2024-01-03 15:57:02 -08:00
clk-mt8135-apmixedsys.c clk: mediatek: mt8135: Fix an error handling path in clk_mt8135_apmixed_probe() 2024-02-21 20:51:33 -08:00
clk-mt8135.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt8167-apmixedsys.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8167-aud.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8167-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8167-mfgcfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8167-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8167-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8167.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8173-apmixedsys.c clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe() 2024-02-28 17:13:53 -08:00
clk-mt8173-img.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt8173-infracfg.c clk: mediatek: mt8173-infracfg: Handle unallocated infracfg when module 2024-07-08 12:06:43 -07:00
clk-mt8173-mm.c clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
clk-mt8173-pericfg.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt8173-topckgen.c Merge branches 'clk-platform', 'clk-i2c', 'clk-mediatek', 'clk-i2cid' and 'clk-vc5' into clk-next 2023-06-26 08:54:19 -07:00
clk-mt8173-vdecsys.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt8173-vencsys.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt8183-apmixedsys.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-audio.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-cam.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-ipu0.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-ipu1.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-ipu_adl.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-ipu_conn.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-mfgcfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8183.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-apmixedsys.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-cam.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-imp_iic_wrap.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-infra_ao.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-ipe.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-mcu.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mt8186-mdp.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-mfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-topckgen.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8186-wpe.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-adsp_audio26m.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-apmixedsys.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-cam.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-ccu.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-imp_iic_wrap.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-infra_ao.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-ipe.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-mfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-peri_ao.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-topckgen.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-vdo0.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-vdo1.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-vpp0.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-vpp1.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8188-wpe.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-apmixedsys.c clk: mediatek: Convert all remaining drivers to platform_driver's .remove_new() 2023-05-10 14:00:46 -07:00
clk-mt8192-aud.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-cam.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-imp_iic_wrap.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-ipe.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-mdp.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-mfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-msdc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-scp_adsp.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8192.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-apmixedsys.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-apusys_pll.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-cam.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-ccu.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-img.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-imp_iic_wrap.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-infra_ao.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-ipe.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-mfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-peri_ao.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-scp_adsp.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-topckgen.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-vdo0.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-vdo1.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-vpp0.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-vpp1.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8195-wpe.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8365-apmixedsys.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8365-apu.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8365-cam.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8365-mfg.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8365-mm.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8365-vdec.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8365-venc.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8365.c clk: mediatek: Add a module description where missing 2024-06-03 16:24:36 -07:00
clk-mt8516-apmixedsys.c clk: mediatek: Add MODULE_DEVICE_TABLE() where appropriate 2023-03-13 11:50:18 -07:00
clk-mt8516-aud.c clk: Explicitly include correct DT includes 2023-07-19 13:13:16 -07:00
clk-mt8516.c clk: mediatek: Make mtk_clk_simple_remove() return void 2023-05-10 13:36:03 -07:00
clk-mtk.c clk: mediatek: Do a runtime PM get on controllers during probe 2024-04-10 20:50:06 -07:00
clk-mtk.h clk: mediatek: Make mtk_clk_pdev_remove() return void 2023-05-10 13:36:03 -07:00
clk-mux.c clk: mediatek: clk-mux: Support custom parent indices for muxes 2024-01-03 15:55:02 -08:00
clk-mux.h clk: mediatek: clk-mux: Support custom parent indices for muxes 2024-01-03 15:55:02 -08:00
clk-pll.c clk: mediatek: add pcw_chg_bit control for PLLs of MT7988 2024-01-03 15:55:19 -08:00
clk-pll.h clk: mediatek: add pcw_chg_bit control for PLLs of MT7988 2024-01-03 15:55:19 -08:00
clk-pllfh.c clk: mediatek: pllfh: Don't log error for missing fhctl node 2024-04-10 20:50:38 -07:00
clk-pllfh.h clk: mediatek: fhctl: Add support for older fhctl register layout 2023-03-13 11:46:23 -07:00
Kconfig clk: mediatek: add drivers for MT7988 SoC 2024-01-03 15:57:02 -08:00
Makefile clk: mediatek: add drivers for MT7988 SoC 2024-01-03 15:57:02 -08:00
reset.c clk: mediatek: Export required symbols to compile clk drivers as module 2022-09-26 11:13:09 +08:00
reset.h clk: mediatek: reset: Add infra_ao reset support for MT8192/MT8195 2022-06-15 17:24:13 -07:00