summaryrefslogtreecommitdiff
path: root/linux/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-15 12:12:36 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-15 12:12:36 -0300
commitd8006eead13b16a2cd2fbaa0bcf07a6944798344 (patch)
tree63e2ee9c61fbba1f9e3c2fe3b20ee20c04a8b67a /linux/include/media
parent0b19553adedb9b1ee222def2c7d8e3e748038d31 (diff)
downloadmediapointer-dvb-s2-d8006eead13b16a2cd2fbaa0bcf07a6944798344.tar.gz
mediapointer-dvb-s2-d8006eead13b16a2cd2fbaa0bcf07a6944798344.tar.bz2
> Please, re-generate the affected V4L/DVB patches, without the PXA part. I'll
> keep those changes on hold, until I get a confirmation that the PXA side is > committed on mainstream. Reverted several changes on soc_camera From: Mauro Carvalho Chehab <mchehab@infradead.org> As asked by Guennadi: Mauro, please, drop commits 2f4a87873f13924871d7bb82e27d02d0e16fbe02 and 9b7d577c508e7765860e599c0e98d4ac3fbaa2aa from your tree and replace 5f1e5244ee6b9f139a262d5e7a930a41488afbbe with the version below. Due to that change, that happened on v4l-dvb -git tree, several patches broke. This patch reverts all broken stuff, keeping this tree in sync with v4l-dvb -git tree. I'm waiting for Guennadi to fix the broken patches and ask me to pull them again. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/include/media')
-rw-r--r--linux/include/media/soc_camera.h72
1 files changed, 21 insertions, 51 deletions
diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h
index 6a8c8be7a..c886b1e64 100644
--- a/linux/include/media/soc_camera.h
+++ b/linux/include/media/soc_camera.h
@@ -34,12 +34,12 @@ struct soc_camera_device {
unsigned short exposure;
unsigned char iface; /* Host number */
unsigned char devnum; /* Device number per host */
- unsigned char buswidth; /* See comment in .c */
+ unsigned char cached_datawidth; /* See comment in .c */
struct soc_camera_ops *ops;
struct video_device *vdev;
const struct soc_camera_data_format *current_fmt;
- const struct soc_camera_data_format *formats;
- int num_formats;
+ int (*probe)(struct soc_camera_device *icd);
+ void (*remove)(struct soc_camera_device *icd);
struct module *owner;
/* soc_camera.c private count. Only accessed with video_lock held */
int use_count;
@@ -48,7 +48,6 @@ struct soc_camera_device {
struct soc_camera_file {
struct soc_camera_device *icd;
struct videobuf_queue vb_vidq;
- spinlock_t *lock;
};
struct soc_camera_host {
@@ -57,25 +56,17 @@ struct soc_camera_host {
unsigned char nr; /* Host number */
size_t msize;
struct videobuf_queue_ops *vbq_ops;
+ struct module *owner;
void *priv;
char *drv_name;
- struct soc_camera_host_ops *ops;
-};
-
-struct soc_camera_host_ops {
- struct module *owner;
int (*add)(struct soc_camera_device *);
void (*remove)(struct soc_camera_device *);
- int (*set_fmt_cap)(struct soc_camera_device *, __u32,
- struct v4l2_rect *);
- int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *);
+ int (*set_capture_format)(struct soc_camera_device *, __u32,
+ struct v4l2_rect *);
+ int (*try_fmt_cap)(struct soc_camera_host *, struct v4l2_format *);
int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *);
int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
- int (*try_bus_param)(struct soc_camera_device *, __u32);
- int (*set_bus_param)(struct soc_camera_device *, __u32);
unsigned int (*poll)(struct file *, poll_table *);
- spinlock_t* (*spinlock_alloc)(struct soc_camera_file *);
- void (*spinlock_free)(spinlock_t *);
};
struct soc_camera_link {
@@ -95,7 +86,8 @@ static inline struct soc_camera_host *to_soc_camera_host(struct device *dev)
return container_of(dev, struct soc_camera_host, dev);
}
-extern int soc_camera_host_register(struct soc_camera_host *ici);
+extern int soc_camera_host_register(struct soc_camera_host *ici,
+ struct module *owner);
extern void soc_camera_host_unregister(struct soc_camera_host *ici);
extern int soc_camera_device_register(struct soc_camera_device *icd);
extern void soc_camera_device_unregister(struct soc_camera_device *icd);
@@ -112,27 +104,26 @@ struct soc_camera_data_format {
struct soc_camera_ops {
struct module *owner;
- int (*probe)(struct soc_camera_device *);
- void (*remove)(struct soc_camera_device *);
int (*init)(struct soc_camera_device *);
int (*release)(struct soc_camera_device *);
int (*start_capture)(struct soc_camera_device *);
int (*stop_capture)(struct soc_camera_device *);
- int (*set_fmt_cap)(struct soc_camera_device *, __u32,
- struct v4l2_rect *);
+ int (*set_capture_format)(struct soc_camera_device *, __u32,
+ struct v4l2_rect *, unsigned int);
int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *);
- unsigned long (*query_bus_param)(struct soc_camera_device *);
- int (*set_bus_param)(struct soc_camera_device *, unsigned long);
int (*get_chip_id)(struct soc_camera_device *,
struct v4l2_chip_ident *);
#ifdef CONFIG_VIDEO_ADV_DEBUG
int (*get_register)(struct soc_camera_device *, struct v4l2_register *);
int (*set_register)(struct soc_camera_device *, struct v4l2_register *);
#endif
+ const struct soc_camera_data_format *formats;
+ int num_formats;
int (*get_control)(struct soc_camera_device *, struct v4l2_control *);
int (*set_control)(struct soc_camera_device *, struct v4l2_control *);
const struct v4l2_queryctrl *controls;
int num_controls;
+ unsigned int(*get_datawidth)(struct soc_camera_device *icd);
};
static inline struct v4l2_queryctrl const *soc_camera_find_qctrl(
@@ -147,33 +138,12 @@ static inline struct v4l2_queryctrl const *soc_camera_find_qctrl(
return NULL;
}
-#define SOCAM_MASTER (1 << 0)
-#define SOCAM_SLAVE (1 << 1)
-#define SOCAM_HSYNC_ACTIVE_HIGH (1 << 2)
-#define SOCAM_HSYNC_ACTIVE_LOW (1 << 3)
-#define SOCAM_VSYNC_ACTIVE_HIGH (1 << 4)
-#define SOCAM_VSYNC_ACTIVE_LOW (1 << 5)
-#define SOCAM_DATAWIDTH_8 (1 << 6)
-#define SOCAM_DATAWIDTH_9 (1 << 7)
-#define SOCAM_DATAWIDTH_10 (1 << 8)
-#define SOCAM_PCLK_SAMPLE_RISING (1 << 9)
-#define SOCAM_PCLK_SAMPLE_FALLING (1 << 10)
-
-#define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_9 | \
- SOCAM_DATAWIDTH_10)
-
-static inline unsigned long soc_camera_bus_param_compatible(
- unsigned long camera_flags, unsigned long bus_flags)
-{
- unsigned long common_flags, hsync, vsync, pclk;
-
- common_flags = camera_flags & bus_flags;
-
- hsync = common_flags & (SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW);
- vsync = common_flags & (SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW);
- pclk = common_flags & (SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING);
-
- return (!hsync || !vsync || !pclk) ? 0 : common_flags;
-}
+#define IS_MASTER (1<<0)
+#define IS_HSYNC_ACTIVE_HIGH (1<<1)
+#define IS_VSYNC_ACTIVE_HIGH (1<<2)
+#define IS_DATAWIDTH_8 (1<<3)
+#define IS_DATAWIDTH_9 (1<<4)
+#define IS_DATAWIDTH_10 (1<<5)
+#define IS_PCLK_SAMPLE_RISING (1<<6)
#endif