On Sun, 7 Aug 2022 19:56:16 +0100 Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > If CONFIG_PM is not set, the pm_ptr() will ensure that the struct > dev_pm_ops and callbacks are removed without the need for __maybe_unused > markings. > > 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. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > Cc: Andreas Klinger <ak@xxxxxxxxxxxxx> Some consensus reached in the discussion so even though no one gave a tag I feel comfortable taking this one. The suggested follow up change needs hardware to boost confidence that there are no side effects. Applied. Jonathan