public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Ondrej Zary <linux@rainbow-software.org>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] [RESEND] gspca-stk1135: Add delay after configuring clock
Date: Mon, 11 Nov 2013 23:46:36 +0100	[thread overview]
Message-ID: <52815E4C.2080103@gmail.com> (raw)
In-Reply-To: <201311112331.37052.linux@rainbow-software.org>

Hi Ondrej,

On 11/11/2013 11:31 PM, Ondrej Zary wrote:
> Add a small delay at the end of configure_clock() to allow sensor to initialize.
> This is needed by Asus VX2S laptop webcam to detect sensor type properly (the already-supported MT9M112).
>
> Signed-off-by: Ondrej Zary<linux@rainbow-software.org>
> ---
>   drivers/media/usb/gspca/stk1135.c |    3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/usb/gspca/stk1135.c b/drivers/media/usb/gspca/stk1135.c
> index 8add2f7..d8a813c 100644
> --- a/drivers/media/usb/gspca/stk1135.c
> +++ b/drivers/media/usb/gspca/stk1135.c
> @@ -361,6 +361,9 @@ static void stk1135_configure_clock(struct gspca_dev *gspca_dev)
>
>   	/* set serial interface clock divider (30MHz/0x1f*16+2) = 60240 kHz) */
>   	reg_w(gspca_dev, STK1135_REG_SICTL + 2, 0x1f);
> +
> +	/* wait a while for sensor to catch up */
> +	udelay(1000);

Instead of this 1 ms busy loop waiting it might be more optimal to use 
usleep_range(),
e.g. usleep_range(1000, 1100);

>   }
>
>   static void stk1135_camera_disable(struct gspca_dev *gspca_dev)

--
Regards,
Sylwester

      reply	other threads:[~2013-11-11 22:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 22:31 [PATCH] [RESEND] gspca-stk1135: Add delay after configuring clock Ondrej Zary
2013-11-11 22:46 ` 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=52815E4C.2080103@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@rainbow-software.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