]> git.ipfire.org Git - people/ms/u-boot.git/commit
dm: gpio: Correct use of -ENODEV in drivers
authorSimon Glass <sjg@chromium.org>
Sun, 17 Sep 2017 22:54:53 +0000 (16:54 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 9 Oct 2017 02:41:09 +0000 (20:41 -0600)
commit7c84319af9c76084f50f3f2b97545bfa05f3971d
treeb4bad5c9afc2ca9dbd59778e306e11b4a34786c2
parent4d686041895a8fd419bbc3842856239c6298d1f2
dm: gpio: Correct use of -ENODEV in drivers

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@chromium.org>
Reported-by: Adam Ford <aford173@gmail.com>
drivers/gpio/adi_gpio2.c
drivers/gpio/atmel_pio4.c
drivers/gpio/imx_rgpio2p.c
drivers/gpio/mxc_gpio.c
drivers/gpio/omap_gpio.c
drivers/gpio/tegra186_gpio.c
drivers/i2c/imx_lpi2c.c
drivers/i2c/mxc_i2c.c
drivers/i2c/tegra186_bpmp_i2c.c