diff options
Diffstat (limited to 'arch/arm/plat-s3c24xx/gpiolib.c')
-rw-r--r-- | arch/arm/plat-s3c24xx/gpiolib.c | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c index 4bac12dc0733..6d7a961d3269 100644 --- a/arch/arm/plat-s3c24xx/gpiolib.c +++ b/arch/arm/plat-s3c24xx/gpiolib.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/sysdev.h> | ||
18 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
20 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
@@ -78,10 +79,10 @@ static int s3c24xx_gpiolib_bankg_toirq(struct gpio_chip *chip, unsigned offset) | |||
78 | 79 | ||
79 | struct s3c_gpio_chip s3c24xx_gpios[] = { | 80 | struct s3c_gpio_chip s3c24xx_gpios[] = { |
80 | [0] = { | 81 | [0] = { |
81 | .base = S3C24XX_GPIO_BASE(S3C2410_GPA0), | 82 | .base = S3C2410_GPACON, |
82 | .pm = __gpio_pm(&s3c_gpio_pm_1bit), | 83 | .pm = __gpio_pm(&s3c_gpio_pm_1bit), |
83 | .chip = { | 84 | .chip = { |
84 | .base = S3C2410_GPA0, | 85 | .base = S3C2410_GPA(0), |
85 | .owner = THIS_MODULE, | 86 | .owner = THIS_MODULE, |
86 | .label = "GPIOA", | 87 | .label = "GPIOA", |
87 | .ngpio = 24, | 88 | .ngpio = 24, |
@@ -90,50 +91,50 @@ struct s3c_gpio_chip s3c24xx_gpios[] = { | |||
90 | }, | 91 | }, |
91 | }, | 92 | }, |
92 | [1] = { | 93 | [1] = { |
93 | .base = S3C24XX_GPIO_BASE(S3C2410_GPB0), | 94 | .base = S3C2410_GPBCON, |
94 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), | 95 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), |
95 | .chip = { | 96 | .chip = { |
96 | .base = S3C2410_GPB0, | 97 | .base = S3C2410_GPB(0), |
97 | .owner = THIS_MODULE, | 98 | .owner = THIS_MODULE, |
98 | .label = "GPIOB", | 99 | .label = "GPIOB", |
99 | .ngpio = 16, | 100 | .ngpio = 16, |
100 | }, | 101 | }, |
101 | }, | 102 | }, |
102 | [2] = { | 103 | [2] = { |
103 | .base = S3C24XX_GPIO_BASE(S3C2410_GPC0), | 104 | .base = S3C2410_GPCCON, |
104 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), | 105 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), |
105 | .chip = { | 106 | .chip = { |
106 | .base = S3C2410_GPC0, | 107 | .base = S3C2410_GPC(0), |
107 | .owner = THIS_MODULE, | 108 | .owner = THIS_MODULE, |
108 | .label = "GPIOC", | 109 | .label = "GPIOC", |
109 | .ngpio = 16, | 110 | .ngpio = 16, |
110 | }, | 111 | }, |
111 | }, | 112 | }, |
112 | [3] = { | 113 | [3] = { |
113 | .base = S3C24XX_GPIO_BASE(S3C2410_GPD0), | 114 | .base = S3C2410_GPDCON, |
114 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), | 115 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), |
115 | .chip = { | 116 | .chip = { |
116 | .base = S3C2410_GPD0, | 117 | .base = S3C2410_GPD(0), |
117 | .owner = THIS_MODULE, | 118 | .owner = THIS_MODULE, |
118 | .label = "GPIOD", | 119 | .label = "GPIOD", |
119 | .ngpio = 16, | 120 | .ngpio = 16, |
120 | }, | 121 | }, |
121 | }, | 122 | }, |
122 | [4] = { | 123 | [4] = { |
123 | .base = S3C24XX_GPIO_BASE(S3C2410_GPE0), | 124 | .base = S3C2410_GPECON, |
124 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), | 125 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), |
125 | .chip = { | 126 | .chip = { |
126 | .base = S3C2410_GPE0, | 127 | .base = S3C2410_GPE(0), |
127 | .label = "GPIOE", | 128 | .label = "GPIOE", |
128 | .owner = THIS_MODULE, | 129 | .owner = THIS_MODULE, |
129 | .ngpio = 16, | 130 | .ngpio = 16, |
130 | }, | 131 | }, |
131 | }, | 132 | }, |
132 | [5] = { | 133 | [5] = { |
133 | .base = S3C24XX_GPIO_BASE(S3C2410_GPF0), | 134 | .base = S3C2410_GPFCON, |
134 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), | 135 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), |
135 | .chip = { | 136 | .chip = { |
136 | .base = S3C2410_GPF0, | 137 | .base = S3C2410_GPF(0), |
137 | .owner = THIS_MODULE, | 138 | .owner = THIS_MODULE, |
138 | .label = "GPIOF", | 139 | .label = "GPIOF", |
139 | .ngpio = 8, | 140 | .ngpio = 8, |
@@ -141,15 +142,24 @@ struct s3c_gpio_chip s3c24xx_gpios[] = { | |||
141 | }, | 142 | }, |
142 | }, | 143 | }, |
143 | [6] = { | 144 | [6] = { |
144 | .base = S3C24XX_GPIO_BASE(S3C2410_GPG0), | 145 | .base = S3C2410_GPGCON, |
145 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), | 146 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), |
146 | .chip = { | 147 | .chip = { |
147 | .base = S3C2410_GPG0, | 148 | .base = S3C2410_GPG(0), |
148 | .owner = THIS_MODULE, | 149 | .owner = THIS_MODULE, |
149 | .label = "GPIOG", | 150 | .label = "GPIOG", |
150 | .ngpio = 10, | 151 | .ngpio = 16, |
151 | .to_irq = s3c24xx_gpiolib_bankg_toirq, | 152 | .to_irq = s3c24xx_gpiolib_bankg_toirq, |
152 | }, | 153 | }, |
154 | }, { | ||
155 | .base = S3C2410_GPHCON, | ||
156 | .pm = __gpio_pm(&s3c_gpio_pm_2bit), | ||
157 | .chip = { | ||
158 | .base = S3C2410_GPH(0), | ||
159 | .owner = THIS_MODULE, | ||
160 | .label = "GPIOH", | ||
161 | .ngpio = 11, | ||
162 | }, | ||
153 | }, | 163 | }, |
154 | }; | 164 | }; |
155 | 165 | ||
@@ -164,4 +174,4 @@ static __init int s3c24xx_gpiolib_init(void) | |||
164 | return 0; | 174 | return 0; |
165 | } | 175 | } |
166 | 176 | ||
167 | arch_initcall(s3c24xx_gpiolib_init); | 177 | core_initcall(s3c24xx_gpiolib_init); |