Re: Latest gpio gumph

From: Haavard Skinnemoen
Date: Wed May 28 2008 - 04:17:36 EST


David Brownell <david-b@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx>
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/