Message ID | 1418652071-6396-1-git-send-email-ykaneko0929@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 015760563ec77bf17cec712fa94afdf53b285287 |
Headers | show |
On Mon, Dec 15, 2014 at 11:01:11PM +0900, Yoshihiro Kaneko wrote: > From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com> > > SH-MSIOF driver is enabled autosuspend API of spi framework. > But autosuspend framework doesn't work during initializing. > So runtime PM lock is added in SH-MSIOF driver initializing. Applied, thanks.
Hello. On 12/15/2014 05:01 PM, Yoshihiro Kaneko wrote: > From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com> > SH-MSIOF driver is enabled autosuspend API of spi framework. > But autosuspend framework doesn't work during initializing. > So runtime PM lock is added in SH-MSIOF driver initializing. > Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com> > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> > --- > This patch is based on the for-next branch of Mark Brown's spi tree. > drivers/spi/spi-sh-msiof.c | 5 +++++ > 1 file changed, 5 insertions(+) > diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c > index 3f36540..1405293 100644 > --- a/drivers/spi/spi-sh-msiof.c > +++ b/drivers/spi/spi-sh-msiof.c [...] > @@ -498,6 +500,9 @@ static int sh_msiof_spi_setup(struct spi_device *spi) > if (spi->cs_gpio >= 0) > gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); > > + > + pm_runtime_put_sync(&p->pdev->dev); > + Do you really need the sync version here? WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 3f36540..1405293 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -480,6 +480,8 @@ static int sh_msiof_spi_setup(struct spi_device *spi) struct device_node *np = spi->master->dev.of_node; struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master); + pm_runtime_get_sync(&p->pdev->dev); + if (!np) { /* * Use spi->controller_data for CS (same strategy as spi_gpio), @@ -498,6 +500,9 @@ static int sh_msiof_spi_setup(struct spi_device *spi) if (spi->cs_gpio >= 0) gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); + + pm_runtime_put_sync(&p->pdev->dev); + return 0; }