1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2022 MediaTek Inc.
4 * Author: Garmin Chang <garmin.chang@mediatek.com>
7 #include <linux/clk-provider.h>
8 #include <linux/mod_devicetable.h>
9 #include <linux/platform_device.h>
11 #include <dt-bindings/clock/mediatek,mt8188-clk.h>
16 static const struct mtk_gate_regs adsp_audio26m_cg_regs = {
22 #define GATE_ADSP_FLAGS(_id, _name, _parent, _shift) \
23 GATE_MTK(_id, _name, _parent, &adsp_audio26m_cg_regs, _shift, \
24 &mtk_clk_gate_ops_no_setclr)
26 static const struct mtk_gate adsp_audio26m_clks[] = {
27 GATE_ADSP_FLAGS(CLK_AUDIODSP_AUDIO26M, "audiodsp_audio26m", "clk26m", 3),
30 static const struct mtk_clk_desc adsp_audio26m_desc = {
31 .clks = adsp_audio26m_clks,
32 .num_clks = ARRAY_SIZE(adsp_audio26m_clks),
35 static const struct of_device_id of_match_clk_mt8188_adsp_audio26m[] = {
36 { .compatible = "mediatek,mt8188-adsp-audio26m", .data = &adsp_audio26m_desc },
39 MODULE_DEVICE_TABLE(of, of_match_clk_mt8188_adsp_audio26m);
41 static struct platform_driver clk_mt8188_adsp_audio26m_drv = {
42 .probe = mtk_clk_simple_probe,
43 .remove_new = mtk_clk_simple_remove,
45 .name = "clk-mt8188-adsp_audio26m",
46 .of_match_table = of_match_clk_mt8188_adsp_audio26m,
49 module_platform_driver(clk_mt8188_adsp_audio26m_drv);
50 MODULE_LICENSE("GPL");