All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Walls <awalls@md.metrocast.net>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] gspca_cpia1: Add lamp control for Intel Play QX3 microscope
Date: Sun, 05 Sep 2010 10:24:51 +0200	[thread overview]
Message-ID: <4C8353D3.3050708@redhat.com> (raw)
In-Reply-To: <1283476182.17527.4.camel@morgan.silverblock.net>

Hi,

p.s. (forgot to mention this in my previous mail)

On 09/03/2010 03:09 AM, Andy Walls wrote:

<snip>

> @@ -447,6 +449,20 @@
>   		.set = sd_setcomptarget,
>   		.get = sd_getcomptarget,
>   	},
> +	{
> +		{
> +#define V4L2_CID_LAMPS (V4L2_CID_PRIVATE_BASE+1)
> +			.id	 = V4L2_CID_LAMPS,
> +			.type    = V4L2_CTRL_TYPE_MENU,
> +			.name    = "Lamps",
> +			.minimum = 0,
> +			.maximum = 3,
> +			.step    = 1,
> +			.default_value = 0,
> +		},
> +		.set = sd_setlamps,
> +		.get = sd_getlamps,
> +	},
>   };
>
>   static const struct v4l2_pix_format mode[] = {

We only want this control to be available on the qx3 and not on
all cpia1 devices, so you need to add something like the following to
sd_config:

	if (!(id->idVendor == 0x0813 && id->idProduct == 0x0001))
		gspca_dev->ctrl_dis = 1 << LAMPS_IDX;

Where LAMPS_IDX is a define giving the index of V4L2_CID_LAMPS in the
sd_ctrls array, see the ov519 gspca driver for example.

Regards,

Hans

  parent reply	other threads:[~2010-09-05  8:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03  1:09 [PATCH] gspca_cpia1: Add lamp control for Intel Play QX3 microscope Andy Walls
2010-09-03  8:38 ` Jean-Francois Moine
2010-09-03 15:35   ` Andy Walls
2010-09-05  8:03 ` Hans de Goede
2010-09-05 18:02   ` Andy Walls
2010-09-05  8:24 ` Hans de Goede [this message]
2010-09-05 18:30   ` Andy Walls

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=4C8353D3.3050708@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=awalls@md.metrocast.net \
    --cc=linux-media@vger.kernel.org \
    /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.