Commit babde1c2 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface

This patch adds V4L2 driver for Samsung S3C24XX/S3C64XX SoC series
camera interface. The driver exposes a subdev device node for CAMIF
pixel resolution and crop control and two video capture nodes - for
the "codec" and "preview" data paths. It has been tested on Mini2440
(s3c2440) and Mini6410 (s3c6410) board with gstreamer and mplayer.
Signed-off-by: default avatarSylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: default avatarTomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: default avatarAndrey Gusakov <dron0gus@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d033a308
......@@ -109,6 +109,18 @@ config VIDEO_OMAP3_DEBUG
---help---
Enable debug messages on OMAP 3 camera controller driver.
config VIDEO_S3C_CAMIF
tristate "Samsung S3C24XX/S3C64XX SoC Camera Interface driver"
depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
depends on (PLAT_S3C64XX || PLAT_S3C24XX) && PM_RUNTIME
select VIDEOBUF2_DMA_CONTIG
---help---
This is a v4l2 driver for s3c24xx and s3c64xx SoC series camera
host interface (CAMIF).
To compile this driver as a module, choose M here: the module
will be called s3c-camif.
source "drivers/media/platform/soc_camera/Kconfig"
source "drivers/media/platform/s5p-fimc/Kconfig"
source "drivers/media/platform/s5p-tv/Kconfig"
......
......@@ -27,6 +27,7 @@ obj-$(CONFIG_VIDEO_CODA) += coda.o
obj-$(CONFIG_VIDEO_MEM2MEM_DEINTERLACE) += m2m-deinterlace.o
obj-$(CONFIG_VIDEO_S3C_CAMIF) += s3c-camif/
obj-$(CONFIG_VIDEO_SAMSUNG_S5P_FIMC) += s5p-fimc/
obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG) += s5p-jpeg/
obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) += s5p-mfc/
......
# Makefile for s3c244x/s3c64xx CAMIF driver
s3c-camif-objs := camif-core.o camif-capture.o camif-regs.o
obj-$(CONFIG_VIDEO_S3C_CAMIF) += s3c-camif.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* s3c24xx/s3c64xx SoC series Camera Interface (CAMIF) driver
*
* Copyright (C) 2012 Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef MEDIA_S3C_CAMIF_
#define MEDIA_S3C_CAMIF_
#include <linux/i2c.h>
#include <media/v4l2-mediabus.h>
/**
* struct s3c_camif_sensor_info - an image sensor description
* @i2c_board_info: pointer to an I2C sensor subdevice board info
* @clock_frequency: frequency of the clock the host provides to a sensor
* @mbus_type: media bus type
* @i2c_bus_num: i2c control bus id the sensor is attached to
* @flags: the parallel bus flags defining signals polarity (V4L2_MBUS_*)
* @use_field: 1 if parallel bus FIELD signal is used (only s3c64xx)
*/
struct s3c_camif_sensor_info {
struct i2c_board_info i2c_board_info;
unsigned long clock_frequency;
enum v4l2_mbus_type mbus_type;
u16 i2c_bus_num;
u16 flags;
u8 use_field;
};
struct s3c_camif_plat_data {
struct s3c_camif_sensor_info sensor;
int (*gpio_get)(void);
int (*gpio_put)(void);
};
/* Platform default helper functions */
int s3c_camif_gpio_get(void);
int s3c_camif_gpio_put(void);
#endif /* MEDIA_S3C_CAMIF_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment