[U-Boot] [PATCH 3/4] dm: gpio: Correct use of -ENODEV in drivers

sjg at google.com sjg at google.com
Fri Sep 29 21:00:33 UTC 2017


In U-Boot -ENODEV means that there is no device. When there is a problem
with the device, drivers should return an error like -ENXIO or -EREMOTEIO.
When the device tree properties cannot be read correct , they should
return -EINVAL.

Update various GPIO drivers to follow this rule, to help with consistency
for future driver writers.

Signed-off-by: Simon Glass <sjg at chromium.org>
Reported-by: Adam Ford <aford173 at gmail.com>
---

 drivers/gpio/adi_gpio2.c        |  2 +-
 drivers/gpio/atmel_pio4.c       | 12 ++++++------
 drivers/gpio/imx_rgpio2p.c      |  2 +-
 drivers/gpio/mxc_gpio.c         |  2 +-
 drivers/gpio/omap_gpio.c        |  2 +-
 drivers/gpio/tegra186_gpio.c    |  2 +-
 drivers/i2c/imx_lpi2c.c         |  2 +-
 drivers/i2c/mxc_i2c.c           | 12 ++++++------
 drivers/i2c/tegra186_bpmp_i2c.c |  2 +-
 9 files changed, 19 insertions(+), 19 deletions(-)

Applied to u-boot-dm thanks!


More information about the U-Boot mailing list