Re: [PATCH v1 2/2] media: i2c: Add GC05A2 image sensor driver

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

 



Hi Zhi,

Thanks for the set.

On Sat, Mar 16, 2024 at 10:52:53AM +0800, Zhi Mao wrote:
> +static int gc05a2_set_ctrl(struct v4l2_ctrl *ctrl)
> +{
> +	struct gc05a2 *gc05a2 =
> +		container_of(ctrl->handler, struct gc05a2, ctrls);
> +	int ret = 0;
> +	s64 exposure_max;
> +	struct v4l2_subdev_state *state;
> +	const struct v4l2_mbus_framefmt *format;
> +
> +	state = v4l2_subdev_get_locked_active_state(&gc05a2->sd);
> +	format = v4l2_subdev_state_get_format(state, 0);
> +
> +	if (ctrl->id == V4L2_CID_VBLANK) {
> +		/* Update max exposure while meeting expected vblanking */
> +		exposure_max = format->height + ctrl->val - GC05A2_EXP_MARGIN;
> +		__v4l2_ctrl_modify_range(gc05a2->exposure,
> +					 gc05a2->exposure->minimum,
> +					 exposure_max, gc05a2->exposure->step,
> +					 exposure_max);
> +	}
> +
> +	/*
> +	 * Applying V4L2 control value only happens
> +	 * when power is on for streaming.
> +	 */
> +	if (!pm_runtime_get_if_in_use(gc05a2->dev))

This should be pm_runtime_get_if_active(). Please assume it takes a single
argument (the device)---see commit
c0ef3df8dbaef51ee4cfd58a471adf2eaee6f6b3.

The same comment applies to the GC08A3 if it uses autosuspend, please post
a new patch for that.

-- 
Kind regards,

Sakari Ailus




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux