Re: [PATCH v8 12/12] V4L: Add driver for s5k4e5 image sensor

2013-09-16 Thread Arun Kumar K
Hi Philipp,

 +Example:
 +
 + i2c-isp@1313 {
 + s5k4e5@20 {
 + compatible = samsung,s5k4e5;
 + reg = 0x20;
 + gpios = gpx1 2 1;

 This probably should be 'reset-gpios', too.


Yes thats right. I missed updating the example.
Thanks for pointing out.

Regards
Arun
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 12/12] V4L: Add driver for s5k4e5 image sensor

2013-09-13 Thread Philipp Zabel
Hi Arun,

Am Donnerstag, den 12.09.2013, 17:37 +0530 schrieb Arun Kumar K:
 This patch adds subdev driver for Samsung S5K4E5 raw image sensor.
 Like s5k6a3, it is also another fimc-is firmware controlled
 sensor. This minimal sensor driver doesn't do any I2C communications
 as its done by ISP firmware. It can be updated if needed to a
 regular sensor driver by adding the I2C communication.
 
 Signed-off-by: Arun Kumar K arun...@samsung.com
 Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com
 ---
  .../devicetree/bindings/media/i2c/s5k4e5.txt   |   45 +++
  drivers/media/i2c/Kconfig  |8 +
  drivers/media/i2c/Makefile |1 +
  drivers/media/i2c/s5k4e5.c |  347 
 
  4 files changed, 401 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
  create mode 100644 drivers/media/i2c/s5k4e5.c
 
 diff --git a/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt 
 b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
 new file mode 100644
 index 000..f8394b6
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/media/i2c/s5k4e5.txt
 @@ -0,0 +1,45 @@
 +* Samsung S5K4E5 Raw Image Sensor
 +
 +S5K4E5 is a raw image sensor with maximum resolution of 2560x1920
 +pixels. Data transfer is carried out via MIPI CSI-2 port and controls
 +via I2C bus.
 +
 +Required Properties:
 +- compatible : must be samsung,s5k4e5
 +- reg: I2C device address
 +- reset-gpios: specifier of a GPIO connected to the RESET pin
 +- clocks : should contain the sensor's EXTCLK clock specifier, from
 +   the common clock bindings
 +- clock-names: should contain extclk entry
 +- svdda-supply   : core voltage supply
 +- svddio-supply  : I/O voltage supply
 +
 +Optional Properties:
 +- clock-frequency : the frequency at which the extclk clock should be
 + configured to operate, in Hz; if this property is not
 + specified default 24 MHz value will be used
 +
 +The device node should be added to respective control bus controller
 +(e.g. I2C0) nodes and linked to the csis port node, using the common
 +video interfaces bindings, defined in video-interfaces.txt.
 +
 +Example:
 +
 + i2c-isp@1313 {
 + s5k4e5@20 {
 + compatible = samsung,s5k4e5;
 + reg = 0x20;
 + gpios = gpx1 2 1;

This probably should be 'reset-gpios', too.

 + clock-frequency = 2400;
 + clocks = clock 129;
 + clock-names = mclk;
 + svdda-supply = ...;
 + svddio-supply = ...;
 + port {
 + is_s5k4e5_ep: endpoint {
 + data-lanes = 1 2 3 4;
 + remote-endpoint = csis0_ep;
 + };
 + };
 + };
 + };
 diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
 index f7e9147..271028b 100644
 --- a/drivers/media/i2c/Kconfig
 +++ b/drivers/media/i2c/Kconfig
 @@ -572,6 +572,14 @@ config VIDEO_S5K6A3
 This is a V4L2 sensor-level driver for Samsung S5K6A3 raw
 camera sensor.
  
 +config VIDEO_S5K4E5
 + tristate Samsung S5K4E5 sensor support
 + depends on MEDIA_CAMERA_SUPPORT
 + depends on I2C  VIDEO_V4L2  VIDEO_V4L2_SUBDEV_API  OF
 + ---help---
 +   This is a V4L2 sensor-level driver for Samsung S5K4E5 raw
 +   camera sensor.
 +
  config VIDEO_S5K4ECGX
  tristate Samsung S5K4ECGX sensor support
  depends on I2C  VIDEO_V4L2  VIDEO_V4L2_SUBDEV_API
 diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
 index cf3cf03..0aeed8e 100644
 --- a/drivers/media/i2c/Makefile
 +++ b/drivers/media/i2c/Makefile
 @@ -65,6 +65,7 @@ obj-$(CONFIG_VIDEO_SR030PC30)   += sr030pc30.o
  obj-$(CONFIG_VIDEO_NOON010PC30)  += noon010pc30.o
  obj-$(CONFIG_VIDEO_S5K6AA)   += s5k6aa.o
  obj-$(CONFIG_VIDEO_S5K6A3)   += s5k6a3.o
 +obj-$(CONFIG_VIDEO_S5K4E5)   += s5k4e5.o
  obj-$(CONFIG_VIDEO_S5K4ECGX) += s5k4ecgx.o
  obj-$(CONFIG_VIDEO_S5C73M3)  += s5c73m3/
  obj-$(CONFIG_VIDEO_ADP1653)  += adp1653.o
 diff --git a/drivers/media/i2c/s5k4e5.c b/drivers/media/i2c/s5k4e5.c
 new file mode 100644
 index 000..639062b
 --- /dev/null
 +++ b/drivers/media/i2c/s5k4e5.c
 @@ -0,0 +1,347 @@
 +/*
 + * Samsung S5K4E5 image sensor driver
 + *
 + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
 + * Author: Arun Kumar K arun...@samsung.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.
 + */
 +
 +#include linux/clk.h
 +#include linux/delay.h
 +#include linux/device.h
 +#include linux/errno.h
 +#include linux/gpio.h