diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-23 08:15:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-13 15:23:36 -0400 |
commit | 03d5285b8b320994b57b610553cf2b019186b5ba (patch) | |
tree | 7f5554a5570b2125b2e6bb6f4f4db2cc11c7d306 /include/media | |
parent | 117a55b69d36a19028d1c59a737ad1246a0a75ad (diff) |
[media] v4l2-ctrls: Add v4l2_ctrl_[gs]_ctrl_int64()
These helper functions get and set a 64-bit control's value from within
a driver. They are similar to v4l2_ctrl_[gs]_ctrl() but operate on
64-bit integer controls instead of 32-bit controls.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-ctrls.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index 776605f1cbe2..7ef6b27d450f 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h | |||
@@ -511,6 +511,29 @@ s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl); | |||
511 | */ | 511 | */ |
512 | int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val); | 512 | int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val); |
513 | 513 | ||
514 | /** v4l2_ctrl_g_ctrl_int64() - Helper function to get a 64-bit control's value from within a driver. | ||
515 | * @ctrl: The control. | ||
516 | * | ||
517 | * This returns the control's value safely by going through the control | ||
518 | * framework. This function will lock the control's handler, so it cannot be | ||
519 | * used from within the &v4l2_ctrl_ops functions. | ||
520 | * | ||
521 | * This function is for 64-bit integer type controls only. | ||
522 | */ | ||
523 | s64 v4l2_ctrl_g_ctrl_int64(struct v4l2_ctrl *ctrl); | ||
524 | |||
525 | /** v4l2_ctrl_s_ctrl_int64() - Helper function to set a 64-bit control's value from within a driver. | ||
526 | * @ctrl: The control. | ||
527 | * @val: The new value. | ||
528 | * | ||
529 | * This set the control's new value safely by going through the control | ||
530 | * framework. This function will lock the control's handler, so it cannot be | ||
531 | * used from within the &v4l2_ctrl_ops functions. | ||
532 | * | ||
533 | * This function is for 64-bit integer type controls only. | ||
534 | */ | ||
535 | int v4l2_ctrl_s_ctrl_int64(struct v4l2_ctrl *ctrl, s64 val); | ||
536 | |||
514 | /* Internal helper functions that deal with control events. */ | 537 | /* Internal helper functions that deal with control events. */ |
515 | extern const struct v4l2_subscribed_event_ops v4l2_ctrl_sub_ev_ops; | 538 | extern const struct v4l2_subscribed_event_ops v4l2_ctrl_sub_ev_ops; |
516 | void v4l2_ctrl_replace(struct v4l2_event *old, const struct v4l2_event *new); | 539 | void v4l2_ctrl_replace(struct v4l2_event *old, const struct v4l2_event *new); |