linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] i2c: pca-platform: fix deferred probing
Date: Mon, 5 Jul 2021 22:07:27 +0300	[thread overview]
Message-ID: <d5972dcc-ee2b-b7b2-a1f8-21388f724e50@omp.ru> (raw)
In-Reply-To: <67f7fcd8-797f-b943-02f7-38a0685e96f9@omp.ru>

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@omp.ru>
> 
> ---
> 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

  reply	other threads:[~2021-07-05 19:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 20:17 [PATCH v2 0/3] Fix deferred probing in the I2C bus drivers Sergey Shtylyov
2021-06-24 20:21 ` [PATCH v2 1/3] i2c: iop3xx: fix deferred probing Sergey Shtylyov
2021-06-24 20:23 ` [PATCH v2 2/3] i2c: pca-platform: " Sergey Shtylyov
2021-07-05 19:07   ` Sergey Shtylyov [this message]
2021-06-24 20:26 ` [PATCH v2 3/3] i2c: synquacer: " Sergey Shtylyov

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=d5972dcc-ee2b-b7b2-a1f8-21388f724e50@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=linux-i2c@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).