lkml.org 
[lkml]   [2023]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] drivers: rtc: max31335: initial commit
From
On 10/31/23 04:23, Miclaus, Antoniu wrote:
[ ... ]
>>> + if (status != MAX31335_STATUS1_DEFAULT)
>>> + dev_err_probe(&client->dev, -EINVAL,
>>> + "Unable to read from device.\n");
>>> +
>>
>> That is misleading. The device returned an unexpected status.
>> I don't know if this really reflects a problem, but it is not
>> "Unable to read from device".
>>
>
> Since the device lacks an ID register, I found this as a suitable
> replacement for checking that the communication with the
> device actually works before the probe function finishes
> successfully.
>

But the register read was successful. Also, why would you want to not
instantiate the driver if the chip runs on VBAT, if the oscillator
is running, if VBAT is low, or if some interrupt is pending for
some reason ?

Guenter

\
 
 \ /
  Last update: 2023-10-31 15:00    [W:1.356 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site