On Thursday 03 April 2008, Ben Nizette wrote:I won't much care about /dev/... vs /sys/... though I'd probably have used sysfs myself (just because it's much simpler and doesn't need to imply mdev/udev and classes). The configuration part of each driver bothers me: - Mike's simple_gpio requires manual kernel config to set up the platform_device nodes ... and thus rules out the first usage scenarios I ever heard of for such a userspace mechanism. - Trent's gpio_class exposes all GPIOs, even ones that are claimed by kernel drivers ... and thus makes it easy to clobber kernel driver state. (Plus it won't work on most built-in GPIOs, since they by and large don't have parent devices.) What I'd like to see is userspace config commands to cause the gpio_request() ... *maybe* something like echo 42 foo 0 > .../gpio_config ... causing error-checked versions of: gpio_request(42, "foo") gpio_direction_output(42, 0) ... then some .../gpio42 file, read/write, appears and echo 84 bar in > .../gpio_config ... causing error-checked versions of: gpio_request(84, "bar") gpio_direction_input(84) ... then some .../gpio84 file, read-only, appears Though arguably the label could just always be "userspace" (it's mostly for /sys/kernel/debug/gpio), and the default could be to configure as an input (unless an output value was given). Plus, there should be some way to cause gpio_free() too. A potential advantage of the /dev/... node approach would be that it's easier to support an IRQ-backed poll() mechanism for inputs. - Dave --
| monstr | [PATCH 26/60] microblaze_v4: time support |
| Jon Smirl | Re: 463 kernel developers missing! |
| Andrew Morton | Re: x86: 4kstacks default |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | Re: [GIT]: Networking |
| Jiri Olsa | [PATCHv5 0/2] net: fix race in the receive/select |
