public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/15] OMAP3 camera driver: V4L2: Add VIDIOC_G_PRIV_MEM
@ 2008-08-29 23:25 Aguirre Rodriguez, Sergio Alberto
  2008-09-01  7:28 ` Sakari Ailus
  0 siblings, 1 reply; 2+ messages in thread
From: Aguirre Rodriguez, Sergio Alberto @ 2008-08-29 23:25 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org

From: Sakari Ailus <sakari.ailus@nokia.com>
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       |   10 +++++++++-
 include/media/v4l2-int-device.h |    3 +++
 2 files changed, 12 insertions(+), 1 deletion(-)

Index: linux-omap-2.6/include/linux/videodev2.h
===================================================================
--- linux-omap-2.6.orig/include/linux/videodev2.h	2008-08-25 12:19:22.000000000 -0500
+++ linux-omap-2.6/include/linux/videodev2.h	2008-08-25 12:19:24.000000000 -0500
@@ -1352,6 +1352,13 @@
 	__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
  *
@@ -1423,8 +1430,9 @@
 #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
-#define VIDIOC_S_HW_FREQ_SEEK	 _IOW('V', 82, struct v4l2_hw_freq_seek)
+#define VIDIOC_S_HW_FREQ_SEEK	 _IOW('V', 83, struct v4l2_hw_freq_seek)
 
 #ifdef __OLD_VIDIOC_
 /* for compatibility, will go away some day */
Index: linux-omap-2.6/include/media/v4l2-int-device.h
===================================================================
--- linux-omap-2.6.orig/include/media/v4l2-int-device.h	2008-08-25 12:19:10.000000000 -0500
+++ linux-omap-2.6/include/media/v4l2-int-device.h	2008-08-25 12:19:24.000000000 -0500
@@ -208,6 +208,8 @@
 	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,
 
 	/*
 	 *
@@ -285,5 +287,6 @@
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-01  7:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-29 23:25 [PATCH 4/15] OMAP3 camera driver: V4L2: Add VIDIOC_G_PRIV_MEM Aguirre Rodriguez, Sergio Alberto
2008-09-01  7:28 ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox