clk: rockchip: add clock output/input switch driver
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 clk: rockchip: add clock output/input switch driver
Add a small driver for the Rockchip GRF-controlled clock output/input switch. It exposes a single gate bit as a clock, allowing the SAI MCLK pin direction to be controlled through the clock framework.
Tested on an RK3506B board with the ES8388 codec: this clock drives the I2S MCLK and audio playback works.
--- drivers/clk/rockchip/Kconfig | 8 ++++ drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-out.c | 70 ++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 drivers/clk/rockchip/clk-out.c
drivers/clk/rockchip/Kconfig +8 -0
@@ -156,4 +156,12 @@ config CLK_RK3588 help Build the driver for RK3588 Clock Driver. +config ROCKCHIP_CLK_OUT + tristate "Rockchip clock output/input switch" + help + Say Y or M here to enable the Rockchip clock output/input switch + driver. It exposes a GRF-controlled clock gate used for the SAI + MCLK output pins. The pin direction is controlled through the + common clock framework. + endif
drivers/clk/rockchip/Makefile +1 -0
@@ -4,6 +4,7 @@ # obj-$(CONFIG_COMMON_CLK_ROCKCHIP) += clk-rockchip.o +obj-$(CONFIG_ROCKCHIP_CLK_OUT) += clk-out.o clk-rockchip-y += clk.o clk-rockchip-y += clk-pll.o
drivers/clk/rockchip/clk-out.c new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.47.3
Quoted 8 lines · ZhuXiangyu
Add a small driver for the Rockchip GRF-controlled clock output/input switch. It exposes a single gate bit as a clock, allowing the SAI MCLK pin direction to be controlled through the clock framework.
Tested on an RK3506B board with the ES8388 codec: this clock drives the I2S MCLK and audio playback works.
Tested-by ZhuXiangyu <[email protected]>
No, this makes no sense. Please do not invent own stuff, like author-testing-tags. Look how other people did it.
Quoted 2 lines
Signed-off-by ZhuXiangyu <[email protected]>---
Best regards,
Krzysztof