On Mon, Aug 8, 2022 at 11:35 AM Paul Cercueil <paul@xxxxxxxxxxxxxxx> wrote: > Le lun., août 8 2022 at 11:28:12 +0200, Andy Shevchenko > <andy.shevchenko@xxxxxxxxx> a écrit : > > On Sun, Aug 7, 2022 at 8:46 PM Jonathan Cameron <jic23@xxxxxxxxxx> > > wrote: ... > >> In this case we can't simply use DEFINE_RUNTIME_DEV_PM_OPS() because > >> that would provide suspend and resume functions without the > >> checks the driver is doing before calling runtime_pm functions > >> (whether the necessary GPIO is provided). It may be possible to > >> clean that up in future by moving the checks into the callbacks. > > > > ... > > > >> static const struct dev_pm_ops srf04_pm_ops = { > >> - SET_RUNTIME_PM_OPS(srf04_pm_runtime_suspend, > >> - srf04_pm_runtime_resume, NULL) > >> + RUNTIME_PM_OPS(srf04_pm_runtime_suspend, > >> + srf04_pm_runtime_resume, NULL) > >> }; > > > > static DEFINE_RUNTIME_DEV_PM_OPS(...); > > > > ? > > Read the commit message? Yes, and I'm not sure how that part is relevant. The callbacks won't be called if pm_ptr() equals no-op, no? -- With Best Regards, Andy Shevchenko