Re: [PATCH v2 10/10] media: ov772x: avoid accessing registers under power saving mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2018-04-18 21:55 GMT+09:00 jacopo mondi <jacopo@xxxxxxxxxx>:
>> @@ -898,8 +922,20 @@ static int ov772x_s_power(struct v4l2_subdev *sd, int on)
>>       /* If the power count is modified from 0 to != 0 or from != 0 to 0,
>>        * update the power state.
>>        */
>> -     if (priv->power_count == !on)
>> -             ret = on ? ov772x_power_on(priv) : ov772x_power_off(priv);
>> +     if (priv->power_count == !on) {
>> +             if (on) {
>> +                     ret = ov772x_power_on(priv);
>> +                     /* Restore the controls */
>> +                     if (!ret)
>> +                             ret = ov772x_set_params(priv, priv->cfmt,
>> +                                                     priv->win);
>> +                     /* Restore the format and the frame rate */
>> +                     if (!ret)
>> +                             ret = __v4l2_ctrl_handler_setup(&priv->hdl);
>
> frame interval is not listed in the sensor control list, it won't be
> restored if I'm not wrong...

The above two comments were swapped wrongly.  The ov772x_set_params()
actually restores the format, the frame rate.  It restores COM3,
COM8, and BDBASE registers, too.  So calling __v4l2_ctrl_handler_setup()
here is not needed.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux