Re: [PATCH 1/4] drivers: clk: qcom: Add msm8992 GCC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/05/2020 18:46, Konrad Dybcio wrote:

+static struct clk_fixed_factor xo = {
+	.mult = 1,
+	.div = 1,
+	.hw.init = &(struct clk_init_data)
+	{
+		.name = "xo",
+		.parent_names = (const char *[]) { "xo_board" },
+		.num_parents = 1,
+		.ops = &clk_fixed_factor_ops,
+	},
+};

I think you can drop that, and use the DTS definition.

xo_board: xo_board {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <19200000>;
};

sleep_clk: sleep_clk {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <32768>;
};

clock_gcc: clock-controller@fc400000 {
    compatible = "qcom,gcc-msm8994";
    #clock-cells = <1>;
    #reset-cells = <1>;
    #power-domain-cells = <1>;
    reg = <0xfc400000 0x2000>;

+    clock-names = "xo",
+                  "sleep_clk";
+    clocks = <&xo_board>,
+             <&sleep_clk>;

};


+static int gcc_msm8992_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct clk *clk;
+
+	clk = devm_clk_register(dev, &xo.hw);
+	if (IS_ERR(clk))
+		return PTR_ERR(clk);

You should drop this too.


+MODULE_ALIAS("platform:gcc-msm8992");

and that.

---
bod




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux