diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2011-03-21 11:52:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:55:39 -0400 |
commit | 0b159acdd577dfd961ad14177c23e97d3ad33009 (patch) | |
tree | d64a23e926dc056efb619a1f34364d12643c5138 /include/linux/videodev2.h | |
parent | aec67f054205da77f83ba52f83239225d6cbe366 (diff) |
[media] v4l: Add a class and a set of controls for flash devices
Add a control class and a set of controls to support LED and Xenon flash
devices. An example of such a device is the adp1653.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/linux/videodev2.h')
-rw-r--r-- | include/linux/videodev2.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 148d1a51ca22..8b1224c1c536 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1027,6 +1027,7 @@ struct v4l2_ext_controls { | |||
1027 | #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ | 1027 | #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ |
1028 | #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ | 1028 | #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ |
1029 | #define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ | 1029 | #define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ |
1030 | #define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */ | ||
1030 | 1031 | ||
1031 | #define V4L2_CTRL_ID_MASK (0x0fffffff) | 1032 | #define V4L2_CTRL_ID_MASK (0x0fffffff) |
1032 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) | 1033 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
@@ -1429,6 +1430,41 @@ enum v4l2_preemphasis { | |||
1429 | #define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113) | 1430 | #define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113) |
1430 | #define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114) | 1431 | #define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114) |
1431 | 1432 | ||
1433 | /* Flash and privacy (indicator) light controls */ | ||
1434 | #define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900) | ||
1435 | #define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1) | ||
1436 | |||
1437 | #define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1) | ||
1438 | enum v4l2_flash_led_mode { | ||
1439 | V4L2_FLASH_LED_MODE_NONE, | ||
1440 | V4L2_FLASH_LED_MODE_FLASH, | ||
1441 | V4L2_FLASH_LED_MODE_TORCH, | ||
1442 | }; | ||
1443 | |||
1444 | #define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2) | ||
1445 | enum v4l2_flash_strobe_source { | ||
1446 | V4L2_FLASH_STROBE_SOURCE_SOFTWARE, | ||
1447 | V4L2_FLASH_STROBE_SOURCE_EXTERNAL, | ||
1448 | }; | ||
1449 | |||
1450 | #define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3) | ||
1451 | #define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4) | ||
1452 | #define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5) | ||
1453 | |||
1454 | #define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6) | ||
1455 | #define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7) | ||
1456 | #define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8) | ||
1457 | #define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9) | ||
1458 | |||
1459 | #define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10) | ||
1460 | #define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0) | ||
1461 | #define V4L2_FLASH_FAULT_TIMEOUT (1 << 1) | ||
1462 | #define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2) | ||
1463 | #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) | ||
1464 | |||
1465 | #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) | ||
1466 | #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) | ||
1467 | |||
1432 | /* | 1468 | /* |
1433 | * T U N I N G | 1469 | * T U N I N G |
1434 | */ | 1470 | */ |