Hi Andy, On Sat, Jul 2, 2022 at 1:51 PM Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > On Fri, Jul 01, 2022 at 05:39:16PM +0100, Phil Edworthy wrote: > > Yet another i2c controller from Renesas that is found on the RZ/V2M > > (r9a09g011) SoC. It can support only 100kHz and 400KHz operation. > > > +static int rzv2m_i2c_suspend(struct device *dev) > > +{ > > + struct rzv2m_i2c_priv *priv = dev_get_drvdata(dev); > > > + pm_runtime_get_sync(dev); pm_runtime_resume_and_get() ;-) > > Isn't guaranteed by the runtime PM that device is runtime powered on the system > suspend? No, as this is a system sleep callback. > > > + bit_clrl(priv->base + IICB0CTL0, IICB0IICE); > > + pm_runtime_put(dev); > > + > > + return 0; > > +} > > ... > > > +static int rzv2m_i2c_resume(struct device *dev) > > +{ > > + struct rzv2m_i2c_priv *priv = dev_get_drvdata(dev); > > + int ret; > > + > > + ret = rzv2m_i2c_clock_calculate(dev, priv); > > + if (ret < 0) > > + return ret; > > + > > + pm_runtime_get_sync(dev); pm_runtime_resume_and_get() ;-) > > I'm not sure how it's suppose to work. Isn't it a no-op here? No, as this is a system sleep callback. > > > + rzv2m_i2c_init(priv); > > + pm_runtime_put(dev); > > + > > + return 0; > > +} Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds