The mipi csi2 code is ugly present in the capture pipeline setup/disable
routions with '#ifdef CONFIG_MXC_MIPI_CSI2/#endif' protected. Whenever
it finds mipi_csi2_info is not gotten correctly, it will return error to
callers. This breaks the normally routines in which mipi csi2 is not used
and mipi csi2 driver is disabled in its devicetree node(but with the
Kconfig CONFIG_MXC_MIPI_CSI2 defined). A real example is the capture
feature on the MX6 Sabreauto platforms. We have only parallel CSI input
on it and the mipi csi2 driver is disabled in its devicetree node but with
the Kconfig CONFIG_MXC_MIPI_CSI2 defined. So, a reasonable choice at present
is not to return error if mipi_csi2_info cannot be gotten, though we could
eventually re-organize the capture code for a better total solution in the
future.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit
8133b7fd26e8b068fa8ab9cd62eae090c76080be)
/*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
params.csi_mem.mipi_vc = 0;
params.csi_mem.mipi_id = 0;
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
&& cam->csi == csi_id)
mipi_csi2_pixelclk_disable(mipi_csi2_info);
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
/*
- * Copyright 2009-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2009-2014 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
params.csi_mem.mipi_vc = 0;
params.csi_mem.mipi_id = 0;
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
&& cam->csi == csi_id)
mipi_csi2_pixelclk_disable(mipi_csi2_info);
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
/*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/* * The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
params.csi_mem.mipi_vc = 0;
params.csi_mem.mipi_id = 0;
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
&& cam->csi == csi_id)
mipi_csi2_pixelclk_disable(mipi_csi2_info);
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
/*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
enc.csi_prp_enc_mem.mipi_vc = 0;
enc.csi_prp_enc_mem.mipi_id = 0;
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
&& cam->csi == csi_id)
mipi_csi2_pixelclk_disable(mipi_csi2_info);
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
/*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/* * The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
vf.csi_prp_vf_mem.mipi_vc = 0;
vf.csi_prp_vf_mem.mipi_id = 0;
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
&& cam->csi == csi_id)
mipi_csi2_pixelclk_disable(mipi_csi2_info);
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
/*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
vf.csi_prp_vf_mem.mipi_vc = 0;
vf.csi_prp_vf_mem.mipi_id = 0;
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif
&& cam->csi == csi_id)
mipi_csi2_pixelclk_disable(mipi_csi2_info);
}
- } else {
- printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
- __func__, __FILE__);
- return -EPERM;
}
#endif