Messages in this thread | | | Date | Wed, 28 May 2008 10:14:25 +0200 | From | Haavard Skinnemoen <> | Subject | Re: Latest gpio gumph |
| |
David Brownell <david-b@pacbell.net> wrote: > - an avr32 patch, appended (no response on the avr32 list)
Sorry about the lack of response.
I'm not all that enthusiastic about this patch though...
> From: David Brownell <dbrownell@users.sourceforge.net> > Subject: AVR32: minor GPIO handling updates > > * gpio_direction_output() should disable the pullups just like > at32_select_gpio(... AT32_GPIOF_OUTPUT) does, for consistency > between those alternative initialization paths.
But then we need to keep track of whether pullups used to be enabled so that we can re-enable it in gpio_direction_input(), don't we?
I can't see the harm of keeping the pullup enabled while the port is configured as output. For consistency, I'd rather honor the pullup flag in at32_select_gpio() regardless of AT32_GPIOF_OUTPUT.
> * On the odd chance some code uses a pin as a GPIO IRQ without > calling gpio_request() or gpio_direction_input(), the debug > dump should still show its pin status.
Hmm. I guess that makes sense, though I would be lying if I said I care all that much. I think gpiolib is going pretty far to accommodate buggy drivers that don't call gpio_request() as it is.
Haavard
| |