[patch 20/20] chardev: GPIO for SCx200:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




This adds current setting info to the 'v' command.
It probably obsoletes the earlier one, I havent dropped it,
pending check for rejects.

Signed-off-by:  Jim Cromie <jim.cromie@xxxxxxxxx>

$ diffstat patch.viewpins-values
nsc_gpio.c |    6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

---

diff -ruNp -X dontdiff -X exclude-diffs ab-18/drivers/char/nsc_gpio.c ab-19/drivers/char/nsc_gpio.c
--- ab-18/drivers/char/nsc_gpio.c	2006-06-02 13:39:45.000000000 -0600
+++ ab-19/drivers/char/nsc_gpio.c	2006-06-02 13:41:29.000000000 -0600
@@ -26,7 +26,7 @@ void nsc_gpio_dump(struct nsc_gpio_ops *
	u32 config = amp->gpio_config(index,0,0);

	/* user requested via 'v' command, so its INFO */
-	dev_info(amp->dev, "io%02u: 0x%04x %s %s %s %s %s %s %s\n",
+	dev_info(amp->dev, "io%02u: 0x%04x %s %s %s %s %s %s %s\tio:%d/%d\n",
		 index, config,
		 (config & 1) ? "OE" : "TS",      /* output-enabled/tristate */
		 (config & 2) ? "PP" : "OD",      /* push pull / open drain */
@@ -34,7 +34,9 @@ void nsc_gpio_dump(struct nsc_gpio_ops *
		 (config & 8) ? "LOCKED" : "",    /* locked / unlocked */
		 (config & 16) ? "LEVEL" : "EDGE",/* level/edge input */
		 (config & 32) ? "HI" : "LO",     /* trigger on rise/fall edge */
-		 (config & 64) ? "DEBOUNCE" : "");        /* debounce */
+		 (config & 64) ? "DEBOUNCE" : "", /* debounce */
+
+		 amp->gpio_get(index), amp->gpio_current(index));
}

ssize_t nsc_gpio_write(struct file *file, const char __user * data,



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux