media: imx335: Refactor power sequence to set controls
authorUmang Jain <umang.jain@ideasonboard.com>
Tue, 20 Feb 2024 09:28:20 +0000 (14:58 +0530)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 23 Feb 2024 13:33:32 +0000 (14:33 +0100)
commit2d5aea517c195d32ccf73be8543da9d4ec539503
tree5fb9b7eb83647ae6e5d0e19eafaf9669fed11dd2
parenta95253d83297f8c740cad822df4b5288c0c10c04
media: imx335: Refactor power sequence to set controls

Additional controls might require the sensor to be powered up
to set the control value. Currently, only the exposure control
powers up the sensor.

Move the power up sequence out of the switch-case block.
In a subsequent patch, test pattern control will be added that
needs the sensor to be powered up. Hence, refactor the power
sequence to be present outside the switch-case block.

The VBLANK control is also moved out of the switch-case in order
to be handled early on, to propagate the changes to other controls.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/imx335.c