How to change clock configurations in the kernel device driver module at jetson TX1 R28.2?

How to change clock configurations in the kernel device driver module at jetson TX1 R28.2?

for example,now i will change “TEGRA210_CLK_CLK_OUT_3” clock rate,How can to do it ?

hello sensor_test,

looks you would like to change the mclk rate of your customize sensor board, please configure this by the mclk_khz properties in the sensor device tree.
besides, you could also adding debug prints in the kernel driver to check whether these parse correctly or not.
for example,

diff --git a/drivers/media/platform/tegra/camera/sensor_common.c b/drivers/media/platform/tegra/camera/sensor_common.c
index 451edba..cef198a 100644
--- a/drivers/media/platform/tegra/camera/sensor_common.c
+++ b/drivers/media/platform/tegra/camera/sensor_common.c
@@ -81,6 +81,8 @@ static int sensor_common_parse_signal_props(
                signal->mclk_freq = 0;
        else
                signal->mclk_freq = value;
        pr_err("DEBUG: %s: mclk_khz= %d\n", __func__, signal->mclk_freq);

hello sensor_test,

may I have the status update, what’s your testing result.
thanks

Hello JerryChang,
I solved this question.

At the imx219.c file,it have a imx219_mclk_enable function.I can define IMX219_DEFAULT_CLK_FREQ value.

static void imx219_mclk_enable(struct camera_common_power_rail *pw)
{
  clk_set_rate(pw->mclk, IMX219_DEFAULT_CLK_FREQ);
  clk_prepare_enable(pw->mclk);
}