From patchwork Sun Jan 25 17:16:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Bofjall X-Patchwork-Id: 432576 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E76E31401EF for ; Mon, 26 Jan 2015 04:16:50 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753283AbbAYRQu (ORCPT ); Sun, 25 Jan 2015 12:16:50 -0500 Received: from mxf2.bahnhof.se ([213.80.101.26]:59249 "EHLO mxf2.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752918AbbAYRQu (ORCPT ); Sun, 25 Jan 2015 12:16:50 -0500 Received: from localhost (mxf2.local [127.0.0.1]) by mxf2-reinject (Postfix) with ESMTP id B1A3D1C6DE4; Sun, 25 Jan 2015 18:16:48 +0100 (CET) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MXF2) X-Spam-Score: 0.306 X-Spam-Level: X-Spam-Status: No, score=0.306 tagged_above=-99 required=5 tests=[DNS_FROM_AHBL_RHSBL=0.306] Received: from mxf2.bahnhof.se ([127.0.0.1]) by localhost (mxf2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id whZ9FhSA2iuQ; Sun, 25 Jan 2015 18:16:48 +0100 (CET) Received: from localhost (h-186-202.a165.priv.bahnhof.se [109.228.186.202]) by mxf2.bahnhof.se (Postfix) with ESMTP id 483FC1C6DE3; Sun, 25 Jan 2015 18:16:48 +0100 (CET) From: Andreas Bofjall To: linux-gpio@vger.kernel.org Cc: Andreas Bofjall Subject: [PATCH 3/3] gpio: f7188x: add GPIO support for F71869A Date: Sun, 25 Jan 2015 18:16:19 +0100 Message-Id: <1422206179-11464-4-git-send-email-andreas@gazonk.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1422206179-11464-1-git-send-email-andreas@gazonk.org> References: <1422206179-11464-1-git-send-email-andreas@gazonk.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- drivers/gpio/Kconfig | 4 ++-- drivers/gpio/gpio-f7188x.c | 26 +++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 26d1667..79c16f5 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -173,11 +173,11 @@ config GPIO_MM_LANTIQ created by attaching a 16bit latch to the bus. config GPIO_F7188X - tristate "F71869, F71882FG and F71889F GPIO support" + tristate "F71869, F71869A, F71882FG and F71889F GPIO support" depends on X86 help This option enables support for GPIOs found on Fintek Super-I/O - chips F71869, F71882FG and F71889F. + chips F71869, F71869A, F71882FG and F71889F. To compile this driver as a module, choose M here: the module will be called f7188x-gpio. diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c index fe0bc8c..fa0e482 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; @@ -470,6 +490,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 "); MODULE_LICENSE("GPL");