summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-f7188x.c
diff options
context:
space:
mode:
authorAndreas Bofjall <andreas@gazonk.org>2015-03-09 21:55:14 +0100
committerLinus Walleij <linus.walleij@linaro.org>2015-03-17 17:57:37 +0100
commit7e9603638ac69696be5bcc2614365c1e8cc892dd (patch)
tree820834cb091021b1fd6a0e95cfd89f7a5fff4be3 /drivers/gpio/gpio-f7188x.c
parent24ccef359e8c540083a89a8f2347fae451fe8086 (diff)
downloadlinux-7e9603638ac69696be5bcc2614365c1e8cc892dd.tar.gz
linux-7e9603638ac69696be5bcc2614365c1e8cc892dd.tar.bz2
linux-7e9603638ac69696be5bcc2614365c1e8cc892dd.zip
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>
Diffstat (limited to 'drivers/gpio/gpio-f7188x.c')
-rw-r--r--drivers/gpio/gpio-f7188x.c26
1 files changed, 23 insertions, 3 deletions
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 @@
/*
- * GPIO driver for Fintek Super-I/O F71869, F71882 and F71889
+ * GPIO driver for Fintek Super-I/O F71869, F71869A, F71882 and F71889
*
* Copyright (C) 2010-2013 LaCie
*
@@ -33,13 +33,15 @@
#define SIO_FINTEK_ID 0x1934 /* Manufacturer ID */
#define SIO_F71869_ID 0x0814 /* F71869 chipset ID */
+#define SIO_F71869A_ID 0x1007 /* F71869A chipset ID */
#define SIO_F71882_ID 0x0541 /* F71882 chipset ID */
#define SIO_F71889_ID 0x0909 /* F71889 chipset ID */
-enum chips { f71869, f71882fg, f71889f };
+enum chips { f71869, f71869a, f71882fg, f71889f };
static const char * const f7188x_names[] = {
"f71869",
+ "f71869a",
"f71882fg",
"f71889f",
};
@@ -158,6 +160,17 @@ static struct f7188x_gpio_bank f71869_gpio_bank[] = {
F7188X_GPIO_BANK(60, 6, 0x90),
};
+static struct f7188x_gpio_bank f71869a_gpio_bank[] = {
+ F7188X_GPIO_BANK(0, 6, 0xF0),
+ F7188X_GPIO_BANK(10, 8, 0xE0),
+ F7188X_GPIO_BANK(20, 8, 0xD0),
+ F7188X_GPIO_BANK(30, 8, 0xC0),
+ F7188X_GPIO_BANK(40, 8, 0xB0),
+ F7188X_GPIO_BANK(50, 5, 0xA0),
+ F7188X_GPIO_BANK(60, 8, 0x90),
+ F7188X_GPIO_BANK(70, 8, 0x80),
+};
+
static struct f7188x_gpio_bank f71882_gpio_bank[] = {
F7188X_GPIO_BANK(0 , 8, 0xF0),
F7188X_GPIO_BANK(10, 8, 0xE0),
@@ -297,6 +310,10 @@ static int f7188x_gpio_probe(struct platform_device *pdev)
data->nr_bank = ARRAY_SIZE(f71869_gpio_bank);
data->bank = f71869_gpio_bank;
break;
+ case f71869a:
+ data->nr_bank = ARRAY_SIZE(f71869a_gpio_bank);
+ data->bank = f71869a_gpio_bank;
+ break;
case f71882fg:
data->nr_bank = ARRAY_SIZE(f71882_gpio_bank);
data->bank = f71882_gpio_bank;
@@ -373,6 +390,9 @@ static int __init f7188x_find(int addr, struct f7188x_sio *sio)
case SIO_F71869_ID:
sio->type = f71869;
break;
+ case SIO_F71869A_ID:
+ sio->type = f71869a;
+ break;
case SIO_F71882_ID:
sio->type = f71882fg;
break;
@@ -469,6 +489,6 @@ static void __exit f7188x_gpio_exit(void)
}
module_exit(f7188x_gpio_exit);
-MODULE_DESCRIPTION("GPIO driver for Super-I/O chips F71869, F71882FG and F71889F");
+MODULE_DESCRIPTION("GPIO driver for Super-I/O chips F71869, F71869A, F71882FG and F71889F");
MODULE_AUTHOR("Simon Guinot <simon.guinot@sequanux.org>");
MODULE_LICENSE("GPL");