aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/tegra186_bpmp_i2c.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-09-17 16:54:53 -0600
committerSimon Glass <sjg@chromium.org>2017-10-08 20:41:09 -0600
commit7c84319af9c76084f50f3f2b97545bfa05f3971d (patch)
treeb4bad5c9afc2ca9dbd59778e306e11b4a34786c2 /drivers/i2c/tegra186_bpmp_i2c.c
parent4d686041895a8fd419bbc3842856239c6298d1f2 (diff)
downloadu-boot-7c84319af9c76084f50f3f2b97545bfa05f3971d.zip
u-boot-7c84319af9c76084f50f3f2b97545bfa05f3971d.tar.gz
u-boot-7c84319af9c76084f50f3f2b97545bfa05f3971d.tar.bz2
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/tegra186_bpmp_i2c.c')
-rw-r--r--drivers/i2c/tegra186_bpmp_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c
index 931c6de..b46a09a 100644
--- a/drivers/i2c/tegra186_bpmp_i2c.c
+++ b/drivers/i2c/tegra186_bpmp_i2c.c
@@ -94,7 +94,7 @@ static int tegra186_bpmp_i2c_probe(struct udevice *dev)
"nvidia,bpmp-bus-id", U32_MAX);
if (priv->bpmp_bus_id == U32_MAX) {
debug("%s: could not parse nvidia,bpmp-bus-id\n", __func__);
- return -ENODEV;
+ return -EINVAL;
}
return 0;