Thread (11 messages) 11 messages, 2 authors, 2014-02-04

[PATCH v3 3/5] spi: sunxi: Add Allwinner A31 SPI controller driver

From: broonie@kernel.org (Mark Brown)
Date: 2014-02-04 00:21:29
Also in: linux-devicetree, linux-spi, lkml

On Fri, Jan 31, 2014 at 11:47:04PM +0100, Maxime Ripard wrote:
On Fri, Jan 31, 2014 at 12:48:09PM +0000, Mark Brown wrote:
quoted
On Fri, Jan 31, 2014 at 11:55:50AM +0100, Maxime Ripard wrote:
quoted
quoted
+	pm_runtime_enable(&pdev->dev);
+	if (!pm_runtime_enabled(&pdev->dev)) {
+		ret = sun6i_spi_runtime_resume(&pdev->dev);
+		if (ret) {
+			dev_err(&pdev->dev, "Couldn't resume the device\n");
+			return ret;
+		}
+	}
quoted
No, as discussed don't do this - notice how other drivers aren't written
this way either.  Like I said leave the device powered on startup and
then let it be idled by runtime PM.
Well, some SPI drivers are actually written like that (all the tegra
It's not been done consistently, no - that should be fixed.
SPI drivers for example). It's not an excuse, but waking up the device
only to put it back in suspend right away seems kind of
It isn't awesome, no.  Ideally the runtime PM code would do this but
then you couldn't ifdef the operations which as far as I can tell is the
main thing people want from disabling it and it gets complicated for
devices that genuinely do power up on startup so here we are.
inefficient. Plus, the pm_runtime_idle callback you suggested are
actually calling runtime_idle, while we want to call runtime_suspend.
Yeah, I didn't actually check if I was looking at the right call there.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140204/f016f8c3/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help