lkml.org 
[lkml]   [2014]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/5] spi: sunxi: Add Allwinner A31 SPI controller driver
On Fri, Jan 31, 2014 at 11:55:50AM +0100, Maxime Ripard wrote:

> + master = devm_spi_alloc_master(&pdev->dev, sizeof(struct sun6i_spi));
> + if (!master) {
> + dev_err(&pdev->dev, "Unable to allocate SPI Master\n");
> + return -ENOMEM;
> + }

This now depends on your other series which as I said doesn't look like
the best approach.

> + 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;
> + }
> + }

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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-01-31 14:01    [W:0.061 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site