public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-media@vger.kernel.org,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Sascha Hauer <kernel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/3] mx2_camera: Add soc_camera support for i.MX25/i.MX27
Date: Tue, 25 May 2010 16:20:49 +0300	[thread overview]
Message-ID: <20100525132049.GE27702@jasper.tkos.co.il> (raw)
In-Reply-To: <20100525131624.GM17272@pengutronix.de>

Hi Sascha,

On Tue, May 25, 2010 at 03:16:24PM +0200, Sascha Hauer wrote:
> On Mon, May 24, 2010 at 04:20:39PM +0300, Baruch Siach wrote:
> > This is the soc_camera support developed by Sascha Hauer for the i.MX27.  Alan
> > Carvalho de Assis modified the original driver to get it working on more recent
> > kernels. I modified it further to add support for i.MX25. This driver has been
> > tested on i.MX25 and i.MX27 based platforms.
> > 
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> >  arch/arm/plat-mxc/include/mach/memory.h  |    4 +-
> >  arch/arm/plat-mxc/include/mach/mx2_cam.h |   46 +
> >  drivers/media/video/Kconfig              |   13 +
> >  drivers/media/video/Makefile             |    1 +
> >  drivers/media/video/mx2_camera.c         | 1471 ++++++++++++++++++++++++++++++
> >  5 files changed, 1533 insertions(+), 2 deletions(-)
> >  create mode 100644 arch/arm/plat-mxc/include/mach/mx2_cam.h
> >  create mode 100644 drivers/media/video/mx2_camera.c
> > 
> 
> [snip]
> 
> > +
> > +static int mclk_get_divisor(struct mx2_camera_dev *pcdev)
> > +{
> > +	dev_info(pcdev->dev, "%s not implemented. Running at max speed\n",
> > +			__func__);
> > +
> > +#if 0
> > +	unsigned int mclk = pcdev->pdata->clk_csi;
> > +	unsigned int pclk = clk_get_rate(pcdev->clk_csi);
> > +	int i;
> > +
> > +	dev_dbg(pcdev->dev, "%s: %ld %ld\n", __func__, mclk, pclk);
> > +
> > +	for (i = 0; i < 0xf; i++)
> > +		if ((i + 1) * 2 * mclk <= pclk)
> > +			break;
> > +	return i;
> > +#endif
> > +	return 0;
> > +}
> 
> This function, if implemented properly, can be used to add an additional
> divider for the sensors master clock. On i.MX27 we can adjust the master
> clock using the clk_set_rate below which is sufficient, so you can
> remove this function completely.

Very good. I'll do this in the next version of this driver.

I guess I can also remove the mclk_get_divisor call at mx2_camera_add_device 
and just leave:

csicr1 = CSICR1_MCLKEN;

Right?

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  reply	other threads:[~2010-05-25 13:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 13:20 [PATCH v2 0/3] Driver for the i.MX2x CMOS Sensor Interface Baruch Siach
2010-05-24 13:20 ` [PATCH v2 1/3] mx2_camera: Add soc_camera support for i.MX25/i.MX27 Baruch Siach
2010-05-25 13:16   ` Sascha Hauer
2010-05-25 13:20     ` Baruch Siach [this message]
2010-05-26  9:10       ` Sascha Hauer
2010-05-25 15:34   ` Guennadi Liakhovetski
2010-05-26  8:13     ` Baruch Siach
2010-05-26  8:17       ` Guennadi Liakhovetski
2010-05-24 13:20 ` [PATCH v2 2/3] mx27: add support for the CSI device Baruch Siach
2010-05-24 13:20 ` [PATCH v2 3/3] mx25: " Baruch Siach
2010-05-24 13:34 ` [PATCH v2 0/3] Driver for the i.MX2x CMOS Sensor Interface Guennadi Liakhovetski
2010-05-24 13:43   ` Baruch Siach
2010-05-25  6:38 ` Sascha Hauer
2010-05-25 14:52 ` Guennadi Liakhovetski

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=20100525132049.GE27702@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=g.liakhovetski@gmx.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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