Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static int mxc_pf_open ( struct inode *  inode,
struct file *  filp 
) [static]

Post Filter driver open function. This function implements the Linux file_operations.open() API function.

Parameters:
inode struct inode *
filp struct file *
Returns:
This function returns 0 on success or negative error code on error.

Definition at line 534 of file mxc_pf.c.

{
      int i;

      if (open_count) {
            return -EBUSY;
      }

      open_count++;

      memset(&pf_data, 0, sizeof(pf_data));
      for (i = 0; i < PF_MAX_BUFFER_CNT; i++) {
            pf_data.buf[i].index = -1;
      }
      init_waitqueue_head(&pf_data.pf_wait);
      init_MUTEX(&pf_data.busy_lock);

      pf_data.busy_flag = 1;

      ipu_request_irq(IPU_IRQ_PF_Y_OUT_EOF, mxc_pf_irq_handler,
                  0, "mxc_ipu_pf", &pf_data);

      ipu_request_irq(IPU_IRQ_PF_U_OUT_EOF, mxc_pf_irq_handler,
                  0, "mxc_ipu_pf", &pf_data);

      ipu_request_irq(IPU_IRQ_PF_V_OUT_EOF, mxc_pf_irq_handler,
                  0, "mxc_ipu_pf", &pf_data);

      ipu_disable_irq(IPU_IRQ_PF_Y_OUT_EOF);
      ipu_disable_irq(IPU_IRQ_PF_U_OUT_EOF);
      ipu_disable_irq(IPU_IRQ_PF_V_OUT_EOF);

      return 0;
}


Generated by  Doxygen 1.6.0   Back to index