Web lists-archives.org

Re: [RFC PATCH 1/8] soc_camera V4L2 driver for directly-connected SoC-based cameras




On Thu, 24 Jan 2008, Trent Piepho wrote:

> On Wed, 23 Jan 2008, Guennadi Liakhovetski wrote:
> > +	switch (ctrl->id) {
> > +	case V4L2_CID_GAIN:
> > +		if (icd->gain == (unsigned short)~0)
> > +			return -EINVAL;
> > +		ctrl->value = icd->gain;
> 
> Why not have icd->ops->get_control handle these cases and avoid the special
> cases?  There isn't any special case code for gain and exposure in the
> s_ctrl function.

My policy was to offload as much functionality as possible in the generic 
module, which also makes implementing new camera drivers easier. With the 
so far implemented two camera drivers these controls were equal, so, I put 
them in soc_camera. But if we ever decide it wasn't a very good idea, for 
example, if a new driver wants to implement it differently, we can always 
move it down to specific drivers again. Makes sense?

Thanks
Guennadi
---
Guennadi Liakhovetski

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list