Morimoto-san, > > + 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() This is for power-off case, right? Wouldn't it be clearer then to add a resume function to pm_ops of the I2C driver which reinit the registers? Doing it before every transfer might be simpler but is also a bit implicit or subtle, I'd think. And for completeness: The above is only for the power-off case. In module-standby (MSTP bits), register values are always retained. Correct? Regards, Wolfram
Attachment:
signature.asc
Description: Digital signature