Hi, On 19 November 2016 at 07:53, Fabio Estevam <feste...@gmail.com> wrote: > Hi Simon, > > On Sun, Nov 13, 2016 at 7:22 PM, Simon Glass <s...@chromium.org> wrote: > >> drivers/spi/spi-uclass.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c >> index 26eada2..358e229 100644 >> --- a/drivers/spi/spi-uclass.c >> +++ b/drivers/spi/spi-uclass.c >> @@ -415,8 +415,8 @@ int spi_slave_ofdata_to_platdata(const void *blob, int >> node, >> mode |= SPI_TX_QUAD; >> break; >> default: >> - error("spi-tx-bus-width %d not supported\n", value); >> - break; >> + debug("spi-tx-bus-width %d not supported\n", value); >> + return -EPROTONOSUPPORT; > > EPROTONOSUPPORT means: /* Protocol not supported */, which does not > seem to be very appropriate here.
This is a protocol as far as I can see - you can either use one pin or four pins. > > Why not return -EINVAL instead? The value is valid but is not supported. If we just return -EINVAL for anything we don't like, it makes it harder to root-cause the error. In particular we use -EINVAL when decoding the device tree. But EPROTONOSUPPORT is not widely used. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot