Hi, Wolfram

> From: Wolfram Sang <wsa+rene...@sang-engineering.com>
> 
> Reported-by: Kuninori Morimoto <kuninori.morimoto...@renesas.com>
> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com>
> ---
>  drivers/i2c/busses/i2c-rcar.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> index 616433d387cdb2..ef26e933b1e9cb 100644
> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
> @@ -612,7 +612,10 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>       if (IS_ERR(priv->io))
>               return PTR_ERR(priv->io);
>  
> +     pm_runtime_enable(dev);
> +     pm_runtime_get_sync(dev);
>       rcar_i2c_init(priv);
> +     pm_runtime_put(dev);

Please correct me if I'm misunderstanding, but in my experience,
above rcar_i2c_init() result can be removed if SoC has power-off feature,
and if IP doesn't keep register value power-off case ?
This case register doesn't keep myfunc_A's setting,
because it calls pm_runtime_put()

     pm_runtime_get_sync()
     myfunc_A()
     pm_runtime_put()
     ...
     pm_runtime_get_sync()
     myfunc_B()
     pm_runtime_put()

It should be this ?

     pm_runtime_get_sync()
     myfunc_A()
     myfunc_B()
     pm_runtime_put()
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to