From patchwork Sat Sep 4 11:10:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 4188 Return-path: Envelope-to: mchehab@localhost Delivery-date: Sat, 04 Sep 2010 09:05:59 -0300 Received: from mchehab by localhost with local (Exim 4.72) (envelope-from ) id 1OrrVP-0004KK-3U for mchehab@localhost; Sat, 04 Sep 2010 09:05:59 -0300 Received: from bombadil.infradead.org [18.85.46.34] by localhost with IMAP (fetchmail-6.3.17) for (single-drop); Sat, 04 Sep 2010 09:05:59 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OrqeE-0004uN-VK; Sat, 04 Sep 2010 11:11:03 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753643Ab0IDLKt (ORCPT + 1 other); Sat, 4 Sep 2010 07:10:49 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:49569 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752376Ab0IDLKs (ORCPT ); Sat, 4 Sep 2010 07:10:48 -0400 Received: from tele (unknown [82.245.201.222]) by smtp5-g21.free.fr (Postfix) with ESMTP id 83D79D4805F for ; Sat, 4 Sep 2010 13:10:42 +0200 (CEST) Date: Sat, 4 Sep 2010 13:10:48 +0200 From: Jean-Francois Moine To: linux-media@vger.kernel.org Subject: [PATCH] LED control Message-ID: <20100904131048.6ca207d1@tele> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Mauro Carvalho Chehab Some media devices may have one or many lights (LEDs, illuminators, lamps..). This patch makes them controlable by the applications. Signed-off-by: Jean-Francois Moine Acked-by: Andy Walls diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index 8408caa..c9b8ca5 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml @@ -312,6 +312,13 @@ minimum value disables backlight compensation. information and bits 24-31 must be zero. + V4L2_CID_LEDS + integer + Switch on or off the LED(s) or illuminator(s) of the device. + The control type and values depend on the driver and may be either + a single boolean (0: off, 1:on) or the index in a menu type. + + V4L2_CID_LASTP1 End of the predefined control IDs (currently diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 61490c6..3807492 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -1045,8 +1045,10 @@ enum v4l2_colorfx { #define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36) +#define V4L2_CID_LEDS (V4L2_CID_BASE+37) + /* last CID + 1 */ -#define V4L2_CID_LASTP1 (V4L2_CID_BASE+37) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+38) /* MPEG-class control IDs defined by V4L2 */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)