This isolates the custom S3C24xx GPIO definition table to <linux/platform_data/gpio-samsung-s3x24xx.h> as this is used in a few different places in the kernel, removing the need to depend on the implicit inclusion of <mach/gpio.h> from <linux/gpio.h> and thus getting rid of a few nasty cross-dependencies. We also delete the nifty CONFIG_S3C24XX_GPIO_EXTRA stuff. The biggest this can ever be for the S3C24XX is CONFIG_S3C24XX_GPIO_EXTRA = 128, and then for CPU_S3C2443 or CPU_S3C2416 32*12 GPIOs are added, so 32*12+128 = 512 is the absolute roof value on this platform. So we set the size of ARCH_NR_GPIO to this and the GPIOs array will fit any S3C24XX platform, as per pattern from other archs. ChangeLog v2->v3: - Move the movement of the S3C64XX gpio.h file out of this patch and into the follow-up patch where it belongs. ChangeLog v1->v2: - Added an #ifdef ARCH_S3C24XX around the header inclusion in drivers/gpio/gpio-samsung.c as we would otherwise have colliding definitions when compiling S3C64XX. - Rename inclusion guard in the header file. Cc: Tomasz Figa <tomasz.figa@gmail.com> Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: linux-samsung-soc@vger.kernel.org Acked-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
31 lines
934 B
C
31 lines
934 B
C
/* linux/arch/arm/plat-s3c24xx/setup-ts.c
|
|
*
|
|
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
|
* http://www.samsung.com/
|
|
*
|
|
* Based on S3C24XX setup for i2c device
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/gpio.h>
|
|
#include <linux/platform_data/gpio-samsung-s3c24xx.h>
|
|
|
|
struct platform_device; /* don't need the contents */
|
|
|
|
#include <mach/hardware.h>
|
|
|
|
/**
|
|
* s3c24xx_ts_cfg_gpio - configure gpio for s3c2410 systems
|
|
*
|
|
* Configure the GPIO for the S3C2410 system, where we have external FETs
|
|
* connected to the device (later systems such as the S3C2440 integrate
|
|
* these into the device).
|
|
*/
|
|
void s3c24xx_ts_cfg_gpio(struct platform_device *dev)
|
|
{
|
|
s3c_gpio_cfgpin_range(S3C2410_GPG(12), 4, S3C_GPIO_SFN(3));
|
|
}
|