lkml.org 
[lkml]   [2006]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch -mm 05/20] chardev: GPIO for SCx200 & PC-8736x: put gpio_dump on a diet
On Sat, 17 Jun 2006 12:27:02 -0600
Jim Cromie <jim.cromie@gmail.com> wrote:

> + u32 config = scx200_gpio_configure(index, ~0, 0);
> +
> + printk(KERN_INFO NAME ": GPIO-%02u: 0x%08lx %s %s %s %s %s %s %s\n",
> + index, (unsigned long) config,
> + (config & 1) ? "OE" : "TS", /* output enabled / tristate */
> + (config & 2) ? "PP" : "OD", /* push pull / open drain */
> + (config & 4) ? "PUE" : "PUD", /* pull up enabled/disabled */
> + (config & 8) ? "LOCKED" : "", /* locked / unlocked */
> + (config & 16) ? "LEVEL" : "EDGE", /* level/edge input */
> + (config & 32) ? "HI" : "LO", /* trigger on rising/falling edge */
> + (config & 64) ? "DEBOUNCE" : ""); /* debounce */
> }

Please use hard tabs.

Casting `config' to ulong isn't needed here.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-20 07:28    [W:0.185 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site