Re: [PATCH v4 08/17] media: i2c: rdacm21: Add dealy after OV490 reset

2021-04-14 Thread Laurent Pinchart
Hi Jacopo,

Thank you for the patch.

On Mon, Apr 12, 2021 at 11:34:42AM +0200, Jacopo Mondi wrote:
> Add a delay after the OV490 chip is put in reset state. The reset
> signal shall be held for at least 250 useconds.
> 
> Signed-off-by: Jacopo Mondi 

With s/dealy/delay/ in the subject line,

Reviewed-by: Laurent Pinchart 

> ---
>  drivers/media/i2c/rdacm21.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
> index 553e3f03752b..6be8ce130e78 100644
> --- a/drivers/media/i2c/rdacm21.c
> +++ b/drivers/media/i2c/rdacm21.c
> @@ -469,7 +469,10 @@ static int rdacm21_initialize(struct rdacm21_device *dev)
>   if (ret)
>   return ret;
>  
> - /* Enable GPIO1 and hold OV490 in reset during max9271 configuration. */
> + /*
> +  * Enable GPIO1 and hold OV490 in reset during max9271 configuration.
> +  * The reset signal has to be asserted for at least 250 useconds.
> +  */
>   ret = max9271_enable_gpios(>serializer, MAX9271_GPIO1OUT);
>   if (ret)
>   return ret;
> @@ -477,6 +480,7 @@ static int rdacm21_initialize(struct rdacm21_device *dev)
>   ret = max9271_clear_gpios(>serializer, MAX9271_GPIO1OUT);
>   if (ret)
>   return ret;
> + usleep_range(250, 500);
>  
>   ret = max9271_configure_gmsl_link(>serializer);
>   if (ret)

-- 
Regards,

Laurent Pinchart


Re: [PATCH v4 08/17] media: i2c: rdacm21: Add dealy after OV490 reset

2021-04-14 Thread Kieran Bingham
Hi Jacopo,

There's still a s/dealy/delay/ in $SUBJECT

On 12/04/2021 10:34, Jacopo Mondi wrote:
> Add a delay after the OV490 chip is put in reset state. The reset
> signal shall be held for at least 250 useconds.
> 
> Signed-off-by: Jacopo Mondi 

I added this on v3...

Reviewed-by: Kieran Bingham 

> ---
>  drivers/media/i2c/rdacm21.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
> index 553e3f03752b..6be8ce130e78 100644
> --- a/drivers/media/i2c/rdacm21.c
> +++ b/drivers/media/i2c/rdacm21.c
> @@ -469,7 +469,10 @@ static int rdacm21_initialize(struct rdacm21_device *dev)
>   if (ret)
>   return ret;
>  
> - /* Enable GPIO1 and hold OV490 in reset during max9271 configuration. */
> + /*
> +  * Enable GPIO1 and hold OV490 in reset during max9271 configuration.
> +  * The reset signal has to be asserted for at least 250 useconds.


Is it worth mentioning here that it is asserted to active low? Just to
make it clear that holding it low for 250 uS is the desired effect?

It might not be worth it - but perhaps that was the reason for some
confusion here.

Eitherway RB tag still stands I think.

--
Kieran

> +  */
>   ret = max9271_enable_gpios(>serializer, MAX9271_GPIO1OUT);
>   if (ret)
>   return ret;
> @@ -477,6 +480,7 @@ static int rdacm21_initialize(struct rdacm21_device *dev)
>   ret = max9271_clear_gpios(>serializer, MAX9271_GPIO1OUT);
>   if (ret)
>   return ret;
> + usleep_range(250, 500);
>  
>   ret = max9271_configure_gmsl_link(>serializer);
>   if (ret)
> 



[PATCH v4 08/17] media: i2c: rdacm21: Add dealy after OV490 reset

2021-04-12 Thread Jacopo Mondi
Add a delay after the OV490 chip is put in reset state. The reset
signal shall be held for at least 250 useconds.

Signed-off-by: Jacopo Mondi 
---
 drivers/media/i2c/rdacm21.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
index 553e3f03752b..6be8ce130e78 100644
--- a/drivers/media/i2c/rdacm21.c
+++ b/drivers/media/i2c/rdacm21.c
@@ -469,7 +469,10 @@ static int rdacm21_initialize(struct rdacm21_device *dev)
if (ret)
return ret;
 
-   /* Enable GPIO1 and hold OV490 in reset during max9271 configuration. */
+   /*
+* Enable GPIO1 and hold OV490 in reset during max9271 configuration.
+* The reset signal has to be asserted for at least 250 useconds.
+*/
ret = max9271_enable_gpios(>serializer, MAX9271_GPIO1OUT);
if (ret)
return ret;
@@ -477,6 +480,7 @@ static int rdacm21_initialize(struct rdacm21_device *dev)
ret = max9271_clear_gpios(>serializer, MAX9271_GPIO1OUT);
if (ret)
return ret;
+   usleep_range(250, 500);
 
ret = max9271_configure_gmsl_link(>serializer);
if (ret)
-- 
2.31.1