diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-02-23 16:13:24 +0100 |
---|---|---|
committer | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-02-23 16:13:24 +0100 |
commit | 4fac8946610c89188811e2f6936c4c8cc6fecaa0 (patch) | |
tree | b0a99df92ec56841c6c9ab94d4282a6a0f8ddb10 /linux/include/media | |
parent | 9f8456392268399f45cc6a1bc14889c7109975d1 (diff) | |
download | mediapointer-dvb-s2-4fac8946610c89188811e2f6936c4c8cc6fecaa0.tar.gz mediapointer-dvb-s2-4fac8946610c89188811e2f6936c4c8cc6fecaa0.tar.bz2 |
soc-camera: extend soc_camera_bus_param_compatible with more tests
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Add data signal polarity, mode, and bus-width tests to
soc_camera_bus_param_compatible().
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
include/media/soc_camera.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
Diffstat (limited to 'linux/include/media')
-rw-r--r-- | linux/include/media/soc_camera.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h index 7440d9250..c63a3409f 100644 --- a/linux/include/media/soc_camera.h +++ b/linux/include/media/soc_camera.h @@ -239,15 +239,19 @@ static inline struct v4l2_queryctrl const *soc_camera_find_qctrl( static inline unsigned long soc_camera_bus_param_compatible( unsigned long camera_flags, unsigned long bus_flags) { - unsigned long common_flags, hsync, vsync, pclk; + unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode; 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); + data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW); + mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE); + buswidth = common_flags & SOCAM_DATAWIDTH_MASK; - return (!hsync || !vsync || !pclk) ? 0 : common_flags; + return (!hsync || !vsync || !pclk || !data || !mode || !buswidth) ? 0 : + common_flags; } extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl, |