Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0026418 authored by Vasily Khoruzhick's avatar Vasily Khoruzhick Committed by Ben Dooks
Browse files

ARM: S3C244X: fix gpiolib port J support



Increase GPIOs number for S3C244X, and make S3C_GPIO_END
point to BANKJ end, otherwise gpiolib refuses to register
BANKJ

Signed-off-by: default avatarVasily Khoruzhick <anarsoul@gmail.com>
[ben-linux@fluff.org: Move pm fix to new patch]
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent fcef85c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
{
{
	struct s3c_gpio_chip *chip;
	struct s3c_gpio_chip *chip;


	if (pin > S3C2410_GPG(10))
	if (pin > S3C_GPIO_END)
		return NULL;
		return NULL;


	chip = &s3c24xx_gpios[pin/32];
	chip = &s3c24xx_gpios[pin/32];
+8 −0
Original line number Original line Diff line number Diff line
@@ -20,10 +20,18 @@
 * devices that need GPIO.
 * devices that need GPIO.
 */
 */


#ifdef CONFIG_CPU_S3C244X
#define ARCH_NR_GPIOS	(32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA)
#else
#define ARCH_NR_GPIOS	(256 + CONFIG_S3C24XX_GPIO_EXTRA)
#define ARCH_NR_GPIOS	(256 + CONFIG_S3C24XX_GPIO_EXTRA)
#endif


#include <asm-generic/gpio.h>
#include <asm-generic/gpio.h>
#include <mach/gpio-nrs.h>
#include <mach/gpio-nrs.h>
#include <mach/gpio-fns.h>
#include <mach/gpio-fns.h>


#ifdef CONFIG_CPU_S3C24XX
#define S3C_GPIO_END	(S3C2410_GPIO_BANKJ + 32)
#else
#define S3C_GPIO_END	(S3C2410_GPIO_BANKH + 32)
#define S3C_GPIO_END	(S3C2410_GPIO_BANKH + 32)
#endif