Hi Niklas, Kieran, On Wed, Nov 25, 2020 at 2:40 PM Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> wrote: > On 2020-11-25 13:09:39 +0000, Kieran Bingham wrote: > > On 22/11/2020 16:36, Niklas Söderlund wrote: > > > This series enables usage of the ADV748x after the system have been > > > suspended to ram. During s2ram the ADV748x may be powered down and thus > > > lose its configuration from probe time. The configuration contains > > > among other things the i2c slave address mappings for the different > > > blocks inside the ADV748x. If this is lost the hardware listens to the > > > "wrong" i2c addresses and becomes inaccessible. > > > > > > Example trying to read the analog standard before and after s2ram with > > > and without this this series. > > > > Should we be considering runtime_pm for this instead? > > I don't think so, why do you think we should? > > I opted for this solution because we need fine grain control of when the > registers are restored when resuming from s2ram. If they are not > restored before (in my case) the VIN driver is resumed and it was > streaming at suspend time it will fail as the i2c address map is wrong > at this time. For this reason the registers are restored in the early > resume callback. > > Second I'm unsure how we could properly test such a solution as I don't > think we can powerdown the ADV7482 without also s2ram the whole SoC on > our test platforms as it's power is not controllable by the SoC. For > example it's not powered down in s2idel. Also, there is no need to reset the ADV7482 every time it is runtime-resumed. In fact such needless reset may impact performance, as runtime-resume happens much more frequently than system resume during the system's lifetime. 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