lkml.org 
[lkml]   [2007]   [Dec]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 29 Dec 2007 07:58:37 +0100
FromSam Ravnborg <>
SubjectRe: [patch 2.6.24-rc6-mm 1/9] gpiolib: add drivers/gpio directory
Hi David.

> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -5,6 +5,7 @@
>  # Rewritten to use lists instead of if-statements.
>  #
> 
> +obj-$(CONFIG_GPIO_LIB)		+= gpio/
>  obj-$(CONFIG_PCI)		+= pci/
>  obj-$(CONFIG_PARISC)		+= parisc/
>  obj-$(CONFIG_RAPIDIO)		+= rapidio/
> --- /dev/null
> +++ b/drivers/gpio/Kconfig
> @@ -0,0 +1,32 @@
> +#
> +# GPIO infrastructure and expanders
> +#
> +
> +config GPIO_LIB
> +	bool
> +	help
> +	  Platforms select gpiolib if they use this infrastructure
> +	  for all their GPIOs, usually starting with ones integrated
> +	  into SOC processors.
> +

kconfig symbols that are "select" targets should be named "HAVE_" so in
this case you could use HAVE_GPIO_LIB.
This is by convention only but introduced to make it visible that this is
a config symbol supposed to be selected.

Then on top of that the HAVE_ symbols should not have any dependencies
so we avoid that "select" selects a symbol where the dependencies are
not fulfilled.

In your case you could just use
obj-y += gpio/

in the Makefile and then there is no need to actually reference the
kconfig symbol.

> --- /dev/null
> +++ b/drivers/gpio/Makefile
> @@ -0,0 +1,6 @@
> +# gpio support: dedicated expander chips, etc
> +
> +ifeq ($(CONFIG_DEBUG_GPIO),y)
> +EXTRA_CFLAGS += -DDEBUG
> +endif

Use of EXTRA_CFLAGS are deprecated. Please use:
ccflags-$(CONFIG_DEBUG_GPIO) := -DDEBUG

	Sam


\
 
 \ /
  Last update: 2007-12-29 08:01    [from the cache]
©2003-2008