linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Sangwook Lee <sangwook.lee@linaro.org>
Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
	linux-media@vger.kernel.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
Subject: Re: [PATH v3 0/2] Add v4l2 subdev driver for S5K4ECGX sensor with embedded SoC ISP
Date: Mon, 20 Aug 2012 13:33:13 +0200	[thread overview]
Message-ID: <50322079.4080409@samsung.com> (raw)
In-Reply-To: <CADPsn1ZnqxRYd2kTWcOatZVgdcWWbNCA9kwMaWs4O_tk2gYEPQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

Hi Sangwook,

On 08/20/2012 12:43 PM, Sangwook Lee wrote:
> On 20 August 2012 09:12, Sangwook Lee <sangwook.lee@linaro.org> wrote:
>> On 19 August 2012 22:29, Sylwester Nawrocki
>> <sylvester.nawrocki@gmail.com> wrote:
>>> On 08/03/2012 04:24 PM, Sangwook Lee wrote:
>>>> I was thinking about this, but this seems to be is a bit time-consuming because
>>>> I have to do this just due to lack of s5k4ecgx hardware information.
>>>> let me try it later once
>>>> this patch is accepted.
>>>
>>> I've converted this driver to use function calls instead of the register
>>> arrays. It can be pulled, along with a couple of minor fixes/improvements,
>>> from following git tree:
>>>
>>>         git://linuxtv.org/snawrocki/media.git s5k4ecgx
>>>         (gitweb: http://git.linuxtv.org/snawrocki/media.git/s5k4ecgx)
>>>
>>> I don't own any Origen board thus it's untested. Could you give it a try ?
> 
> Sorry, It doesn't work. I will send pictures to you by another mail thread.
> Previously, I tested preview array and found out that
> +	/*
> +	 * 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.
> +	 */
> 
> Do we need to set those values ?

Yes, after my changes it should be set too. But there is a bug in the
registers definitions. Attached patch should correct this, sorry about
this oversight. Let me know if there are still any issues.
To make sure the I2C write sequences are correct it might be useful to
log all calls to s5k4ecgx_write() and compare the logs with original
tables.

--

Regards,
Sylwester

[-- Attachment #2: 0001-s5k4ecgx-fix-register-definitions.patch --]
[-- Type: text/x-patch, Size: 1499 bytes --]

>From b53f1279a32808d696676b905d167bcd33c6e2dc Mon Sep 17 00:00:00 2001
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
Date: Mon, 20 Aug 2012 13:27:03 +0200
Subject: [PATCH] s5k4ecgx: fix register definitions

---
 drivers/media/video/s5k4ecgx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/video/s5k4ecgx.c b/drivers/media/video/s5k4ecgx.c
index 8ad0fb1..836db2f 100644
--- a/drivers/media/video/s5k4ecgx.c
+++ b/drivers/media/video/s5k4ecgx.c
@@ -69,7 +69,7 @@ module_param(debug, int, 0644);
 #define REG_G_PREV_OPEN_AFTER_CH	0x7000026a
 
 /* Preview context register sets. n = 0...4. */
-#define PREG(n, x)			((n) * 0x26 + (x))
+#define PREG(n, x)			((n) * 0x30 + (x))
 #define REG_P_OUT_WIDTH(n)		PREG(n, 0x700002a6)
 #define REG_P_OUT_HEIGHT(n)		PREG(n, 0x700002a8)
 #define REG_P_FMT(n)			PREG(n, 0x700002aa)
@@ -93,10 +93,10 @@ module_param(debug, int, 0644);
 #define REG_G_PREVZOOM_IN_HEIGHT	0x70000496
 #define REG_G_PREVZOOM_IN_XOFFS		0x70000498
 #define REG_G_PREVZOOM_IN_YOFFS		0x7000049a
-#define REG_G_CAPZOOM_IN_WIDTH		0x70000494
-#define REG_G_CAPZOOM_IN_HEIGHT		0x70000496
-#define REG_G_CAPZOOM_IN_XOFFS		0x70000498
-#define REG_G_CAPZOOM_IN_YOFFS		0x7000049a
+#define REG_G_CAPZOOM_IN_WIDTH		0x7000049c
+#define REG_G_CAPZOOM_IN_HEIGHT		0x7000049e
+#define REG_G_CAPZOOM_IN_XOFFS		0x700004a0
+#define REG_G_CAPZOOM_IN_YOFFS		0x700004a2
 
 /* n = 0...4 */
 #define REG_USER_SHARPNESS(n)		(0x70000a28 + (n) * 0xb6)
-- 
1.7.11.3


      reply	other threads:[~2012-08-20 11:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 13:42 [PATH v3 0/2] Add v4l2 subdev driver for S5K4ECGX sensor with embedded SoC ISP Sangwook Lee
2012-08-02 13:42 ` [PATH v3 1/2] v4l: Add factory register values form S5K4ECGX sensor Sangwook Lee
2012-08-02 20:50   ` Sylwester Nawrocki
2012-08-03 15:05     ` Sangwook Lee
2012-08-03 20:57       ` Sylwester Nawrocki
2012-08-02 13:42 ` [PATH v3 2/2] v4l: Add v4l2 subdev driver for " Sangwook Lee
2012-08-02 21:18   ` Sylwester Nawrocki
2012-08-02 20:11 ` [PATH v3 0/2] Add v4l2 subdev driver for S5K4ECGX sensor with embedded SoC ISP Sylwester Nawrocki
2012-08-03 14:24   ` Sangwook Lee
2012-08-03 20:41     ` Sylwester Nawrocki
2012-08-19 21:29     ` Sylwester Nawrocki
2012-08-20  8:12       ` Sangwook Lee
2012-08-20 10:43         ` Sangwook Lee
2012-08-20 11:33           ` Sylwester Nawrocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50322079.4080409@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=quartz.jang@samsung.com \
    --cc=sakari.ailus@maxwell.research.nokia.com \
    --cc=sangwook.lee@linaro.org \
    --cc=suapapa@insignal.co.kr \
    --cc=sylvester.nawrocki@gmail.com \
    --cc=usman.ahmad@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).