All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Magnus Damm <magnus.damm@gmail.com>,
	Kuninori Morimoto <morimoto.kuninori@renesas.com>,
	Alberto Panizzo <maramaopercheseimorto@gmail.com>,
	Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
	Marek Vasut <marek.vasut@gmail.com>
Subject: Re: [RFC PATCH 04/12] mt9m111.c: convert to the control framework.
Date: Mon, 31 Jan 2011 21:50:12 +0100	[thread overview]
Message-ID: <87pqrcyf0b.fsf@free.fr> (raw)
In-Reply-To: <56c1a8ef6e1a5405881611a18579db98e271fb86.1294786597.git.hverkuil@xs4all.nl> (Hans Verkuil's message of "Wed\, 12 Jan 2011 00\:06\:04 +0100")

Hans Verkuil <hverkuil@xs4all.nl> writes:

[zip]

> @@ -1067,6 +968,26 @@ static int mt9m111_probe(struct i2c_client *client,
>  		return -ENOMEM;
>  
>  	v4l2_i2c_subdev_init(&mt9m111->subdev, client, &mt9m111_subdev_ops);
> +	v4l2_ctrl_handler_init(&mt9m111->hdl, 5);
> +	v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,
> +			V4L2_CID_VFLIP, 0, 1, 1, 0);
> +	v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,
> +			V4L2_CID_HFLIP, 0, 1, 1, 0);
> +	v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,
> +			V4L2_CID_AUTO_WHITE_BALANCE, 0, 1, 1, 1);
> +	mt9m111->gain = v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,
> +			V4L2_CID_GAIN, 0, 63 * 2 * 2, 1, 32);
> +	v4l2_ctrl_new_std_menu(&mt9m111->hdl,
> +			&mt9m111_ctrl_ops, V4L2_CID_EXPOSURE_AUTO, 1, 0,
> +			V4L2_EXPOSURE_AUTO);
> +	mt9m111->subdev.ctrl_handler = &mt9m111->hdl;
> +	if (mt9m111->hdl.error) {
> +		int err = mt9m111->hdl.error;
> +
> +		kfree(mt9m111);
> +		return err;
> +	}
> +	mt9m111->gain->is_volatile = 1;

Hi Hans,

I would like to shift all the control initializations into one subfunction,
called from mt9m111_probe(). Right now it's not an issue, but if future
development adds a lot of controls, I'd like the controls initialization to be
gathered in one method.

Apart from that, I have no special comment.

Cheers.

--
Robert

  parent reply	other threads:[~2011-01-31 20:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 23:06 [RFC PATCH 00/12] Converting soc_camera to the control framework Hans Verkuil
2011-01-11 23:06 ` [RFC PATCH 01/12] soc_camera: add control handler support Hans Verkuil
2011-01-11 23:06   ` [RFC PATCH 02/12] sh_mobile_ceu_camera: implement the control handler Hans Verkuil
2011-01-22 20:31     ` Guennadi Liakhovetski
2011-01-25  7:37       ` Hans Verkuil
2011-01-11 23:06   ` [RFC PATCH 03/12] mt9m001: convert to the control framework Hans Verkuil
2011-01-22 21:21     ` Guennadi Liakhovetski
2011-01-23  3:38       ` Kim HeungJun
2011-01-25  8:02         ` Hans Verkuil
2011-01-25  7:54       ` Hans Verkuil
2011-01-11 23:06   ` [RFC PATCH 04/12] mt9m111.c: " Hans Verkuil
2011-01-22 23:45     ` Guennadi Liakhovetski
2011-01-25  7:59       ` Hans Verkuil
2011-01-31 20:50     ` Robert Jarzmik [this message]
2011-01-11 23:06   ` [RFC PATCH 05/12] ov9640: " Hans Verkuil
2011-01-11 23:51     ` Marek Vasut
2011-01-11 23:06   ` [RFC PATCH 06/12] mt9t031: " Hans Verkuil
2011-01-23  0:00     ` Guennadi Liakhovetski
2011-01-11 23:06   ` [RFC PATCH 07/12] mt9v022: " Hans Verkuil
2011-01-11 23:06   ` [RFC PATCH 08/12] ov772x: " Hans Verkuil
2011-01-11 23:06   ` [RFC PATCH 09/12] rj54n1cb0c: " Hans Verkuil
2011-01-11 23:06   ` [RFC PATCH 10/12] ov2640: " Hans Verkuil
2011-01-11 23:06   ` [RFC PATCH 11/12] ov6550: " Hans Verkuil
2011-01-11 23:06   ` [RFC PATCH 12/12] soc_camera: remove the now obsolete controls/num_controls fields Hans Verkuil
2011-01-19 17:49   ` [RFC PATCH 01/12] soc_camera: add control handler support Guennadi Liakhovetski
2011-01-23 19:44     ` Guennadi Liakhovetski
2011-01-25  7:34     ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pqrcyf0b.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=g.liakhovetski@gmx.de \
    --cc=hverkuil@xs4all.nl \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=linux-media@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=maramaopercheseimorto@gmail.com \
    --cc=marek.vasut@gmail.com \
    --cc=morimoto.kuninori@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.