Hi Niklas, Thank you for the patch. On Thu, Jul 03, 2025 at 10:52:17PM +0200, Niklas Söderlund wrote: > The device initialization code resets the whole device, thus the initial > controls set at probe are lost as adv7180_init_controls() are called > before init_device(). Additionally the controls where never restored s/where/were/ > after the device where reset coming back from suspend. > > Solve this by separate the setup of the controls from the creation of > them, and always set them up when the device is reset. > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx> > --- > drivers/media/i2c/adv7180.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c > index c2a79eba4dcd..3c7c896a21a4 100644 > --- a/drivers/media/i2c/adv7180.c > +++ b/drivers/media/i2c/adv7180.c > @@ -700,7 +700,6 @@ static int adv7180_init_controls(struct adv7180_state *state) > v4l2_ctrl_handler_free(&state->ctrl_hdl); > return err; > } > - v4l2_ctrl_handler_setup(&state->ctrl_hdl); > > return 0; > } > @@ -911,6 +910,8 @@ static int init_device(struct adv7180_state *state) > > adv7180_set_field_mode(state); > > + __v4l2_ctrl_handler_setup(&state->ctrl_hdl); > + > /* register for interrupts */ > if (state->irq > 0) { > /* config the Interrupt pin to be active low */ -- Regards, Laurent Pinchart