summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-06-05 11:36:10 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-06-10 10:15:46 +0200
commita713890d32900459031d344748a23ca37758bec5 (patch)
treee3c7d335134712ec7075cbe5c41ef5f2915b5020 /drivers/gpio
parent8405f2089488c39b10e63b6522fcabc60fbd025a (diff)
downloadlinux-a713890d32900459031d344748a23ca37758bec5.tar.gz
linux-a713890d32900459031d344748a23ca37758bec5.tar.bz2
linux-a713890d32900459031d344748a23ca37758bec5.zip
gpio: improve error reporting on own descriptors
When requesting own descriptors through hogs, it is useful to get some details about what's going on if we encounter problems. Acked-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 07b83a9e9821..7f87b9baa905 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2131,13 +2131,15 @@ int gpiod_hog(struct gpio_desc *desc, const char *name,
local_desc = gpiochip_request_own_desc(chip, hwnum, name);
if (IS_ERR(local_desc)) {
- pr_err("requesting own GPIO %s failed\n", name);
+ pr_err("requesting hog GPIO %s (chip %s, offset %d) failed\n",
+ name, chip->label, hwnum);
return PTR_ERR(local_desc);
}
status = gpiod_configure_flags(desc, name, lflags, dflags);
if (status < 0) {
- pr_err("setup of GPIO %s failed\n", name);
+ pr_err("setup of hog GPIO %s (chip %s, offset %d) failed\n",
+ name, chip->label, hwnum);
gpiochip_free_own_desc(desc);
return status;
}