Re: [PATCH 2/2] clk: initial clock driver for TWL6030

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

 




<snip>

+static int of_twl6030_clk32kg_probe(struct platform_device *pdev)
+{
+	struct device_node *node = pdev->dev.of_node;
+	struct clk *clk;
+
+	if (!node)
+		return -ENODEV;
+
+	clk = devm_clk_get(&pdev->dev, "clk32kg");
+	if (IS_ERR(clk))
+		return PTR_ERR(clk);
+
+	return clk_prepare(clk);

This is plain wrong as pointed out earlier. The driver that uses the
clock must enable it.

Understood. I'll change it to clk_prepare_enable().

Nono, remove it completely from here. The clock driver should not enable itself by default. The clock itself has some sort of customer somewhere (like am33xx-wifi driver), which should request for the clock and enable it only when needed.

-Tero

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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