linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Sangwook Lee <sangwook.lee@linaro.org>
Cc: 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: Thu, 02 Aug 2012 22:11:34 +0200	[thread overview]
Message-ID: <501ADEF6.1080901@gmail.com> (raw)
In-Reply-To: <1343914971-23007-1-git-send-email-sangwook.lee@linaro.org>

Hi Sangwook,

On 08/02/2012 03:42 PM, Sangwook Lee wrote:
> The following 2 patches add driver for S5K4ECGX sensor with embedded ISP SoC,
> and minor v4l2 control API enhancement. S5K4ECGX is 5M CMOS Image sensor from Samsung
> 
> Changes since v2:
> - added GPIO (reset/stby) and regulators
> - updated I2C read/write, based on s5k6aa datasheet
> - fixed set_fmt errors
> - reduced register tables a bit
> - removed vmalloc

It looks like a great improvement, well done! Thanks!

In the S5K4CAGX sensor datasheet, that can be found on the internet,
there is 0x0000...0x002E registers description, which look very much
same as in S5K6AAFX case and likely is also valid for S5K4CAGX.

My second thought was, if we won't be able to get rid of those hundreds
of initial register values, to convert them to regular firmware blob.
And add regular firmware handling at the driver. I know it may sound
not standard but imagine dozens of such sensor drivers coexisting in
the mainline kernel. The source code would have been mainly register
address/value arrays...

What do you think about converting s5k4ecgx_img_regs arrays (it has
over 2700 entries) to a firmware file and adding some simple parser
to the driver ? Then we would have the problem solved in most part.

Regarding various preview resolution set up, the difference in all
those s5k4ecgx_*_preview[] arrays is rather small, only register
values differ, e.g. for 640x480 and 720x480 there is only 8 different
entries:

$ diff -a s5k4ec_640.txt s5k4ec_720.txt 
1c1
< static const struct regval_list s5k4ecgx_640_preview[] = {
---
> static const struct regval_list s5k4ecgx_720_preview[] = {
3c3
< 	{ 0x70000252, 0x0780 },
---
> 	{ 0x70000252, 0x06a8 },
5c5
< 	{ 0x70000256, 0x000c },
---
> 	{ 0x70000256, 0x0078 },
7c7
< 	{ 0x7000025a, 0x0780 },
---
> 	{ 0x7000025a, 0x06a8 },
9c9
< 	{ 0x7000025e, 0x000c },
---
> 	{ 0x7000025e, 0x0078 },
11c11
< 	{ 0x70000496, 0x0780 },
---
> 	{ 0x70000496, 0x06a8 },
15c15
< 	{ 0x7000049e, 0x0780 },
---
> 	{ 0x7000049e, 0x06a8 },
21c21
< 	{ 0x700002a6, 0x0280 },
---
> 	{ 0x700002a6, 0x02d0 },
28c28
< 	{ 0x700002c4, 0x014a },
---
> 	{ 0x700002c4, 0x014d },

I've found S5K4ECGX sensor datasheet on internet (Rev 0.07), and on a quick
look the description of most of registers from those tables could be found 
there.

Could you please try to implement a function that replaces those tables, 
based s5k6aa_set_prev_config() and s5k6aa_set_output_framefmt() ?

Regards,
Sylwester

  parent reply	other threads:[~2012-08-02 20:11 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 ` Sylwester Nawrocki [this message]
2012-08-03 14:24   ` [PATH v3 0/2] Add v4l2 subdev driver for S5K4ECGX sensor with embedded SoC ISP 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

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=501ADEF6.1080901@gmail.com \
    --to=sylvester.nawrocki@gmail.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=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).