From: Andrew Victor <andrew@sanpeople.com>
To: David Brownell <david-b@pacbell.net>
Cc: hskinnemoen@atmel.com, linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [-mm patch 1/4] GPIO framework for AVR32
Date: 09 Nov 2006 09:26:02 +0200 [thread overview]
Message-ID: <1163057161.14573.180.camel@fuzzie.sanpeople.com> (raw)
In-Reply-To: <20061108180059.845DE1DC95A@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
hi David,
> > > * int gpio_set_direction(unsigned gpio, int is_in /* or
> > > is_out? */)
> > > ... returning 0 or negative errno (for invalid gpio)
> >
> > I think set_output_enable makes more sense, but maybe it's just me.
>
> It's just you. :)
>
> A "set enable" idiom is linguistically redundant too; "set" suffices,
> or "enable". Both imply a need for an opposite "clear" or "disable.
> "Direction" is a more obvious notion; the parameter should likely be
> a symbol like GPIO_IN or GPIO_OUT.
We originally had at91_set_gpio_direction() in the AT91 GPIO layer, and
that seemed to cause confusion (eg, do I pass a 1 or 0 to enable output
mode?)
So I'd personally prefer to keep gpio_set_input() and
gpio_set_output(). (alternative is "enable" instead of "set"). I think
it's more readable.
Regards,
Andrew Victor
next prev parent reply other threads:[~2006-11-09 7:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-07 11:25 [-mm patch 0/4] Atmel SPI driver and related AVR32 changes Haavard Skinnemoen
2006-11-07 11:27 ` [-mm patch 1/4] GPIO framework for AVR32 Haavard Skinnemoen
2006-11-07 11:31 ` [-mm patch 2/4] AVR32: spi/ethernet platform_device update Haavard Skinnemoen
2006-11-07 11:33 ` [-mm patch 3/4] AVR32: Move spi device definitions into main board setup file Haavard Skinnemoen
2006-11-07 11:41 ` [-mm patch 4/4] Atmel SPI driver Haavard Skinnemoen
2006-11-07 14:12 ` [-mm patch 5/4] Atmel SPI driver: MAINTAINERS entry Haavard Skinnemoen
2006-11-07 21:10 ` [-mm patch 1/4] GPIO framework for AVR32 Andrew Morton
2006-11-07 22:37 ` David Brownell
2006-11-08 11:48 ` Haavard Skinnemoen
2006-11-08 18:00 ` David Brownell
2006-11-08 18:57 ` Haavard Skinnemoen
2006-11-08 22:12 ` David Brownell
2006-11-08 22:47 ` Haavard Skinnemoen
2006-11-09 7:26 ` Andrew Victor [this message]
2006-11-09 20:41 ` [Bulk] " David Brownell
2006-11-07 21:36 ` David Brownell
2006-11-08 10:30 ` Haavard Skinnemoen
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=1163057161.14573.180.camel@fuzzie.sanpeople.com \
--to=andrew@sanpeople.com \
--cc=akpm@osdl.org \
--cc=david-b@pacbell.net \
--cc=hskinnemoen@atmel.com \
--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®