1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

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>
This commit is contained in:
Simon Glass
2017-09-17 16:54:53 -06:00
parent 4d68604189
commit 7c84319af9
9 changed files with 19 additions and 19 deletions

View File

@@ -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;