Re: [PATCH v2 2/3] i2c: pca-platform: fix deferred probing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

On 6/24/21 11:23 PM, Sergey Shtylyov wrote:

> The driver's probe() method chooses the polling mode if an IRQ # returned
> by platform_get_irq_optional() is 0 or  less.  We'll have to filter out
> -EPROBE_DEFER earlier for the deferred probing to work...
> 
> Fixes: 0e8ce93bdceb ("i2c: pca-platform: add devicetree awareness")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
> 
> ---
> Changed in version 2:
> - new patch.
> 
>  drivers/i2c/busses/i2c-pca-platform.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux/drivers/i2c/busses/i2c-pca-platform.c
> ===================================================================
> --- linux.orig/drivers/i2c/busses/i2c-pca-platform.c
> +++ linux/drivers/i2c/busses/i2c-pca-platform.c
> @@ -139,6 +139,8 @@ static int i2c_pca_pf_probe(struct platf
>  	int irq;
>  
>  	irq = platform_get_irq_optional(pdev, 0);
> +	if (irq == -EPROBE_DEFER)
> +		return irq;

   Perhaps we should just use the polling mode? Or is this change still helpful?

>  	/* If irq is 0, we do polling. */
>  	if (irq < 0)
>  		irq = 0;
> 

MBR, Sergei



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux