From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Sascha Silbe <x-linux@infra-silbe.de>,
Johan Hovold <jhovold@gmail.com>,
Alexandre Courbot <gnurou@gmail.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] USB: ftdi_sio: add GPIO support
Date: Fri, 13 Jun 2014 11:31:57 -0700 [thread overview]
Message-ID: <20140613183157.GA24644@kroah.com> (raw)
In-Reply-To: <CACRpkdbiob-2d4sTmj8bZxo5GVZ0TvF5CT_W94BDsSNiEfB7kQ@mail.gmail.com>
On Fri, Jun 13, 2014 at 09:25:07AM +0200, Linus Walleij wrote:
> On Mon, Jun 9, 2014 at 3:21 PM, Sascha Silbe <x-linux@infra-silbe.de> wrote:
>
> > The chips can operate either in regular or in bitbang mode. Care was
> > taken to prevent using GPIOs if the serial device is in use and vice
> > versa.
>
> Very interesting patch! I've seen USB-based GPIO things before
> but never a dual-mode thing.
>
> There was already a comment to move the implementation to a
> separate file, which I won't repeat.
>
> But I also want to bring the device model into question: normally
> when a mother device spawns children across different subsystems
> we model them as MFD devices (drivers/mfd) that instantiate
> children for the different subsystems. So you could spawn a
> serial and a GPIO device from a USB-based hub device there.
>
> I do not know if that is really apropriate in this case. It seems the
> device is first and foremost FTDI.
>
> But it could still spawn a child platform device for the GPIO stuff
> so that this can live as a separate driver under drivers/gpio/gpio-ftdi.c
> or similar.
>
> You could then use something like:
>
> struct platform_device *gdev;
Ick, no, it's a USB device, do not abuse the platform_device code any
more than it currently is (note, I HATE the platform device code,
someday I'll delete it entirely... Well, I can dream...)
greg k-h
next prev parent reply other threads:[~2014-06-13 18:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 13:21 [PATCH] USB: ftdi_sio: add GPIO support Sascha Silbe
2014-06-09 14:23 ` One Thousand Gnomes
2014-06-09 18:36 ` Sergei Shtylyov
2014-06-10 10:56 ` Johan Hovold
2014-06-16 7:15 ` Philipp Hachtmann
2014-06-13 7:25 ` Linus Walleij
2014-06-13 18:31 ` Greg Kroah-Hartman [this message]
2014-07-07 10:44 ` Linus Walleij
2014-07-07 17:31 ` Greg Kroah-Hartman
2015-05-30 20:29 ` Grant Likely
2015-06-02 13:18 ` Linus Walleij
2015-07-03 22:13 ` Grant Likely
2015-07-16 11:56 ` Linus Walleij
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=20140613183157.GA24644@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=gnurou@gmail.com \
--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=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