linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Peter Hung <hpeter@gmail.com>
Cc: "Alexandre Courbot" <gnurou@gmail.com>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Paul Gortmaker" <paul.gortmaker@windriver.com>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Jiri Slaby" <jslaby@suse.com>,
	"One Thousand Gnomes" <gnomes@lxorguk.ukuu.org.uk>,
	"Peter H" <peter_hong@fintek.com.tw>,
	"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
	"Peter Hurley" <peter@hurleysoftware.com>,
	"Soeren Grunewald" <soeren.grunewald@desy.de>,
	"Wang YanQing" <udknight@gmail.com>,
	"Adam Lee" <adam.lee@canonical.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Joachim Eastwood" <manabian@gmail.com>,
	"Scott Wood" <scottwood@freescale.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Paul Burton" <paul.burton@imgtec.com>,
	"Måns Rullgård" <mans@mansr.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Ralf Baechle" <ralf@linux-mips.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	tom_tsai@fintek.com.tw,
	"Peter Hung" <hpeter+linux_kernel@gmail.com>,
	"Laxman Dewangan" <ldewangan@nvidia.com>
Subject: Re: [PATCH V4 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support
Date: Thu, 25 Feb 2016 10:59:14 +0100	[thread overview]
Message-ID: <CACRpkdaMqxqpqNUmjc6zyw7MgPr7qhLVXnBiV9bLEsBQBX5Y1w@mail.gmail.com> (raw)
In-Reply-To: <1456209003-22396-3-git-send-email-hpeter+linux_kernel@gmail.com>

On Tue, Feb 23, 2016 at 7:30 AM, Peter Hung <hpeter@gmail.com> wrote:

> This driver is GPIOLIB driver for F81504/508/512, it'll handle the
> GPIOLIB operation of this device. This module will depend on
> MFD_FINTEK_F81504_CORE.
>
> IC function list:
>     F81504: Max 2x8 GPIOs and max 4 serial ports
>         port2/3 are multi-function
>     F81508: Max 6x8 GPIOs and max 8 serial ports
>         port2/3 are multi-function, port8/9/10/11 are gpio only
>     F81512: Max 6x8 GPIOs and max 12 serial ports
>         port2/3/8/9/10/11 are multi-function
>
> GPIO register:
> PCI Configuration space:
>     F0h: bit0~5: Enable GPIO0~5
>          bit6~7: Reserve
>     F3h: bit0~5: Multi-Functional Flag (0:GPIO/1:UART)
>          bit0: UART2 pin out for UART2 / GPIO0
>          bit1: UART3 pin out for UART3 / GPIO1
>          bit2: UART8 pin out for UART8 / GPIO2
>          bit3: UART9 pin out for UART9 / GPIO3
>          bit4: UART10 pin out for UART10 / GPIO4
>          bit5: UART11 pin out for UART11 / GPIO5
>          bit6~7: Reserve
>     F1h: IO address (LSB)
>     F2h: IO address (MSB)
>     F8h + 8 * set: Direction control (bitwise)
>          bitx: 0 - Input mode
>          bitx: 1 - Output mode
>     F9h + 8 * set: Drive ability control (bitwise)
>          bitx: 0 - Open drain (default)
>          bitx: 1 - Push Pull
>          In this driver, we only implements open drain mode.
>
> IO space:
>     (IO base + 0~5): GPIO-0x~5x in/out value (bitwise)
>
> Suggested-by: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com>

I assume this must do in through the MFD or TTY tree with the rest.
There is a new devm_gpiochip_add_data() coming into the GPIO tree
but we can patch it to use that later. (Note to Laxman to revisit...)

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

  reply	other threads:[~2016-02-25  9:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23  6:29 [PATCH V4 0/4] Transform Fintek PCIE driver from 8250 to MFD Peter Hung
2016-02-23  6:30 ` [PATCH V4 1/4] mfd: f81504-core: Add Fintek F81504/508/512 PCIE-to-UART/GPIO core support Peter Hung
2016-02-23 11:05   ` Andy Shevchenko
2016-03-02  7:34     ` Peter Hung
2016-02-23  6:30 ` [PATCH V4 2/4] gpio: gpio-f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO GPIOLIB support Peter Hung
2016-02-25  9:59   ` Linus Walleij [this message]
2016-02-23  6:30 ` [PATCH V4 3/4] 8250: 8250_f81504: Add Fintek F81504/508/512 PCIE-to-UART/GPIO UART support Peter Hung
2016-02-23  6:30 ` [PATCH V4 4/4] serial: 8250_pci: Remove Fintek F81504/508/512 UART driver Peter Hung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdaMqxqpqNUmjc6zyw7MgPr7qhLVXnBiV9bLEsBQBX5Y1w@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=adam.lee@canonical.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gnurou@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=hpeter+linux_kernel@gmail.com \
    --cc=hpeter@gmail.com \
    --cc=jslaby@suse.com \
    --cc=ldewangan@nvidia.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=mans@mansr.com \
    --cc=matthias.bgg@gmail.com \
    --cc=paul.burton@imgtec.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=peter@hurleysoftware.com \
    --cc=peter_hong@fintek.com.tw \
    --cc=ralf@linux-mips.org \
    --cc=scottwood@freescale.com \
    --cc=soeren.grunewald@desy.de \
    --cc=tom_tsai@fintek.com.tw \
    --cc=udknight@gmail.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).