Re: [patch 05/20] chardev: GPIO for SCx200: shrink scx200_gpio_dump

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

 



Jesper Juhl wrote:
On 12/06/06, Jim Cromie <jim.cromie@xxxxxxxxx> wrote:


Shrink scx200_gpio_dump to a single printk with ternary ops.
- still coddled in its if 0  (merge with later patch ?)
- maybe do pdev_info here too.


(hmm, patch 04/20 seems to have gone missing for me, did you forget to send it?)

I botched the subject  "0X/20" and no specifics.
it should say "04/20  use unsigned-minors"


+ 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 */

This was previously KERN_DEBUG, but now it's KERN_INFO. Why the
change? Is this info really relevant in non-debug scenarios?


I'll rationalize it ;) as follows:

- when function is (RSN) wired into the command dispatcher, it will
become possible for users of the device-file to easily trigger a logging of the
pin settings.  I raised it to INFO, since a) it is user triggerable,
so when they use it, they want to see the answer (debug often is suppressed),
and b) because they can inspect pin state when needed, they dont need all
the state-update INFO messages (as much), and theyre later reduced to DEBUGs



Like the change otherwise.


PS. Not going to look at more patches tonight - need sleep..


thanks


--
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