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]
Message-ID: <506860C6.5020408@antcom.de>
Date:	Sun, 30 Sep 2012 17:09:58 +0200
From:	Roland Stigge <stigge@...com.de>
To:	Stijn Devriendt <highguy@...il.com>
CC:	grant.likely@...retlab.ca, linus.walleij@...aro.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	w.sang@...gutronix.de, jbe@...gutronix.de,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
	bgat@...lgatliff.com
Subject: Re: [PATCH RFC 1/2] gpio: Add a block GPIO API to gpiolib

Hi Stijn,

On 30/09/12 16:52, Stijn Devriendt wrote:
>> One question: How did you solve the one-value-per-file in the sysfs
>> interface?
>>
> By exporting the group as a whole:
> /sys/.../gpiogroup248/value
> where value contains a decimal representing the group value.
> Again, this respects the ordering of the pins:
> 
> Actual pins: 0x2D (b 0010 1101)
> Selected pins: 6 3 0 1
> Readout: 6 (b 0 1 1 0)
> 
> The export sysfs file does, however, accept multiple gpio IDs for groups.
> Not sure if this is a 'violation' per se...

If I understand correctly, it's a violation (single-value should hold
for read and write).

To solve it, I have the following in mind: /sys/.../gpiogroupXXX/
contains files "bit0" ... "bit31" which contain a gpio number each,
empty if "unconnected".

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