diff options
author | Andreas Bofjall <andreas@gazonk.org> | 2015-03-09 16:55:14 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-03-17 12:57:37 -0400 |
commit | 7e9603638ac69696be5bcc2614365c1e8cc892dd (patch) | |
tree | 820834cb091021b1fd6a0e95cfd89f7a5fff4be3 | |
parent | 24ccef359e8c540083a89a8f2347fae451fe8086 (diff) |
gpio: f7188x: add GPIO support for F71869A
Add support for the GPIOs found on the Fintek SuperI/O chip F71869A,
such as the one found on the Jetway JNF99-525 motherboard, to the f7188x
gpio driver.
Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/Kconfig | 4 | ||||
-rw-r--r-- | drivers/gpio/gpio-f7188x.c | 26 |
2 files changed, 25 insertions, 5 deletions
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 0078cf045e71..f9dc19281ac4 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
@@ -198,11 +198,11 @@ config GPIO_MM_LANTIQ | |||
198 | created by attaching a 16bit latch to the bus. | 198 | created by attaching a 16bit latch to the bus. |
199 | 199 | ||
200 | config GPIO_F7188X | 200 | config GPIO_F7188X |
201 | tristate "F71869, F71882FG and F71889F GPIO support" | 201 | tristate "F71869, F71869A, F71882FG and F71889F GPIO support" |
202 | depends on X86 | 202 | depends on X86 |
203 | help | 203 | help |
204 | This option enables support for GPIOs found on Fintek Super-I/O | 204 | This option enables support for GPIOs found on Fintek Super-I/O |
205 | chips F71869, F71882FG and F71889F. | 205 | chips F71869, F71869A, F71882FG and F71889F. |
206 | 206 | ||
207 | To compile this driver as a module, choose M here: the module will | 207 | To compile this driver as a module, choose M here: the module will |
208 | be called f7188x-gpio. | 208 | be called f7188x-gpio. |
diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c index ac677bfeaa4d..dbda8433c4f7 100644 --- a/drivers/gpio/gpio-f7188x.c +++ b/drivers/gpio/gpio-f7188x.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * GPIO driver for Fintek Super-I/O F71869, F71882 and F71889 | 2 | * GPIO driver for Fintek Super-I/O F71869, F71869A, F71882 and F71889 |
3 | * | 3 | * |
4 | * Copyright (C) 2010-2013 LaCie | 4 | * Copyright (C) 2010-2013 LaCie |
5 | * | 5 | * |
@@ -33,13 +33,15 @@ | |||
33 | 33 | ||
34 | #define SIO_FINTEK_ID 0x1934 /* Manufacturer ID */ | 34 | #define SIO_FINTEK_ID 0x1934 /* Manufacturer ID */ |
35 | #define SIO_F71869_ID 0x0814 /* F71869 chipset ID */ | 35 | #define SIO_F71869_ID 0x0814 /* F71869 chipset ID */ |
36 | #define SIO_F71869A_ID 0x1007 /* F71869A chipset ID */ | ||
36 | #define SIO_F71882_ID 0x0541 /* F71882 chipset ID */ | 37 | #define SIO_F71882_ID 0x0541 /* F71882 chipset ID */ |
37 | #define SIO_F71889_ID 0x0909 /* F71889 chipset ID */ | 38 | #define SIO_F71889_ID 0x0909 /* F71889 chipset ID */ |
38 | 39 | ||
39 | enum chips { f71869, f71882fg, f71889f }; | 40 | enum chips { f71869, f71869a, f71882fg, f71889f }; |
40 | 41 | ||
41 | static const char * const f7188x_names[] = { | 42 | static const char * const f7188x_names[] = { |
42 | "f71869", | 43 | "f71869", |
44 | "f71869a", | ||
43 | "f71882fg", | 45 | "f71882fg", |
44 | "f71889f", | 46 | "f71889f", |
45 | }; | 47 | }; |
@@ -158,6 +160,17 @@ static struct f7188x_gpio_bank f71869_gpio_bank[] = { | |||
158 | F7188X_GPIO_BANK(60, 6, 0x90), | 160 | F7188X_GPIO_BANK(60, 6, 0x90), |
159 | }; | 161 | }; |
160 | 162 | ||
163 | static struct f7188x_gpio_bank f71869a_gpio_bank[] = { | ||
164 | F7188X_GPIO_BANK(0, 6, 0xF0), | ||
165 | F7188X_GPIO_BANK(10, 8, 0xE0), | ||
166 | F7188X_GPIO_BANK(20, 8, 0xD0), | ||
167 | F7188X_GPIO_BANK(30, 8, 0xC0), | ||
168 | F7188X_GPIO_BANK(40, 8, 0xB0), | ||
169 | F7188X_GPIO_BANK(50, 5, 0xA0), | ||
170 | F7188X_GPIO_BANK(60, 8, 0x90), | ||
171 | F7188X_GPIO_BANK(70, 8, 0x80), | ||
172 | }; | ||
173 | |||
161 | static struct f7188x_gpio_bank f71882_gpio_bank[] = { | 174 | static struct f7188x_gpio_bank f71882_gpio_bank[] = { |
162 | F7188X_GPIO_BANK(0 , 8, 0xF0), | 175 | F7188X_GPIO_BANK(0 , 8, 0xF0), |
163 | F7188X_GPIO_BANK(10, 8, 0xE0), | 176 | F7188X_GPIO_BANK(10, 8, 0xE0), |
@@ -297,6 +310,10 @@ static int f7188x_gpio_probe(struct platform_device *pdev) | |||
297 | data->nr_bank = ARRAY_SIZE(f71869_gpio_bank); | 310 | data->nr_bank = ARRAY_SIZE(f71869_gpio_bank); |
298 | data->bank = f71869_gpio_bank; | 311 | data->bank = f71869_gpio_bank; |
299 | break; | 312 | break; |
313 | case f71869a: | ||
314 | data->nr_bank = ARRAY_SIZE(f71869a_gpio_bank); | ||
315 | data->bank = f71869a_gpio_bank; | ||
316 | break; | ||
300 | case f71882fg: | 317 | case f71882fg: |
301 | data->nr_bank = ARRAY_SIZE(f71882_gpio_bank); | 318 | data->nr_bank = ARRAY_SIZE(f71882_gpio_bank); |
302 | data->bank = f71882_gpio_bank; | 319 | data->bank = f71882_gpio_bank; |
@@ -373,6 +390,9 @@ static int __init f7188x_find(int addr, struct f7188x_sio *sio) | |||
373 | case SIO_F71869_ID: | 390 | case SIO_F71869_ID: |
374 | sio->type = f71869; | 391 | sio->type = f71869; |
375 | break; | 392 | break; |
393 | case SIO_F71869A_ID: | ||
394 | sio->type = f71869a; | ||
395 | break; | ||
376 | case SIO_F71882_ID: | 396 | case SIO_F71882_ID: |
377 | sio->type = f71882fg; | 397 | sio->type = f71882fg; |
378 | break; | 398 | break; |
@@ -469,6 +489,6 @@ static void __exit f7188x_gpio_exit(void) | |||
469 | } | 489 | } |
470 | module_exit(f7188x_gpio_exit); | 490 | module_exit(f7188x_gpio_exit); |
471 | 491 | ||
472 | MODULE_DESCRIPTION("GPIO driver for Super-I/O chips F71869, F71882FG and F71889F"); | 492 | MODULE_DESCRIPTION("GPIO driver for Super-I/O chips F71869, F71869A, F71882FG and F71889F"); |
473 | MODULE_AUTHOR("Simon Guinot <simon.guinot@sequanux.org>"); | 493 | MODULE_AUTHOR("Simon Guinot <simon.guinot@sequanux.org>"); |
474 | MODULE_LICENSE("GPL"); | 494 | MODULE_LICENSE("GPL"); |