[PATCH 1/3] ARM: SAMSUNG: Add config option for number of additional GPIO pins.

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Jan 11 05:33:39 EST 2010


On Mon, Jan 11, 2010 at 06:44:06PM +0900, Kukjin Kim wrote:

> +config SAMSUNG_GPIO_EXTRA
> +	int "Number of additional GPIO pins"
> +	default 0
> +	help
> +	  Use additional GPIO space in addition to the GPIO's the SOC
> +	  provides. This allows expanding the GPIO space for use with
> +	  GPIO expanders.
> +

The way this has been handled for previous Samsung variants is to make
it entirely hidden from users and provide selectable values for defining
the number so you end up with something like:

	config SAMSUNG_GPIO_EXTRA
	int
	default 64 if SAMSUNG_GPIO_64
	default 32 if SAMSUNG_GPIO_32
	default 0

The board drivers then select one of the numeric options.  They should
know how many GPIOs they need, while end users rebuilding their kernels
don't need to know this since at least code if not hardware changes will
be required to change it usefully.



More information about the linux-arm-kernel mailing list