From: Peter Tyser <ptyser@xes-inc.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 1/2] gpio-ich: Check for pin availability at request time
Date: Tue, 05 Mar 2013 12:16:54 -0600 [thread overview]
Message-ID: <1362507414.28106.62.camel@petert> (raw)
In-Reply-To: <20130305090620.2c9f1ff5@endymion.delvare>
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
next prev parent reply other threads:[~2013-03-05 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 8:06 Jean Delvare
2013-03-05 18:16 ` Peter Tyser [this message]
2013-03-05 19:40 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362507414.28106.62.camel@petert \
--to=ptyser@xes-inc.com \
--cc=grant.likely@secretlab.ca \
--cc=khali@linux-fr.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®