ARM: S5PV210: Add S5PV210 GPIO support.
Subsystems (3)
PATCH v2 1/1 ARM: S5PV210: Add S5PV210 GPIO support.
From: Pannaga Bhushan <[email protected]>
This patch adds GPIOlib support for S5PV210.
Signed-off-by Pannaga Bhushan <[email protected]>
Signed-off-by Kukjin Kim <[email protected]>
--- arch/arm/mach-s5pv210/Makefile | 2 +- arch/arm/mach-s5pv210/gpio.c | 259 +++++++++++++++++++++++++++++ arch/arm/mach-s5pv210/include/mach/gpio.h | 18 ++- 3 files changed, 275 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-s5pv210/gpio.c
arch/arm/mach-s5pv210/Makefile +1 -1
@@ -12,7 +12,7 @@ obj- := # Core support for S5PV210 system -obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o +obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o gpio.o # machine support
arch/arm/mach-s5pv210/gpio.c new file +259 -0
259 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/gpio.h +15 -3
@@ -18,6 +18,8 @@#define gpio_cansleep __gpio_cansleep#define gpio_to_irq __gpio_to_irq +/* Practically, GPIO banks upto MP03 are the configurable gpio banks */ +/* GPIO bank sizes */ #define S5PV210_GPIO_A0_NR (8)#define S5PV210_GPIO_A1_NR (4)
@@ -47,6 +49,10 @@#define S5PV210_GPIO_J3_NR (8)#define S5PV210_GPIO_J4_NR (5) +#define S5PV210_GPIO_MP01_NR (8) +#define S5PV210_GPIO_MP02_NR (4) +#define S5PV210_GPIO_MP03_NR (8) +/* GPIO bank numbers */ /* CONFIG_S3C_GPIO_SPACE allows the user to select extra
@@ -85,6 +91,9 @@ enum s5p_gpio_number {S5PV210_GPIO_J2_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_J1 ),S5PV210_GPIO_J3_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_J2 ),S5PV210_GPIO_J4_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_J3 ), +S5PV210_GPIO_MP01_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_J4 ), +S5PV210_GPIO_MP02_START =S5PV210_GPIO_NEXT (S5PV210_GPIO_MP01 ), + S5PV210_GPIO_MP03_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP02), };/* S5PV210 GPIO number definitions */
@@ -115,13 +124,16 @@ enum s5p_gpio_number {#define S5PV210_GPJ2 (_nr) (S5PV210_GPIO_J2_START + (_nr))#define S5PV210_GPJ3 (_nr) (S5PV210_GPIO_J3_START + (_nr))#define S5PV210_GPJ4 (_nr) (S5PV210_GPIO_J4_START + (_nr)) +#define S5PV210_MP01 (_nr) (S5PV210_GPIO_MP01_START + (_nr)) +#define S5PV210_MP02 (_nr) (S5PV210_GPIO_MP02_START + (_nr)) +#define S5PV210_MP03 (_nr) (S5PV210_GPIO_MP03_START + (_nr))/* the end of the S5PV210 specific gpios */ -#define S5PV210_GPIO_END (S5PV210_GPJ4(S5PV210_GPIO_J4_NR) + 1) +#define S5PV210_GPIO_END (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + 1)#define S3C_GPIO_END S5PV210_GPIO_END -/* define the number of gpios we need to the one after the GPJ4() range */ -#define ARCH_NR_GPIOS (S5PV210_GPJ4(S5PV210_GPIO_J4_NR) + \ +/* define the number of gpios we need to the one after the MP03() range */ +#define ARCH_NR_GPIOS (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + \ CONFIG_SAMSUNG_GPIO_EXTRA + 1)#include <asm-generic/gpio.h>
Signature · 1 line
1.6.2.5
PATCH v2 1/1 ARM: S5PV210: Add S5PV210 GPIO support.
arch/arm/mach-s5pv210/gpio.c line 17
Quoted 5 lines · Kukjin Kim
arch/arm/mach-s5pv210/gpio.c new file +5
-0+#include <linux/kernel.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <mach/map.h> +#include <mach/gpio.h>
It's linux/gpio.h
PATCH v2 1/1 ARM: S5PV210: Add S5PV210 GPIO support.
Quoted 9 lines · Russell King
arch/arm/mach-s5pv210/gpio.c line 17
Quoted 5 lines · Kukjin Kim
arch/arm/mach-s5pv210/gpio.c new file +5
-0+#include <linux/kernel.h> +#include <linux/irq.h> +#include <linux/io.h> +#include <mach/map.h> +#include <mach/gpio.h> It's
linux/gpio.h
Oh ok, I will fix it.
Thanks for your comment.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v2 1/1 ARM: S5PV210: Add S5PV210 GPIO support.
In reply to Kukjin KimQuoted 59 lines · Kukjin Kim
From: Pannaga Bhushan <[email protected]>
This patch adds GPIOlib support for S5PV210.
Signed-off-by Pannaga Bhushan <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-s5pv210/Makefile | 2 +- arch/arm/mach-s5pv210/gpio.c | 259 +++++++++++++++++++++++++++++ arch/arm/mach-s5pv210/include/mach/gpio.h | 18 ++- 3 files changed, 275 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-s5pv210/gpio.carch/arm/mach-s5pv210/Makefile +1
-1@@ -12,7 +12,7 @@ obj- := # Core support for S5PV210 system -obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o +obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o gpio.o # machine supportarch/arm/mach-s5pv210/gpio.c new file +27
-0@@ -0,0 +1,259 @@ +/* linux/arch/arm/mach-s5pv210/gpio.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* S5PV210 - GPIOlib support +* +* 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/irq.h> +#include <linux/io.h> +#include <mach/map.h> +#include <mach/gpio.h> +#include <plat/gpio-core.h> +#include <plat/gpio-cfg.h> +#include <plat/gpio-cfg-helpers.h> + +static struct s3c_gpio_cfg gpio_cfg = { + .cfg_eint =0xf , + .set_config = s3c_gpio_setcfg_s3c64xx_4bit, + .set_pull = s3c_gpio_setpull_updown, + .get_pull = s3c_gpio_getpull_updown, +};