Introduce nvec_gpio_set_value(), which works like gpio_set_value(), but also creates a debugging message, if that's enabled. Signed-off-by: Julian Andres Klode <jak@xxxxxxxxxxxxx> --- drivers/staging/nvec/nvec.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 8a97241..ab74b8a 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -112,6 +112,13 @@ static void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg) atomic_set(&msg->used, 0); } +static void nvec_gpio_set_value(struct nvec_chip *nvec, int value) +{ + dev_dbg(nvec->dev, "GPIO changed from %u to %u\n", + gpio_get_value(nvec->gpio), value); + gpio_set_value(nvec->gpio, value); +} + void nvec_write_async(struct nvec_chip *nvec, const unsigned char *data, short size) { -- 1.7.5.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel