[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <808c8e9d1002262111i62703fd0t300616bc742deec5@mail.gmail.com>
Date: Fri, 26 Feb 2010 23:11:26 -0600
From: Ben Gardner <gardner.ben@...il.com>
To: Andres Salomon <dilinger@...labora.co.uk>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
David Brownell <dbrownell@...rs.sourceforge.net>,
Jani Nikula <ext-jani.1.nikula@...ia.com>
Subject: Re: [PATCH 1/3] gpiolib: add gpio_set_direction()
> How about something like the following for set_direction, so we're not
> comparing magic bits?
>
> /* gpio direction flags */
> #define GPIO_DIR_NONE 0
> #define GPIO_DIR_INPUT (1 << 0)
> #define GPIO_DIR_OUTPUT (1 << 1)
Sounds good and it looks like those macros aren't used anywhere else.
Maybe also add a define for inout?
#define GPIO_DIR_INOUT (GPIO_DIR_INPUT | GPIO_DIR_OUTPUT)
Ben
--
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