All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org>
Cc: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Alan Tull <atull-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Moritz Fischer
	<moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fpga-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Laight
	<David.Laight-JxhZ9S5GRejQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 1/3] mfd: Add support for FTDI FT232H devices
Date: Wed, 19 Jul 2017 10:59:34 +0200	[thread overview]
Message-ID: <20170719085934.GU29638@localhost> (raw)
In-Reply-To: <20170710125210.GK29638@localhost>

On Mon, Jul 10, 2017 at 02:52:10PM +0200, Johan Hovold wrote:
> On Thu, Jul 06, 2017 at 10:49:16PM +0200, Anatolij Gustschin wrote:
> > Add USB part with common functions for USB-GPIO/I2C/SPI master
> > adapters. These allow communication with chip's control, transmit
> > and receive endpoints and will be used by various FT232H drivers.
> 
> > +static const struct mfd_cell ftdi_cells[] = {
> > +	{ .name = "ftdi-cbus-gpio", },
> > +	{ .name = "ftdi-mpsse-i2c", },
> > +	{ .name = "ftdi-mpsse-spi", },
> > +	{ .name = "ftdi-fifo-fpp-mgr", },
> > +};
> 
> Correct me if I'm wrong, but aren't these modes really mutually
> exclusive, possibly with exception of cbus-gpio (some pins are at least
> available as GPIOs in MPSSE mode)? Then MFD is not is not the right fit
> here either.

You never replied to this, and I'm afraid there are more issue with this
series.

> And as David Laight already pointed out, your ftdi-fifo-fpp-mgr driver
> seems too application specific for a generic chip like this.

Of which this is one is one of the major.

In short, your driver is much to application specific and is probably
something that needs to be implemented in userspace using libftdi.

Speaking of libftdi, you seem to have copied or borrowed a lot of code
and protocol from libftdi and this should have been mentioned in commit
messages and file headers (not just in a comment to one specific
function).

These chips can be used for a many different applications (also in FIFO
mode) so you cannot tie a driver to it exposing just a specific
interface for programming a certain class of FPGAs.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: Anatolij Gustschin <agust@denx.de>
Cc: Lee Jones <lee.jones@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alan Tull <atull@kernel.org>,
	Moritz Fischer <moritz.fischer@ettus.com>,
	linux-gpio@vger.kernel.org, linux-fpga@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Laight <David.Laight@aculab.com>
Subject: Re: [PATCH 1/3] mfd: Add support for FTDI FT232H devices
Date: Wed, 19 Jul 2017 10:59:34 +0200	[thread overview]
Message-ID: <20170719085934.GU29638@localhost> (raw)
In-Reply-To: <20170710125210.GK29638@localhost>

On Mon, Jul 10, 2017 at 02:52:10PM +0200, Johan Hovold wrote:
> On Thu, Jul 06, 2017 at 10:49:16PM +0200, Anatolij Gustschin wrote:
> > Add USB part with common functions for USB-GPIO/I2C/SPI master
> > adapters. These allow communication with chip's control, transmit
> > and receive endpoints and will be used by various FT232H drivers.
> 
> > +static const struct mfd_cell ftdi_cells[] = {
> > +	{ .name = "ftdi-cbus-gpio", },
> > +	{ .name = "ftdi-mpsse-i2c", },
> > +	{ .name = "ftdi-mpsse-spi", },
> > +	{ .name = "ftdi-fifo-fpp-mgr", },
> > +};
> 
> Correct me if I'm wrong, but aren't these modes really mutually
> exclusive, possibly with exception of cbus-gpio (some pins are at least
> available as GPIOs in MPSSE mode)? Then MFD is not is not the right fit
> here either.

You never replied to this, and I'm afraid there are more issue with this
series.

> And as David Laight already pointed out, your ftdi-fifo-fpp-mgr driver
> seems too application specific for a generic chip like this.

Of which this is one is one of the major.

In short, your driver is much to application specific and is probably
something that needs to be implemented in userspace using libftdi.

Speaking of libftdi, you seem to have copied or borrowed a lot of code
and protocol from libftdi and this should have been mentioned in commit
messages and file headers (not just in a comment to one specific
function).

These chips can be used for a many different applications (also in FIFO
mode) so you cannot tie a driver to it exposing just a specific
interface for programming a certain class of FPGAs.

Johan

  reply	other threads:[~2017-07-19  8:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06 20:49 [PATCH 0/3] FPGA Manager support for FPP via FT232H FT245-FIFO Anatolij Gustschin
2017-07-06 20:49 ` [PATCH 1/3] mfd: Add support for FTDI FT232H devices Anatolij Gustschin
2017-07-07  7:48   ` Bjørn Mork
2017-07-07  9:53     ` Anatolij Gustschin
2017-07-10 12:34       ` Johan Hovold
2017-07-11  6:52         ` Anatolij Gustschin
2017-07-12  8:50           ` Johan Hovold
2017-07-12  9:11             ` Bjørn Mork
     [not found]               ` <87vamy81f1.fsf-3F4PFWf5pNjpjLOzFPqGjWGXanvQGlWp@public.gmane.org>
2017-07-19 13:29                 ` Anatolij Gustschin
2017-07-19 13:29                   ` Anatolij Gustschin
2017-07-19 13:39                   ` David Laight
2017-07-19 15:03                     ` Anatolij Gustschin
2017-07-13 16:32             ` Anatolij Gustschin
2017-07-10 12:52   ` Johan Hovold
2017-07-19  8:59     ` Johan Hovold [this message]
2017-07-19  8:59       ` Johan Hovold
2017-07-19 12:59       ` Anatolij Gustschin
2017-07-25 11:52         ` Johan Hovold
2017-07-25 12:14           ` Anatolij Gustschin
2017-07-19 11:58     ` Anatolij Gustschin
2017-07-25 11:49       ` Johan Hovold
2017-07-25 12:34         ` Anatolij Gustschin
2017-07-06 20:49 ` [PATCH 2/3] gpio: Add FT232H CBUS GPIO driver Anatolij Gustschin
2017-08-01  6:49   ` Linus Walleij
2017-08-01  9:24     ` Johan Hovold
2017-08-07  9:24       ` Linus Walleij
2017-07-06 20:49 ` [PATCH 3/3] fpga manager: Add FT232H driver for Altera FPP Anatolij Gustschin
2017-07-07  9:34   ` David Laight
2017-08-02 11:36 ` [PATCH 0/3] FPGA Manager support for FPP via FT232H FT245-FIFO Eric Schwarz
2017-08-02 14:16   ` Alan Tull
2017-08-02 15:30     ` Eric Schwarz
2017-08-02 16:06       ` Greg KH

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=20170719085934.GU29638@localhost \
    --to=johan-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=David.Laight-JxhZ9S5GRejQT0dZR+AlfA@public.gmane.org \
    --cc=agust-ynQEQJNshbs@public.gmane.org \
    --cc=atull-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-fpga-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.