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

int _ipu_csi_set_skip_smfc ( uint32_t  skip,
uint32_t  max_ratio,
uint32_t  id,
uint32_t  csi 
)

_ipu_csi_set_skip_smfc

Parameters:
skip select frames to be skipped and set the correspond bits to 1
max_ratio number of frames in a skipping set and the maximum value of max_ratio is 5
id csi to smfc skipping id
csi csi 0 or csi 1
Returns:
Returns 0 on success or negative error code on fail

Definition at line 504 of file ipu_capture.c.

{
      uint32_t temp;
      int retval = 0;
      unsigned long lock_flags;

      if (max_ratio > 5 || id > 3) {
            retval = -EINVAL;
            goto err;
      }

      spin_lock_irqsave(&ipu_lock, lock_flags);

      temp = __raw_readl(CSI_SKIP(csi));
      temp &= ~(CSI_MAX_RATIO_SKIP_SMFC_MASK | CSI_ID_2_SKIP_MASK |
                  CSI_SKIP_SMFC_MASK);
      temp |= (max_ratio << CSI_MAX_RATIO_SKIP_SMFC_SHIFT) |
                  (id << CSI_ID_2_SKIP_SHIFT) |
                  (skip << CSI_SKIP_SMFC_SHIFT);
      __raw_writel(temp, CSI_SKIP(csi));

      spin_unlock_irqrestore(&ipu_lock, lock_flags);
err:
      return retval;
}


Generated by  Doxygen 1.6.0   Back to index