diff mbox

gspca-stk1135: Add delay after configuring clock

Message ID 1383437347-29262-1-git-send-email-linux@rainbow-software.org (mailing list archive)
State New, archived
Headers show

Commit Message

Ondrej Zary Nov. 3, 2013, 12:09 a.m. UTC
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(+)

Comments

Hans de Goede Nov. 17, 2013, 1:41 p.m. UTC | #1
Hi,

On 11/03/2013 01:09 AM, 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);
>   }
>
>   static void stk1135_camera_disable(struct gspca_dev *gspca_dev)
>

Thanks for the patch. I've added this to my tree for 3.13 .

Regards,

Hans

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);
 }
 
 static void stk1135_camera_disable(struct gspca_dev *gspca_dev)