Linux IIO development
 help / color / mirror / Atom feed
From: Tomas Melin <tomas.melin@vaisala.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org, jic23@kernel.org,
	u.kleine-koenig@pengutronix.de
Subject: Re: [PATCH] iio: adc: ti-ads1015: support deferred probe
Date: Wed, 6 Sep 2023 08:59:09 +0300	[thread overview]
Message-ID: <b34d2c94-ae78-c7ee-9352-12f4ee1c0294@vaisala.com> (raw)
In-Reply-To: <38f995ab-99de-1d88-696e-edc78e24c8b2@metafoo.de>

On 05/09/2023 15:31, Lars-Peter Clausen wrote:
> On 9/5/23 04:43, Tomas Melin wrote:
>> Hi,
>>
>> Point is, that if the communication to the i2c bus has some temporary
>> error like EAGAIN, why could it not be reasonable to try again at a
>> later time instead of giving up completely.
> 
> The way probe deferral works, or is supposed to work, is that if a 
> driver detects that it is missing a resource to initialize the device it 
> can return EPROBE_DEFER to try again later. Once a new resource becomes 
> available it will try again. In your case there is no resource 
> dependency, but just a random failure. So there is no guarantee that 
> probe will actually be called again since there might not be any new 
> resources that become available.
> 
> The solution you've implemented might work on your specific platform, 
> but it does not work by design, it only works by chance. Returning 
> EPROBE_DEFER for things like IO errors is not the right approach. If you 
> need a quick hack you can for example write a small userspace script 
> that will trigger re-probe of the device at system startup.
Right, I will need to take a different approach with this. Thanks for
the input!

Tomas


> 
> 

  reply	other threads:[~2023-09-06  5:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 10:15 [PATCH] iio: adc: ti-ads1015: support deferred probe Tomas Melin
2023-09-04 11:23 ` Andy Shevchenko
2023-09-04 13:12   ` Jonathan Cameron
2023-09-05 11:43     ` Tomas Melin
2023-09-05 12:31       ` Lars-Peter Clausen
2023-09-06  5:59         ` Tomas Melin [this message]
2023-09-05 12:38       ` Andy Shevchenko
2023-09-05  6:13   ` Tomas Melin
2023-09-05 10:45     ` Andy Shevchenko
2023-09-05 11:44       ` Tomas Melin

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=b34d2c94-ae78-c7ee-9352-12f4ee1c0294@vaisala.com \
    --to=tomas.melin@vaisala.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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