aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2008-12-23 03:54:45 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:40:17 -0500
commitbd73b36f0c41b0c02ef4b10a307db1c43537e006 (patch)
tree5dabc2aadde5e873d4d1cba136376ae55826f273 /include
parent5ca11fa3e0025864df930d6d97470b87c35919ed (diff)
V4L/DVB (10072): soc-camera: Add signal inversion flags to be used by camera drivers
As reported by Antonio Ospite <ospite@studenti.unina.it> two platforms with a mt9m111 camera require opposite pixel clock polarity, which means one of them inverts it. This patch adds support for inversion flags and switches all available camera drivers to using them. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/soc_camera.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index da57ffdaec4d..e6ed0d94ac1b 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -81,11 +81,19 @@ struct soc_camera_host_ops {
81 unsigned int (*poll)(struct file *, poll_table *); 81 unsigned int (*poll)(struct file *, poll_table *);
82}; 82};
83 83
84#define SOCAM_SENSOR_INVERT_PCLK (1 << 0)
85#define SOCAM_SENSOR_INVERT_MCLK (1 << 1)
86#define SOCAM_SENSOR_INVERT_HSYNC (1 << 2)
87#define SOCAM_SENSOR_INVERT_VSYNC (1 << 3)
88#define SOCAM_SENSOR_INVERT_DATA (1 << 4)
89
84struct soc_camera_link { 90struct soc_camera_link {
85 /* Camera bus id, used to match a camera and a bus */ 91 /* Camera bus id, used to match a camera and a bus */
86 int bus_id; 92 int bus_id;
87 /* GPIO number to switch between 8 and 10 bit modes */ 93 /* GPIO number to switch between 8 and 10 bit modes */
88 unsigned int gpio; 94 unsigned int gpio;
95 /* Per camera SOCAM_SENSOR_* bus flags */
96 unsigned long flags;
89 /* Optional callbacks to power on or off and reset the sensor */ 97 /* Optional callbacks to power on or off and reset the sensor */
90 int (*power)(struct device *, int); 98 int (*power)(struct device *, int);
91 int (*reset)(struct device *); 99 int (*reset)(struct device *);
@@ -206,4 +214,7 @@ static inline unsigned long soc_camera_bus_param_compatible(
206 return (!hsync || !vsync || !pclk) ? 0 : common_flags; 214 return (!hsync || !vsync || !pclk) ? 0 : common_flags;
207} 215}
208 216
217extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl,
218 unsigned long flags);
219
209#endif 220#endif