diff options
author | HeungJun Kim <riverful.kim@samsung.com> | 2011-12-02 21:53:20 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-30 14:34:27 -0200 |
commit | ce808a478ae5b79e52ea170b35c459829296330f (patch) | |
tree | cd281cacb0756ea8b216a05cdefe10750afd85a3 /drivers/media/video/m5mols/m5mols.h | |
parent | 575d6252a715c599964ec6ec06428e6362c0633e (diff) | |
download | blackbird-op-linux-ce808a478ae5b79e52ea170b35c459829296330f.tar.gz blackbird-op-linux-ce808a478ae5b79e52ea170b35c459829296330f.zip |
[media] m5mols: Improve the interrupt handling routines
The work struct based interrupt handling is not flexible enough
as the M-5MOLS control sequence involves I2C access sequences
before and after an interrupt is generated. A single waitqueue is
enough for the job so remove the work struct based code.
Signed-off-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/m5mols/m5mols.h')
-rw-r--r-- | drivers/media/video/m5mols/m5mols.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/video/m5mols/m5mols.h b/drivers/media/video/m5mols/m5mols.h index f33171672c31..2829d4a95f6a 100644 --- a/drivers/media/video/m5mols/m5mols.h +++ b/drivers/media/video/m5mols/m5mols.h @@ -163,7 +163,6 @@ struct m5mols_version { * @ffmt: current fmt according to resolution type * @res_type: current resolution type * @irq_waitq: waitqueue for the capture - * @work_irq: workqueue for the IRQ * @flags: state variable for the interrupt handler * @handle: control handler * @autoexposure: Auto Exposure control @@ -180,7 +179,6 @@ struct m5mols_version { * @lock_ae: true means the Auto Exposure is locked * @lock_awb: true means the Aut WhiteBalance is locked * @resolution: register value for current resolution - * @interrupt: register value for current interrupt status * @mode: register value for current operation mode * @mode_save: register value for current operation mode for saving * @set_power: optional power callback to the board code @@ -192,8 +190,7 @@ struct m5mols_info { struct v4l2_mbus_framefmt ffmt[M5MOLS_RESTYPE_MAX]; int res_type; wait_queue_head_t irq_waitq; - struct work_struct work_irq; - unsigned long flags; + atomic_t irq_done; struct v4l2_ctrl_handler handle; /* Autoexposure/exposure control cluster */ @@ -213,14 +210,11 @@ struct m5mols_info { bool lock_ae; bool lock_awb; u8 resolution; - u8 interrupt; u8 mode; u8 mode_save; int (*set_power)(struct device *dev, int on); }; -#define ST_CAPT_IRQ 0 - #define is_powered(__info) (__info->power) #define is_ctrl_synced(__info) (__info->ctrl_sync) #define is_available_af(__info) (__info->ver.af) @@ -290,6 +284,7 @@ int m5mols_busy_wait(struct v4l2_subdev *sd, u32 reg, u32 value, u32 mask, int m5mols_mode(struct m5mols_info *info, u8 mode); int m5mols_enable_interrupt(struct v4l2_subdev *sd, u8 reg); +int m5mols_wait_interrupt(struct v4l2_subdev *sd, u8 condition, u32 timeout); int m5mols_sync_controls(struct m5mols_info *info); int m5mols_start_capture(struct m5mols_info *info); int m5mols_do_scenemode(struct m5mols_info *info, u8 mode); |