On Mon, 2008-06-02 at 19:54 +0200, Guennadi Liakhovetski wrote:I like the idea in general. The biggest worry I have is trying to find the parameter for you to fiddle with. The driver which is going to want to set the parameters is going to have the gpio number, not the gpio_chip. Also, the fact that the parameters are uniquely identified by strings is a bit awkward. I can see people registering the same kind of parameter for different chips like "pullup", "Pullup", "pu" etc making the driver's task even harder. So, I reckon if we're to do this we should stick with the current style of gpio calls for the outside interface, maybe something more like int gpio_set_param(int gpio, int param, int val); int gpio_get_param(int gpio, int param); with the different parameters defined as an enum in some gpio.h somewhere. Where to keep the gpio_parameters and how to search/find them should be up to the implementation (though the gpiolib implementation would probably look quite like what you've got above). Note you'll probably want a char *name in there somewhere for the sysfs interface, but I don't think it should be the primary mechanism for identification. Anyway, that's my $0.02 :-) --Ben. --
| Greg Kroah-Hartman | [PATCH 012/196] nozomi driver |
| Ingo Molnar | Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 |
| Rafael J. Wysocki | [PATCH -mm 5/6] Freezer: Remove PF_NOFREEZE from bluetooth threads |
| Ingo Molnar | Re: [PATCH 00/23] per device dirty throttling -v8 |
git: | |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
