Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176857
b: refs/heads/master
c: 85dc1cf
h: refs/heads/master
i:
  176855: 2151c61
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mauro Carvalho Chehab committed Dec 16, 2009
1 parent b27d919 commit 5532eab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34cae30b8457cf090f215e212ba019e7c303f8fd
refs/heads/master: 85dc1cff0df3a7e3012cf88b94026f954a72c178
17 changes: 17 additions & 0 deletions trunk/drivers/media/video/sh_mobile_ceu_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,23 @@ static int sh_mobile_ceu_set_bus_param(struct soc_camera_device *icd,
if (!common_flags)
return -EINVAL;

/* Make choises, based on platform preferences */
if ((common_flags & SOCAM_HSYNC_ACTIVE_HIGH) &&
(common_flags & SOCAM_HSYNC_ACTIVE_LOW)) {
if (pcdev->pdata->flags & SH_CEU_FLAG_HSYNC_LOW)
common_flags &= ~SOCAM_HSYNC_ACTIVE_HIGH;
else
common_flags &= ~SOCAM_HSYNC_ACTIVE_LOW;
}

if ((common_flags & SOCAM_VSYNC_ACTIVE_HIGH) &&
(common_flags & SOCAM_VSYNC_ACTIVE_LOW)) {
if (pcdev->pdata->flags & SH_CEU_FLAG_VSYNC_LOW)
common_flags &= ~SOCAM_VSYNC_ACTIVE_HIGH;
else
common_flags &= ~SOCAM_VSYNC_ACTIVE_LOW;
}

ret = icd->ops->set_bus_param(icd, common_flags);
if (ret < 0)
return ret;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/media/sh_mobile_ceu.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#define SH_CEU_FLAG_USE_8BIT_BUS (1 << 0) /* use 8bit bus width */
#define SH_CEU_FLAG_USE_16BIT_BUS (1 << 1) /* use 16bit bus width */
#define SH_CEU_FLAG_HSYNC_LOW (1 << 2) /* default High if possible */
#define SH_CEU_FLAG_VSYNC_LOW (1 << 3) /* default High if possible */

struct sh_mobile_ceu_info {
unsigned long flags;
Expand Down

0 comments on commit 5532eab

Please sign in to comment.