From patchwork Fri Aug 10 14:14:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sangwook X-Patchwork-Id: 10679 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B680323E02 for ; Fri, 10 Aug 2012 14:16:15 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 80E8EA18890 for ; Fri, 10 Aug 2012 14:16:15 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so1615202ghb.11 for ; Fri, 10 Aug 2012 07:16:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=G0W3OtSoHrqWQxbmKjDoqZE1fJ5PGXicovrcH3vJfOc=; b=RT1B6z+aY3RPsuUUxf2ktQ6Xgh7p4KL6N4sIhVc056wP4j5YJqImb+Rkh03A/waIeV 9zDUqP7LXZisYqbw/3iVlpl+4Il9RSlEaZ3kyYJAdspXwlwCCfr/7Jb9Q2/jf4T2WsxZ iDFDRsziKVtCXGptSEx+ZBuQnKx3E6RH8USWksWZOzFtSavtTcBJUfc1TNgkI8ChsgXS Pz4LLkLWbL9T9hxxVpCAemA1xrPmeIP76mmvI11/2/YbTLE1mVTqS2qgFON294hgdQMQ Wt4/JcHLQZviNt9U0FUmJzKJMIPxidcVmiTslduXb29+YEqx9vFgk4JOp1isw2ClyNrw qybA== Received: by 10.50.186.131 with SMTP id fk3mr1928558igc.31.1344608174729; Fri, 10 Aug 2012 07:16:14 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp62609igc; Fri, 10 Aug 2012 07:16:13 -0700 (PDT) Received: by 10.14.180.68 with SMTP id i44mr3483100eem.20.1344608173359; Fri, 10 Aug 2012 07:16:13 -0700 (PDT) Received: from mail-ey0-f178.google.com (mail-ey0-f178.google.com [209.85.215.178]) by mx.google.com with ESMTPS id u5si2869651eeo.113.2012.08.10.07.16.12 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Aug 2012 07:16:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of sangwook.lee@linaro.org) client-ip=209.85.215.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of sangwook.lee@linaro.org) smtp.mail=sangwook.lee@linaro.org Received: by mail-ey0-f178.google.com with SMTP id k14so453357eaa.37 for ; Fri, 10 Aug 2012 07:16:12 -0700 (PDT) Received: by 10.14.218.134 with SMTP id k6mr3451415eep.14.1344608172806; Fri, 10 Aug 2012 07:16:12 -0700 (PDT) Received: from localhost.localdomain (host86-139-198-7.range86-139.btcentralplus.com. [86.139.198.7]) by mx.google.com with ESMTPS id j4sm11794571eeo.11.2012.08.10.07.16.06 (version=SSLv3 cipher=OTHER); Fri, 10 Aug 2012 07:16:11 -0700 (PDT) From: Sangwook Lee To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, laurent.pinchart@ideasonboard.com, sakari.ailus@maxwell.research.nokia.com, suapapa@insignal.co.kr, quartz.jang@samsung.com, linaro-dev@lists.linaro.org, patches@linaro.org, usman.ahmad@linaro.org, Sangwook Lee Subject: [PATCH v4 1/2] v4l: Add factory register values form S5K4ECGX sensor Date: Fri, 10 Aug 2012 15:14:55 +0100 Message-Id: <1344608096-22059-2-git-send-email-sangwook.lee@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1344608096-22059-1-git-send-email-sangwook.lee@linaro.org> References: <1344608096-22059-1-git-send-email-sangwook.lee@linaro.org> X-Gm-Message-State: ALoCoQmW2pz1VHk+kjqncl1n4GYkBX6jfe1YBBjj/FJRhT78Vmo4WqFV4batKeZ7NHfjxC+77vp8 Add preview default settings for S5K4ECGX sensor registers, which was copied from the reference code of Samsung S.LSI. Signed-off-by: Sangwook Lee --- drivers/media/video/s5k4ecgx_regs.h | 138 +++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 drivers/media/video/s5k4ecgx_regs.h diff --git a/drivers/media/video/s5k4ecgx_regs.h b/drivers/media/video/s5k4ecgx_regs.h new file mode 100644 index 0000000..e99b0e6 --- /dev/null +++ b/drivers/media/video/s5k4ecgx_regs.h @@ -0,0 +1,138 @@ +/* + * Samsung S5K4ECGX register tables for default values + * + * Copyright (C) 2012 Linaro + * Copyright (C) 2012 Insignal Co,. Ltd + * + * 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 __DRIVERS_MEDIA_VIDEO_S5K4ECGX_H__ +#define __DRIVERS_MEDIA_VIDEO_S5K4ECGX_H__ + +struct regval_list { + u32 addr; + u16 val; +}; + +/* Configure 720x480 preview size */ +static const struct regval_list s5k4ecgx_720_prev[] = { + { 0x70000250, 0x0a00 }, + { 0x70000252, 0x06a8 }, + { 0x70000254, 0x0010 }, + { 0x70000256, 0x0078 }, + { 0x70000258, 0x0a00 }, + { 0x7000025a, 0x06a8 }, + { 0x7000025c, 0x0010 }, + { 0x7000025e, 0x0078 }, + { 0x70000494, 0x0a00 }, + + /* + * FIXME: according to the datasheet, + * 0x70000496~ 0x7000049c seems to be only for capture mode, + * but without these value, it doesn't work with preview mode. + */ + { 0x70000496, 0x06a8 }, + { 0x70000498, 0x0000 }, + { 0x7000049a, 0x0000 }, + { 0x7000049c, 0x0a00 }, + + { 0x7000049e, 0x06a8 }, + { 0x700002a6, 0x02d0 }, + { 0x700002a8, 0x01e0 }, + { 0xffffffff, 0x0000 }, /* End token */ +}; + +/* Configure 640x480 preview size */ +static const struct regval_list s5k4ecgx_640_prev[] = { + { 0x70000250, 0x0a00 }, + { 0x70000252, 0x0780 }, + { 0x70000254, 0x0010 }, + { 0x70000256, 0x000c }, + { 0x70000258, 0x0a00 }, + { 0x7000025a, 0x0780 }, + { 0x7000025c, 0x0010 }, + { 0x7000025e, 0x000c }, + { 0x70000494, 0x0a00 }, + { 0x70000496, 0x0780 }, + { 0x70000498, 0x0000 }, + { 0x7000049a, 0x0000 }, + { 0x7000049c, 0x0a00 }, + { 0x7000049e, 0x0780 }, + { 0x700002a6, 0x0280 }, + { 0x700002a8, 0x01e0 }, + { 0xffffffff, 0x0000 }, /* End token */ +}; + +/* Configure 352x288 preview size */ +static const struct regval_list s5k4ecgx_352_prev[] = { + { 0x70000250, 0x0928 }, + { 0x70000252, 0x0780 }, + { 0x70000254, 0x007c }, + { 0x70000256, 0x000c }, + { 0x70000258, 0x0928 }, + { 0x7000025a, 0x0780 }, + { 0x7000025c, 0x007c }, + { 0x7000025e, 0x000c }, + { 0x70000494, 0x0928 }, + { 0x70000496, 0x0780 }, + { 0x70000498, 0x0000 }, + { 0x7000049a, 0x0000 }, + { 0x7000049c, 0x0928 }, + { 0x7000049e, 0x0780 }, + { 0x700002a6, 0x0160 }, + { 0x700002a8, 0x0120 }, + { 0xffffffff, 0x0000 }, /* End token */ +}; + +/* Configure 176x144 preview size */ +static const struct regval_list s5k4ecgx_176_prev[] = { + { 0x70000250, 0x0928 }, + { 0x70000252, 0x0780 }, + { 0x70000254, 0x007c }, + { 0x70000256, 0x000c }, + { 0x70000258, 0x0928 }, + { 0x7000025a, 0x0780 }, + { 0x7000025c, 0x007c }, + { 0x7000025e, 0x000c }, + { 0x70000494, 0x0928 }, + { 0x70000496, 0x0780 }, + { 0x70000498, 0x0000 }, + { 0x7000049a, 0x0000 }, + { 0x7000049c, 0x0928 }, + { 0x7000049e, 0x0780 }, + { 0x700002a6, 0x00b0 }, + { 0x700002a8, 0x0090 }, + { 0xffffffff, 0x0000 }, /* End token */ +}; + +/* Common setting 1 for preview */ +static const struct regval_list s5k4ecgx_com1_prev[] = { + { 0x700004a0, 0x0000 }, + { 0x700004a2, 0x0000 }, + { 0x70000262, 0x0001 }, + { 0x70000a1e, 0x0028 }, + { 0x70000ad4, 0x003c }, + { 0xffffffff, 0x0000 }, /* End token */ +}; + +/* Common setting 2 for preview */ +static const struct regval_list s5k4ecgx_com2_prev[] = { + { 0x700002aa, 0x0005 }, + { 0x700002b4, 0x0052 }, + { 0x700002be, 0x0000 }, + { 0x700002c0, 0x0001 }, + { 0x700002c2, 0x029a }, + { 0x700002c4, 0x014d }, + { 0x700002d0, 0x0000 }, + { 0x700002d2, 0x0000 }, + { 0x70000266, 0x0000 }, + { 0x7000026a, 0x0001 }, + { 0x7000024e, 0x0001 }, + { 0x70000268, 0x0001 }, + { 0xffffffff, 0x0000 }, /* End token */ +}; + +#endif /* __DRIVERS_MEDIA_VIDEO_S5K4ECGX_H__ */