linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Stefan Agner <stefan@agner.ch>
Cc: Johan Hovold <johan@kernel.org>,
	linus.walleij@linaro.org, gnurou@gmail.com,
	grant.likely@secretlab.ca, gregkh@linuxfoundation.org,
	x-linux@infra-silbe.de, hachti@hachti.de,
	linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, Johan Hovold <jhovold@gmail.com>
Subject: Re: [PATCH 0/2] FTDI CBUS GPIO support
Date: Tue, 23 Jun 2015 11:22:19 +0200	[thread overview]
Message-ID: <20150623092219.GA28202@localhost> (raw)
In-Reply-To: <11dedbc454ab78f5e03497e2c5d8f5b3@agner.ch>

On Mon, Jun 22, 2015 at 10:11:35PM +0200, Stefan Agner wrote:
> On 2015-06-22 19:26, Johan Hovold wrote:

> > Instead, hang the gpio chip directly off the usb interface (not the
> > port), add a new config option, and keep the gpio implementation under
> > drivers/usb/serial (possibly in its own file ftdi_sio-gpio.c).
> 
> Agreed sounds like a good plan. Will try this approach in v2.
> 
> Except I don't think hanging it directly to the USB interface is the
> right thing to do.
> 
> Looking at the block diagram of FT232R or FT232H, the CBUS pins seem to
> be part of the UART/FIFO controller. And I think the dual UART FT2232D
> actually supports controlling the CBUS pins of the two UART controllers
> individually, at least the block diagram thereof suggests so.

The port is a Linux abstraction, and for FTDI we happen to have exactly
one port child device per USB interface. As I see it, the gpio
controller for the CBUS pins should be a sibling rather than a child
device to the port.

Note that we'd still have two gpio-controllers on FT2232D (one per USB
interface).

I'm aware that this requires some restructuring of the ftdi_sio-driver
(e.g. the device type and ftdi-interface number should be a feature of
the usb-serial rather than usb-serial-port device).

Thanks,
Johan

  reply	other threads:[~2015-06-23  9:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-20 22:12 [PATCH 0/2] FTDI CBUS GPIO support Stefan Agner
2015-06-20 22:12 ` [PATCH 1/2] USB: ftdi_sio: add CBUS mode for FT232R devices Stefan Agner
2015-06-30  6:46   ` Linus Walleij
2015-06-30  6:54     ` Johan Hovold
2015-06-20 22:12 ` [PATCH 2/2] gpio: gpio-ftdi-cbus: add driver for FTDI CBUS GPIOs Stefan Agner
2015-07-15  7:42   ` Linus Walleij
2015-06-21  2:22 ` [PATCH 0/2] FTDI CBUS GPIO support Philipp Hachtmann
     [not found]   ` <55861FFC.30704-c1YPqJpaggmzQB+pC5nmwQ@public.gmane.org>
2015-06-21 19:39     ` Stefan Agner
     [not found] ` <1434838377-8042-1-git-send-email-stefan-XLVq0VzYD2Y@public.gmane.org>
2015-06-20 23:49   ` Peter Stuge
     [not found]     ` <20150620234957.25729.qmail-Y+HMSxxDrH8@public.gmane.org>
2015-06-21 19:44       ` Stefan Agner
     [not found]         ` <a35f48994dedc061b54ca9ea255fdd4e-XLVq0VzYD2Y@public.gmane.org>
2015-08-23  8:52           ` Grant Likely
2015-06-22 17:26   ` Johan Hovold
2015-06-22 20:11     ` Stefan Agner
2015-06-23  9:22       ` Johan Hovold [this message]
2015-06-23 22:08         ` Stefan Agner
2015-06-24  7:56           ` Johan Hovold

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=20150623092219.GA28202@localhost \
    --to=johan@kernel.org \
    --cc=gnurou@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=hachti@hachti.de \
    --cc=jhovold@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stefan@agner.ch \
    --cc=x-linux@infra-silbe.de \
    /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).