[media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor

This driver exposes preview mode operation of the S5K6AAFX sensor with
embedded SoC ISP. The native capture (snapshot) operation mode is not
supported.
Following controls are available:
 manual/auto exposure and gain, power line frequency (anti-flicker),
 saturation, sharpness, brightness, contrast, white balance temperature,
 color effects, horizontal/vertical image flip, frame interval,
 auto white balance.
RGB component gains are currently exposed through private controls.

Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Sylwester Nawrocki 2011-10-04 14:05:58 -03:00 committed by Mauro Carvalho Chehab
parent d26a6635b2
commit bfa8dd3a05
4 changed files with 1739 additions and 0 deletions

View file

@ -517,6 +517,13 @@ config VIDEO_NOON010PC30
source "drivers/media/video/m5mols/Kconfig"
config VIDEO_S5K6AA
tristate "Samsung S5K6AAFX sensor support"
depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
---help---
This is a V4L2 sensor-level driver for Samsung S5K6AA(FX) 1.3M
camera sensor with an embedded SoC image signal processor.
comment "Flash devices"
config VIDEO_ADP1653

View file

@ -72,6 +72,7 @@ obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o
obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o
obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o
obj-$(CONFIG_VIDEO_M5MOLS) += m5mols/
obj-$(CONFIG_VIDEO_S5K6AA) += s5k6aa.o
obj-$(CONFIG_VIDEO_ADP1653) += adp1653.o
obj-$(CONFIG_SOC_CAMERA_IMX074) += imx074.o

1680
drivers/media/video/s5k6aa.c Normal file

File diff suppressed because it is too large Load diff

51
include/media/s5k6aa.h Normal file
View file

@ -0,0 +1,51 @@
/*
* S5K6AAFX camera sensor driver header
*
* Copyright (C) 2011 Samsung Electronics Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef S5K6AA_H
#define S5K6AA_H
#include <media/v4l2-mediabus.h>
/**
* struct s5k6aa_gpio - data structure describing a GPIO
* @gpio: GPIO number
* @level: indicates active state of the @gpio
*/
struct s5k6aa_gpio {
int gpio;
int level;
};
/**
* struct s5k6aa_platform_data - s5k6aa driver platform data
* @set_power: an additional callback to the board code, called
* after enabling the regulators and before switching
* the sensor off
* @mclk_frequency: sensor's master clock frequency in Hz
* @gpio_reset: GPIO driving RESET pin
* @gpio_stby: GPIO driving STBY pin
* @nlanes: maximum number of MIPI-CSI lanes used
* @horiz_flip: default horizontal image flip value, non zero to enable
* @vert_flip: default vertical image flip value, non zero to enable
*/
struct s5k6aa_platform_data {
int (*set_power)(int enable);
unsigned long mclk_frequency;
struct s5k6aa_gpio gpio_reset;
struct s5k6aa_gpio gpio_stby;
enum v4l2_mbus_type bus_type;
u8 nlanes;
u8 horiz_flip;
u8 vert_flip;
};
#endif /* S5K6AA_H */