On Wed, 2008-04-30 at 15:47 -0700, Trent Piepho wrote:We've discussed the down sides of your model. It's got up sides, eg your use case is made very easy, but it ain't all roses. Now, if the kernel has requested that pin and hasn't exported it you can't touch it. This is what we want. Otherwise you will walk the gpiochips, find your chip's base and use it to calculate the gpio number. If the kernel's exported it then the file will be there to use. If the kernel hasn't requested it then you can do so by using the control file. Yes it's longer and harder and more convoluted. It's also much more safe. That label was always just supposed to be a debugging aid, i.e. something to show up in debugfs. This is used to reduce D footprint. Maybe if the labels are being stored anyway they can be made available through sysfs as well as debugfs? That's very useful indeed, but if you don't want userspace to be able to do that it's also dangerous. This is why the kernel has to explicitly allow it. So you want userspace to be able to clobber any gpio which is used by the kernel? That's what this version of the interface is designed to avoid! The way to see it in sysfs is to have the kernel export it. This is the point. The kernel should request it for it's own use then export it if it wants userspace to be able to touch it as well. If driver was using it, it will have requested it. If you are looking at it then the kernel must have also exported it. If the kernel's exported it then nothing you can do will unexport it. You can only unexport gpios you've exported yourself manually and the only gpios you can do this to are ones unused by the driver. --
| Linus Torvalds | Linux 2.6.27-rc5 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Eric Paris | [RFC 0/5] [TALPA] Intro to a linux interface for on access scanning |
git: | |
| Johannes Sixt | [PATCH 02/40] Compile some programs only conditionally. |
| Linus Torvalds | [PATCH 0/6] Initial subproject support (RFC?) |
| Jon Smirl | Figured out how to get Mozilla into git |
| Linus Torvalds | irc usage.. |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Richard Stallman | Real men don't attack straw men |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Tony Bruguier | [newbie] ssh and sftp timing out |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Doug Evans | Re: Stabilizing Linux |
| Joseph R. Pannon | Re: Ctrl-Alt-Del |
| Pat Rankin | Re: Nethack + Linux, Please Help! |
| Problem in Inserting a module | 31 minutes ago | Linux kernel |
| usb mic not detected | 1 hour ago | Applications and Utilities |
| Treason Uncloaked | 5 hours ago | Linux kernel |
| Shared swap partition | 17 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
