[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1362507414.28106.62.camel@petert>
Date: Tue, 05 Mar 2013 12:16:54 -0600
From: Peter Tyser <ptyser@...-inc.com>
To: Jean Delvare <khali@...ux-fr.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Grant Likely <grant.likely@...retlab.ca>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH 1/2] gpio-ich: Check for pin availability at request time
Hi Jean,
On Tue, 2013-03-05 at 09:06 +0100, Jean Delvare wrote:
> Stop checking for pin availability in get functions. These functions
> can be called repeatedly, so checking every time is bad for
> performance.
>
> Instead, check at pin request time. This only happens once, and we can
> let the caller know of the unavailability much earlier.
Is there a reason to not remove the ichx_gpio_check_available() calls
from the ichx_gpio_direction_output() and ichx_gpio_direction_input()
functions in this change?
I had originally assumed these checks were to support the "legacy"
interface where users could use the GPIOs without first requesting the
GPIO, but after looking a bit further it looks like the gpiolib code to
set a GPIO as an input or output does auto-request the GPIO before
setting its direction. So I'd assume your 1 check in
ichx_gpio_request() would cover the "legacy" interface too.
Best,
Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists