media: i2c: ov7251: Reinstate setting ov7251_global_init_setting
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Thu, 17 Feb 2022 14:48:30 +0000 (14:48 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:44 +0000 (16:04 +0000)
"media: i2c: Remove .s_power() from ov7251" removed the call that
sent ov7251_global_init_setting to the sensor. Send it when starting
streaming.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/media/i2c/ov7251.c

index 18f4c28c573e10936a54adee3f517255ad73540d..3ba98ad4850bdd9d5a678f340c6125dd328c35ce 100644 (file)
@@ -1249,6 +1249,14 @@ static int ov7251_s_stream(struct v4l2_subdev *subdev, int enable)
                if (ret < 0)
                        return ret;
 
+               ret = ov7251_set_register_array(ov7251,
+                                       ov7251_global_init_setting,
+                                       ARRAY_SIZE(ov7251_global_init_setting));
+               if (ret < 0) {
+                       dev_err(ov7251->dev, "could not set global_init_setting\n");
+                       goto err_power_down;
+               }
+
                ret = ov7251_pll_configure(ov7251);
                if (ret) {
                        dev_err(ov7251->dev, "error configuring PLLs\n");