Skip to content

Commit

Permalink
staging: nvec: Introduce nvec_gpio_set_value()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julian Andres Klode authored and Greg Kroah-Hartman committed Sep 30, 2011
1 parent 0b1076c commit e7c4085
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/staging/nvec/nvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit e7c4085

Please sign in to comment.