aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-12-11 09:53:45 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-16 06:27:30 -0500
commita6b5f2008a3d54b5f5350a01121b718dd6bfead7 (patch)
tree55d3f6551a548f01a031f26ff845163985b59e14 /arch/sh
parent760697beca338599a65484389c7abbe54aedb664 (diff)
V4L/DVB (13661): rj54n1cb0c: Add cropping, auto white balance, restrict sizes, add platform data
It has been experimentally found out, that the sensor only supports up to 512x384 video output and also has some restrictions on minimum scale. We disable non-working size ranges until, maybe, someone finds out how to properly set them up. Also add cropping support, an auto white balance control, platform data to specify master clock frequency and polarity of the IOCTL pin. create mode 100644 include/media/rj54n1cb0c.h Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index 87438d6603d6..9038d768a525 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -19,6 +19,7 @@
19#include <linux/input/sh_keysc.h> 19#include <linux/input/sh_keysc.h>
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/usb/r8a66597.h> 21#include <linux/usb/r8a66597.h>
22#include <media/rj54n1cb0c.h>
22#include <media/soc_camera.h> 23#include <media/soc_camera.h>
23#include <media/sh_mobile_ceu.h> 24#include <media/sh_mobile_ceu.h>
24#include <video/sh_mobile_lcdc.h> 25#include <video/sh_mobile_lcdc.h>
@@ -255,6 +256,9 @@ static struct i2c_board_info kfr2r09_i2c_camera = {
255 256
256static struct clk *camera_clk; 257static struct clk *camera_clk;
257 258
259/* set VIO_CKO clock to 25MHz */
260#define CEU_MCLK_FREQ 25000000
261
258#define DRVCRB 0xA405018C 262#define DRVCRB 0xA405018C
259static int camera_power(struct device *dev, int mode) 263static int camera_power(struct device *dev, int mode)
260{ 264{
@@ -267,8 +271,7 @@ static int camera_power(struct device *dev, int mode)
267 if (IS_ERR(camera_clk)) 271 if (IS_ERR(camera_clk))
268 return PTR_ERR(camera_clk); 272 return PTR_ERR(camera_clk);
269 273
270 /* set VIO_CKO clock to 25MHz */ 274 rate = clk_round_rate(camera_clk, CEU_MCLK_FREQ);
271 rate = clk_round_rate(camera_clk, 25000000);
272 ret = clk_set_rate(camera_clk, rate); 275 ret = clk_set_rate(camera_clk, rate);
273 if (ret < 0) 276 if (ret < 0)
274 goto eclkrate; 277 goto eclkrate;
@@ -318,11 +321,17 @@ eclkrate:
318 return ret; 321 return ret;
319} 322}
320 323
324static struct rj54n1_pdata rj54n1_priv = {
325 .mclk_freq = CEU_MCLK_FREQ,
326 .ioctl_high = false,
327};
328
321static struct soc_camera_link rj54n1_link = { 329static struct soc_camera_link rj54n1_link = {
322 .power = camera_power, 330 .power = camera_power,
323 .board_info = &kfr2r09_i2c_camera, 331 .board_info = &kfr2r09_i2c_camera,
324 .i2c_adapter_id = 1, 332 .i2c_adapter_id = 1,
325 .module_name = "rj54n1cb0c", 333 .module_name = "rj54n1cb0c",
334 .priv = &rj54n1_priv,
326}; 335};
327 336
328static struct platform_device kfr2r09_camera = { 337static struct platform_device kfr2r09_camera = {