Re: [PATCH] iio: adc: ti-ads1015: support deferred probe

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

 



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


> 
> 



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux