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?

Julian Coleman <jdc%coris.org.uk@localhost> writes:

> Hi,


> 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.:
>   https://nxr.netbsd.org/xref/src/sys/dev/ic/bmx280.c#424
> This might be beneficial, because it looks to me that we set up the sysctl
> tree even if there are errors communicating with the chip.
> Regards,
> Julian


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 may get to this when time allows, but do not object if someone else
gets to it first.

Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS - http://anduin.eldar.org

Home | Main Index | Thread Index | Old Index