Do not stop the loop that configures gpio chipselect pins on the first

error, just ignore pins that don't configure and keep setting up the ones
that do.  (But when bootverbose is on, whine about the errors.)
This commit is contained in:
Ian Lepore 2018-03-05 02:08:33 +00:00
parent 25d90d5c97
commit a3389cb736

View file

@ -541,7 +541,7 @@ spi_attach(device_t dev)
/* Allocate gpio pins for configured chip selects. */
node = ofw_bus_get_node(sc->dev);
for (err = 0, idx = 0; err == 0 && idx < nitems(sc->cspins); ++idx) {
for (idx = 0; idx < nitems(sc->cspins); ++idx) {
err = gpio_pin_get_by_ofw_propidx(sc->dev, node, "cs-gpios",
idx, &sc->cspins[idx]);
if (err == 0) {