Port-arm archive

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

Re: Arm drivers: are device tree descriptions required for every device?


> > Specifically for bmx280, we could fail earlier so that we only see one
> > error line, by adding "goto out" in the error checks, e.g.:

> Ya, that probably wouldn't be a bad thing.  I might be inclined to allow
> the reset to fail, however, and only exit early if the getting of the
> device ID fails, which is down just a bit at 436 or so (don't forget to
> release the bus.... which is probably why I did it the way I did... the
> attach will not get much further anyway.... and exit early when it tries
> to read the chip specific parameters... looks like if sysctl set up
> fails it doesn't release the bus either, which would not be a proper
> thing to do).

I missed that - reset failed when the sensor was present, so indeed that's
not a good place to fail.  However, now I'm puzzled that we don't see the
messages printed by the following reads.  There was only:

> [     1.000000] bmx280thp1 at iic2 addr 0x76
> [     1.000000] bmx280thp1: autoconfiguration error: Failed to reset chip: 5
> [     1.000000] bmx280thp1: autoconfiguration error: Unable to setup device

and it looks like we're missing error printouts for "Failed to read ID" and
"Failed to read the calibration registers for tp".  Does this mean that on
the Raspberry Pi zero the write failed but the read succeeded for a device
that wasn't present?  Or maybe this is specific to iic2 only?




Home | Main Index | Thread Index | Old Index