diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index ad0d53d3ffdd910ec8ed70b08347336f4ca1b93a..f38f06169795751cfd28ae3b349b22993fe6988f 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -3301,6 +3301,45 @@ lens-distortion correction.
+
+ V4L2_CID_3A_LOCK
+ bitmask
+
+
+ This control locks or unlocks the automatic
+focus, exposure and white balance. The automatic adjustments can be paused
+independently by setting the corresponding lock bit to 1. The camera then retains
+the settings until the lock bit is cleared. The following lock bits are defined:
+
+
+
+
+
+
+ V4L2_LOCK_EXPOSURE
+ Automatic exposure adjustments lock.
+
+
+ V4L2_LOCK_WHITE_BALANCE
+ Automatic white balance adjustments lock.
+
+
+ V4L2_LOCK_FOCUS
+ Automatic focus lock.
+
+
+
+
+
+When a given algorithm is not enabled, drivers should ignore requests
+to lock it and should return no error. An example might be an application
+setting bit V4L2_LOCK_WHITE_BALANCE when the
+V4L2_CID_AUTO_WHITE_BALANCE control is set to
+FALSE. The value of this control may be changed
+by exposure, white balance or focus controls.
+
+
+
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index d4dc8ba7b755dddbc35bc370a6378ff0f9b43b11..a47b29270ba3c5c2d0a354e1bf91dd24e69d7402 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -661,6 +661,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_ISO_SENSITIVITY_AUTO: return "ISO Sensitivity, Auto";
case V4L2_CID_EXPOSURE_METERING: return "Exposure, Metering Mode";
case V4L2_CID_SCENE_MODE: return "Scene Mode";
+ case V4L2_CID_3A_LOCK: return "3A Lock";
/* FM Radio Modulator control */
/* Keep the order of the 'case's the same as in videodev2.h! */
@@ -849,6 +850,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
break;
case V4L2_CID_FLASH_FAULT:
case V4L2_CID_JPEG_ACTIVE_MARKER:
+ case V4L2_CID_3A_LOCK:
*type = V4L2_CTRL_TYPE_BITMASK;
break;
case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE:
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 092bf5aaf348e7928b050fe81c5dd89ea6af9f55..a9b03ae440370783b20b12c286dff128468ece30 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1758,6 +1758,11 @@ enum v4l2_scene_mode {
V4L2_SCENE_MODE_TEXT = 13,
};
+#define V4L2_CID_3A_LOCK (V4L2_CID_CAMERA_CLASS_BASE+27)
+#define V4L2_LOCK_EXPOSURE (1 << 0)
+#define V4L2_LOCK_WHITE_BALANCE (1 << 1)
+#define V4L2_LOCK_FOCUS (1 << 2)
+
/* FM Modulator class control IDs */
#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)