static enum csi_input_seq get_csi_input_seq(struct sun6i_csi_dev *sdev,
u32 mbus_code, u32 pixformat)
{
-
switch (pixformat) {
case V4L2_PIX_FMT_HM12:
case V4L2_PIX_FMT_NV12:
{
struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi);
- if (config == NULL)
+ if (!config)
return -EINVAL;
memcpy(&csi->config, config, sizeof(csi->config));
dev_dbg(csi->dev, "notify complete, all subdevs registered\n");
sd = list_first_entry(&v4l2_dev->subdevs, struct v4l2_subdev, list);
- if (sd == NULL)
+ if (!sd)
return -EINVAL;
ret = sun6i_csi_link_entity(csi, &sd->entity, sd->fwnode);
return PTR_ERR(io_base);
sdev->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "bus", io_base,
- &sun6i_csi_regmap_config);
+ &sun6i_csi_regmap_config);
if (IS_ERR(sdev->regmap)) {
dev_err(&pdev->dev, "Failed to init register map\n");
return PTR_ERR(sdev->regmap);
/*
* PHYS_OFFSET isn't available on all architectures. In order to
- * accomodate for COMPILE_TEST, let's define it to something dumb.
+ * accommodate for COMPILE_TEST, let's define it to something dumb.
*/
#if defined(CONFIG_COMPILE_TEST) && !defined(PHYS_OFFSET)
#define PHYS_OFFSET 0
* @mbus_code: media bus format code (MEDIA_BUS_FMT_*)
*/
bool sun6i_csi_is_format_supported(struct sun6i_csi *csi, u32 pixformat,
- u32 mbus_code);
+ u32 mbus_code);
/**
* sun6i_csi_set_power() - power on/off the csi
#define CSI_IF_CFG_IF_DATA_WIDTH_12BIT ((2 << 8) & CSI_IF_CFG_IF_DATA_WIDTH_MASK)
#define CSI_IF_CFG_MIPI_IF_MASK BIT(7)
#define CSI_IF_CFG_MIPI_IF_CSI (0 << 7)
-#define CSI_IF_CFG_MIPI_IF_MIPI (1 << 7)
+#define CSI_IF_CFG_MIPI_IF_MIPI BIT(7)
#define CSI_IF_CFG_CSI_IF_MASK GENMASK(4, 0)
#define CSI_IF_CFG_CSI_IF_YUV422_INTLV ((0 << 0) & CSI_IF_CFG_CSI_IF_MASK)
#define CSI_IF_CFG_CSI_IF_YUV422_16BIT ((1 << 0) & CSI_IF_CFG_CSI_IF_MASK)
}
static int sun6i_video_queue_setup(struct vb2_queue *vq,
- unsigned int *nbuffers, unsigned int *nplanes,
- unsigned int sizes[],
- struct device *alloc_devs[])
+ unsigned int *nbuffers, unsigned int *nplanes,
+ unsigned int sizes[],
+ struct device *alloc_devs[])
{
struct sun6i_video *video = vb2_get_drv_priv(vq);
unsigned int size = video->fmt.fmt.pix.sizeimage;
};
static int vidioc_querycap(struct file *file, void *priv,
- struct v4l2_capability *cap)
+ struct v4l2_capability *cap)
{
struct sun6i_video *video = video_drvdata(file);
}
static int vidioc_enum_input(struct file *file, void *fh,
- struct v4l2_input *inp)
+ struct v4l2_input *inp)
{
if (inp->index != 0)
return -EINVAL;