diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index ae6a76cb02090ddadf5ad1331a47fd68585cf586..765574b3e0b52b625e927a50045a61f8c2a0ac6e 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -202,6 +202,8 @@ public:
 
 	const V4L2Capability &caps() const { return caps_; }
 
+	int bindContext(unsigned int context);
+
 	int getFormat(V4L2DeviceFormat *format);
 	int tryFormat(V4L2DeviceFormat *format);
 	int setFormat(V4L2DeviceFormat *format);
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 76bdad40ca8d7a024e4644888737371eff1f09fd..a854f3b10201eaa4f643d0e15fc04b3c49fbeffe 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -795,6 +795,24 @@ std::string V4L2VideoDevice::logPrefix() const
 		(V4L2_TYPE_IS_OUTPUT(bufferType_) ? ":out]" : ":cap]");
 }
 
+/**
+ * \brief Bind a video device to a media device context
+ * \param[in] context The file descriptor that identifies the media device
+ * context
+ * \return 0 on success or a negative error code otherwise
+ */
+int V4L2VideoDevice::bindContext(unsigned int context)
+{
+	struct v4l2_context c = {};
+	c.context_fd = context;
+
+	int ret = ioctl(VIDIOC_BIND_CONTEXT, &c);
+	if (ret)
+		LOG(V4L2, Error) << "Unable to bind context: " << strerror(-ret);
+
+	return ret;
+}
+
 /**
  * \brief Retrieve the image format set on the V4L2 video device
  * \param[out] format The image format applied on the video device
