public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: video4linux-list@redhat.com
Subject: Re: [PATCH, RFC] mt9m111: allow data to be received on pixelclock falling edge?
Date: Fri, 07 Nov 2008 19:03:54 +0100	[thread overview]
Message-ID: <874p2jbegl.fsf@free.fr> (raw)
In-Reply-To: <20081107125919.ddf028a6.ospite@studenti.unina.it> (Antonio Ospite's message of "Fri\, 7 Nov 2008 12\:59\:19 +0100")

Antonio Ospite <ospite@studenti.unina.it> writes:

> Now I have many questions:
>
> * Can the same sensor model have different default hardwired values?
>   I am referring to IO/Timings differences between mt9m111 on A910
>   and A780
Technically, yes.
Even the sensor can sometimes be configured to dump its date on falling edge
rather than rising edge. See MT9M111 datasheet, register 0x13a (Output Format
Control 2), bit 9.

> * Should I change the sensor setup instead of changing its advertised
>   capabilities? Maybe modifying mt9m111 so it can use platform data?
Would't it be better to change format negociation instead : patch in mt9m111.c
the mt9m111_query_bus_param() function, add SOCAM_PCLK_SAMPLE_FALLING, and add
necessary handling in the mt9m111_set_bus_param() ? That would be a little
extension of your attached patch ...

> * Is the pxa-camera code dealing with PXA_CAMERA_PCP too conservative?
>   Shouldn't PXA_CAMERA_PCP be independent from the specific sensor
>   capabilities? it is a valid pxa-camera setting even if it produces
>   wrong results with the specific sensor.
Well, I don't understand something here : you have to configure the sensor to
output data on rising edge, while the PXA is reading them on the falling edge,
am I right ? Would that mean the clock signal is inverted by the hardware ? I
don't really understand that part ...

> @@ -410,7 +410,8 @@ static int mt9m111_stop_capture(struct soc_camera_device *icd)
>
>  static unsigned long mt9m111_query_bus_param(struct soc_camera_device *icd)
>  {
> - return SOCAM_MASTER | SOCAM_PCLK_SAMPLE_RISING |
> + return SOCAM_MASTER |
> +   SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING |
>     SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH |
>     SOCAM_DATAWIDTH_8;
>  }
Don't forget mt9m111_set_bus_param(), and add an entry in struct mt9m111 to
remember the setting on suspend/resume. Amend accordingly mt9m111_setup_pixfmt()
with the new field in mt9m111_set_bus_param().

--
Robert

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  reply	other threads:[~2008-11-07 18:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 11:59 [PATCH, RFC] mt9m111: allow data to be received on pixelclock falling edge? Antonio Ospite
2008-11-07 18:03 ` Robert Jarzmik [this message]
2008-11-08 20:36   ` Guennadi Liakhovetski
2008-11-09 22:59     ` Antonio Ospite
2008-11-10 18:55       ` Guennadi Liakhovetski
2008-11-10 19:06         ` Robert Jarzmik
2008-11-12 18:27           ` Antonio Ospite
2008-12-01 20:54             ` Guennadi Liakhovetski
2008-12-03 18:51               ` Antonio Ospite
2009-02-17 10:28               ` Antonio Ospite

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=874p2jbegl.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=ospite@studenti.unina.it \
    --cc=video4linux-list@redhat.com \
    /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