lkml.org 
[lkml]   [2011]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC] gpio: add GPIOF_ values regardless on kconfig settings
On 21:58 Mon 23 May     , Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Make GPIOF_ defined values available even when GPIOLIB nor GENERIC_GPIO
> is enabled by moving them to <linux/gpio.h>.
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Looks good.

We probably may also want to move definition of struct gpio into
include/linux/gpio.h to make things like this work as well:

static struct gpio some_gpios[] = {
{ GPIO_BLAH, GPIOF_IN, "BLAH"},
{ GPIO_BLAH2, GPIOF_OUT_INIT_LOW, "BLAH2"},
};

static int some_init_function(void)
{
/* ... */

gpio_request_array(some_gpios, ARRAY_SIZE(some_gpios));

/* ... */
}

These gpio_request_one() and gpio_request_array() are quite handy, so I
suppose more and more drivers will use it as we go...

--
Best regards,
Dmitry "MAD" Artamonow



\
 
 \ /
  Last update: 2011-05-24 07:27    [W:0.178 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site