lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 3 Apr 2008 20:33:09 -0700 (PDT)
From:	Trent Piepho <tpiepho@...escale.com>
To:	Ben Nizette <bn@...sdigital.com>
cc:	David Brownell <david-b@...bell.net>,
	Jean Delvare <khali@...ux-fr.org>,
	Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [patch/rfc 2/4] pcf875x I2C GPIO expander driver

On Fri, 4 Apr 2008, Ben Nizette wrote:
> On Thu, 2008-04-03 at 19:06 -0700, Trent Piepho wrote:
>> On Fri, 30 Nov 2007, David Brownell wrote:
>>> On Friday 30 November 2007, Jean Delvare wrote:
>>>>
>>>> So the user-space interface would be part of the generic GPIO
>>>> infrastructure? I like the idea.
>>>
>>> I thought that would make sense too! :)  Someone would need to
>>> write the code though.  Having such a mechanism would provide
>>> another "carrot" to migrate folk towards the gpiolib core.
>>
>> Here's some code to do this.  It's not entirely perfect yet, but it is
>> usable.
>
> I quite like the fact that this easily tracks labels but I like the
> interface of simple_gpio posted a few days back:
> http://lkml.org/lkml/2008/3/26/87
>
> Either way, anything unified is good.

Always too slow posting my patches.  I wrote this two months ago when there
wasn't anything else.

A char device allows better permissions and could be more efficient, if one
really wants to do extensive control of gpio lines from userspace.  I can see
how it might be preferrable in some instances.

The nice thing about sysfs is that you don't need any extra software to
interact with it.  It's very convienent when you're just trying to debug the
gpio driver you're writing or verify that the gpio lines you just connected
are doing things.  It's also nice to be able to say something like:
# run these commands to un-write protect flash
echo out > /sys/class/gpio/MPC85XX:5/direction
echo 1 > /sys/class/gpio/MPC85XX:5/value

Instead of a complicated process that includes directions for creating the
correct device file, compiling a program that will set gpio lines, downloading
said program's source, and so on.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ