Thread (1 message) 1 message, 1 author, 2016-03-10

Re: [PATCHv2 2/3] spi/spi-xilinx: Add clock support

From: Mark Brown <hidden>
Date: 2016-03-10 03:29:48
Also in: linux-spi

On Wed, Mar 09, 2016 at 02:17:21PM +0530, Shubhrajyoti Datta wrote:
+       xspi->clk = devm_clk_get(&pdev->dev, NULL);
+       if (IS_ERR(xspi->clk)) {
As someone pointed out on the previous version of the series this will
cause the driver to fail to probe with existing DTs.  We probably need
to explicitly handle a -ENOENT as a "this clock will never appear" or
something.

This also requests a single nameless clock but someone pointed out on
the previous version there are multiple clocks into the IP.  Even if
you only want to add one clock right now the clock should probably be
named so we can scale up.
+	}
+	ret = clk_prepare_enable(xspi->clk);
Missing blank line here.
+	if (ret)
+		dev_err(&pdev->dev, "Unable to enable clock.\n");
+
This isn't really checking the return code - if we failed to enable the
clock we should be failing the probe, not just carrying on.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help