"Unable to get clock cam-mclk1"

I’m trying to port my LI_M021C_MIPI camera driver to r28.1. I made the changes necessary to make it compile with the new Kernel, but when I boot up the probe fails in my power_get function with the error “Unable to get clock cam-mclk1”

Here is the offending code, it seems identical to the ov5693.c driver’s power_get function.

mclk_name = priv->pdata->mclk_name ? priv->pdata->mclk_name : "cam_mclk1";
    pw->mclk = devm_clk_get(&priv->i2c_client->dev, mclk_name);
    if (IS_ERR(pw->mclk))
    {
        dev_err(&priv->i2c_client->dev, "unable to get clock %s\n", mclk_name);
        return PTR_ERR(pw->mclk);
    }

Has anyone else run into this error? The device tree seems to have changed around a bit, but I thought I had everything plugged in correctly.

Reference to the tegra210-jetson-cv-camera-e3326-a00.dtsi to add the cam_mclk1 to your device tree.

host1x {
		i2c@546c0000 {
			ov5693_c@36 {
				/* Define any required hw resources needed by driver */
				/* ie. clocks, io pins, power sources */
				/* mclk-index indicates the index of the */
				/* mclk-name with in the clock-names array */

				clocks = <&tegra_car TEGRA210_CLK_ID_CLK_OUT_3>;
				clock-names = "mclk";
				clock-frequency = <24000000>;

				mclk = "cam_mclk1";
				reset-gpios = <&gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
				pwdn-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
				vana-supply = <&en_vdd_cam_hv_2v8>;
				vif-supply = <&en_vdd_cam>;
			};
		};
	};

That clock info was hiding in another file so I didn’t see it, thanks Shane!

Here’s what I added to make it work.

/* input clock for the device*/
clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
clock-names = "cam_mclk1";
clock-frequency = <24000000>;
mclk = "cam_mclk1";