AST2500 I2C problem

Patrick Williams patrick at stwcx.xyz
Tue Feb 25 07:41:39 AEDT 2020


On Sat, Feb 22, 2020 at 12:03:08AM +0300, Konstantin Klubnichkin wrote:
> If you have an idea where to look deeper, please give me a hint as I'm stuck...

Sorry Konstantin, I don't.

I can understand why drivers under the pmbus / hwmon subsystems might
get probed before the i2c, and before the owning i2c master is
initialized.  This is what the EPROBE_DEFER is suppose to handle.  I
don't know why it isn't being detected in the i2c-slave driver properly
and turned into an EPROBE_DEFER.

I suspect this is a simple state check on the i2c master object in the
kernel, but I'd have to search through source code myself.  For example
in the i2c-slave driver I'd expect to see something like (pseudo-code):

    if (!dev_is_probed(driver->master)) { return -EPROBE_DEFER; }

Or else, something in the devtree probe ordering code that would have
realized that `driver->master` hasn't been probed yet and ordered the
slave later automatically.

Maybe there are others on the list that write drivers more often that
might know better...

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200224/365af2cc/attachment-0001.sig>


More information about the openbmc mailing list