lkml.org 
[lkml]   [2019]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/3] spi: dw: Add basic runtime PM support
    Date
    From: Phil Edworthy <phil.edworthy@renesas.com>

    Enable runtime PM so that the clock used to access the registers in the
    peripheral is turned on using a clock domain.

    Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
    Signed-off-by: Gareth Williams <gareth.williams.jx@renesas.com>
    ---
    drivers/spi/spi-dw.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
    index 9a49e07..593bbb0 100644
    --- a/drivers/spi/spi-dw.c
    +++ b/drivers/spi/spi-dw.c
    @@ -10,6 +10,7 @@
    #include <linux/module.h>
    #include <linux/highmem.h>
    #include <linux/delay.h>
    +#include <linux/pm_runtime.h>
    #include <linux/slab.h>
    #include <linux/spi/spi.h>

    @@ -497,6 +498,9 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
    if (dws->set_cs)
    master->set_cs = dws->set_cs;

    + pm_runtime_enable(dev);
    + pm_runtime_get_sync(dev);
    +
    /* Basic HW init */
    spi_hw_init(dev, dws);

    --
    2.7.4
    \
     
     \ /
      Last update: 2019-09-13 14:15    [W:7.262 / U:0.720 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site