aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux/v4l2-controls.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/video4linux/v4l2-controls.txt')
-rw-r--r--Documentation/video4linux/v4l2-controls.txt22
1 files changed, 14 insertions, 8 deletions
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt
index cfe52c798d74..676f87366025 100644
--- a/Documentation/video4linux/v4l2-controls.txt
+++ b/Documentation/video4linux/v4l2-controls.txt
@@ -715,14 +715,20 @@ a control of this type whenever the first control belonging to a new control
715class is added. 715class is added.
716 716
717 717
718Proposals for Extensions 718Adding Notify Callbacks
719======================== 719=======================
720
721Sometimes the platform or bridge driver needs to be notified when a control
722from a sub-device driver changes. You can set a notify callback by calling
723this function:
720 724
721Some ideas for future extensions to the spec: 725void v4l2_ctrl_notify(struct v4l2_ctrl *ctrl,
726 void (*notify)(struct v4l2_ctrl *ctrl, void *priv), void *priv);
722 727
7231) Add a V4L2_CTRL_FLAG_HEX to have values shown as hexadecimal instead of 728Whenever the give control changes value the notify callback will be called
724decimal. Useful for e.g. video_mute_yuv. 729with a pointer to the control and the priv pointer that was passed with
730v4l2_ctrl_notify. Note that the control's handler lock is held when the
731notify function is called.
725 732
7262) It is possible to mark in the controls array which controls have been 733There can be only one notify function per control handler. Any attempt
727successfully written and which failed by for example adding a bit to the 734to set another notify function will cause a WARN_ON.
728control ID. Not sure if it is worth the effort, though.