diff options
author | Julian Andres Klode <jak@jak-linux.org> | 2011-09-27 19:00:49 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-29 17:41:32 -0700 |
commit | e7c40851fd7989dad297988b6343f4e3cb687292 (patch) | |
tree | 5f5f6aff95009f20ca4b24e8ff5ef7da8476a6e7 /drivers/staging/nvec | |
parent | 0b1076c4b2a06e517fafbb2b4704f23e69b05386 (diff) | |
download | linux-e7c40851fd7989dad297988b6343f4e3cb687292.tar.bz2 |
staging: nvec: Introduce nvec_gpio_set_value()
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@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/nvec')
-rw-r--r-- | 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 fb0f51a2b0bf..17f5abfcb780 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -114,6 +114,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) { |