* [Patch 5/16] OMAP3 camera driver V4L2 g_priv_mem
@ 2008-07-01 4:03 Mohit Jalori
0 siblings, 0 replies; only message in thread
From: Mohit Jalori @ 2008-07-01 4:03 UTC (permalink / raw)
To: video4linux-list
>From 3f9a1f1c20fadcd9fcc4fdb95f70a02a85e0140d Mon Sep 17 00:00:00 2001
From: Sakari Ailus <sakari.ailus@nokia.com>
Date: Thu, 8 May 2008 19:28:18 +0300
Subject: [PATCH] V4L: Add VIDIOC_G_PRIV_MEM
Some devices, for example image sensors, contain settings in their
EEPROM memory that are useful to userspace programs. VIDIOC_G_PRIV_MEM
can be used to read those settings.
This patch adds also the corresponding v4l2_int_device command.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
include/linux/videodev2.h | 8 ++++++++
include/media/v4l2-int-device.h | 3 +++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 29a3e25..15c0f2b 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1370,6 +1370,13 @@ struct v4l2_chip_ident {
__u32 revision; /* chip revision, chip specific */
};
+/* VIDIOC_G_PRIV_MEM */
+struct v4l2_priv_mem {
+ __u32 offset; /* offset to data */
+ __u32 length; /* memory allocated to ptr or read length */
+ void *ptr; /* pointer to allocated memory */
+};
+
/*
* I O C T L C O D E S F O R V I D E O D E V I C E S
*
@@ -1441,6 +1448,7 @@ struct v4l2_chip_ident {
#define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register)
#define VIDIOC_G_CHIP_IDENT _IOWR ('V', 81, struct v4l2_chip_ident)
+#define VIDIOC_G_PRIV_MEM _IOWR ('V', 82, struct v4l2_priv_mem)
#endif
#ifdef __OLD_VIDIOC_
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index 0eda169..fc14264 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -309,6 +309,8 @@ enum v4l2_int_ioctl_num {
vidioc_int_init_num,
/* VIDIOC_INT_G_CHIP_IDENT */
vidioc_int_g_chip_ident_num,
+ /* VIDIOC_INT_G_PRIV_MEM */
+ vidioc_int_g_priv_mem_num,
/*
*
@@ -386,5 +388,6 @@ V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
V4L2_INT_WRAPPER_0(reset);
V4L2_INT_WRAPPER_0(init);
V4L2_INT_WRAPPER_1(g_chip_ident, int, *);
+V4L2_INT_WRAPPER_1(g_priv_mem, struct v4l2_priv_mem, *);
#endif
--
1.5.5.1
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-01 4:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01 4:03 [Patch 5/16] OMAP3 camera driver V4L2 g_priv_mem Mohit Jalori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox