diff options
author | Simon Glass <sjg@chromium.org> | 2017-09-18 01:54:53 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-10-09 05:41:09 +0300 |
commit | 7c84319af9c76084f50f3f2b97545bfa05f3971d (patch) | |
tree | b4bad5c9afc2ca9dbd59778e306e11b4a34786c2 /drivers/i2c/imx_lpi2c.c | |
parent | 4d686041895a8fd419bbc3842856239c6298d1f2 (diff) | |
download | u-boot-7c84319af9c76084f50f3f2b97545bfa05f3971d.tar.xz |
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>
Diffstat (limited to 'drivers/i2c/imx_lpi2c.c')
-rw-r--r-- | drivers/i2c/imx_lpi2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c index aa97196e23..e7ec17fe9e 100644 --- a/drivers/i2c/imx_lpi2c.c +++ b/drivers/i2c/imx_lpi2c.c @@ -412,7 +412,7 @@ static int imx_lpi2c_probe(struct udevice *bus) addr = devfdt_get_addr(bus); if (addr == FDT_ADDR_T_NONE) - return -ENODEV; + return -EINVAL; i2c_bus->base = addr; i2c_bus->index = bus->seq; |