mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 0/7] sandbox: add gpio support with libftdi1
Date: Fri, 19 Jan 2018 14:39:40 +0300	[thread overview]
Message-ID: <20180119143940.d1d9548f464ff98ecff94372@gmail.com> (raw)
In-Reply-To: <20180119094008.6g6otppxgtqgo3rb@pengutronix.de>

On Fri, 19 Jan 2018 10:40:08 +0100
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> On Fri, Jan 19, 2018 at 12:29:01PM +0300, Antony Pavlov wrote:
> > On Wed, 17 Jan 2018 10:53:14 +0100
> > Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > 
> > > Hi Antony,
> > > 
> > > On Mon, Jan 15, 2018 at 12:22:45AM +0300, Antony Pavlov wrote:
> > > > This patch series makes it possible to use FT2232H ACBUS[7:0]
> > > > pins as gpio pins from sandbox barebox.
> > > > 
> > > > There are ready-to-use FT2232H-based boards:
> > > > 
> > > >   * FT2232H-56Q Mini-Module (http://www.ftdichip.com/Products/Modules/DevelopmentModules.htm#FT2232H-56_Mini)
> > > >   * FT2232 breakout board (http://dangerousprototypes.com/docs/FT2232_breakout_board)
> > > > 
> > > > The main goal of adding gpio functionality to sandbox barebox
> > > > is using it for connecting real i2c and spi devices to sandbox barebox.
> > > 
> > > I applied the parseopt patches for now since they don't need any further
> > > discussions.
> > > 
> > 
> > There are three common parseopt-related patches:
> > 
> >   move parseopt to lib/
> >   include/parseopt.h: add guard macro
> >   parseopt: introduce parseopt_u16() and parseopt_str()
> > 
> > Please confirm that you have got all three patches.
> > 
> > > What puzzles me a bit is that the libftdi gpio controller is
> > > instantiated from the device tree but configured through the
> > > commandline. It probably has to be like this since we need the
> > > device tree for using the gpios.
> > 
> > Getting FTDI chip vendorID and deviceID from device tree is reasonable.
> > However hardcoding FTDI chip serialnumber into device tree is not so good idea.
> > In addition dropping cmdline FTDI options parsing makes parseopt_u16() and parseopt_str() unused.
> > 
> > I propose add FTDI chip vendorID, deviceID and serial options to device tree
> > and keep parsing the same options from cmdline so once can override FTDI chip
> > serial number from cmdline.
> 
> How would you handle multiple FTDI chips then if you want to make use
> of more than one at a time?

Good question. My current code gives no good means to add more than one FT2232 chip.
I suppose that after adding option-passing-via-dt feature it will be possible 
to add more than one FT2232 chip and ... cmdline option passing will interfere with
multi-FT2232 dt in a bad way. Now I think that dropping cmdline parsing is not so bad idea.

> 
> Sascha
> 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-01-19 11:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-14 21:22 Antony Pavlov
2018-01-14 21:22 ` [PATCH v2 1/7] sandbox: avoid symbol conflict for {open, read, close}dir Antony Pavlov
2018-01-14 21:22 ` [PATCH v2 2/7] sandbox: add gpio support with libftdi1 Antony Pavlov
2018-01-14 21:22 ` [PATCH v2 3/7] sandbox: add i2c and spi libftdi1 bit-bang example Antony Pavlov
2018-01-17 10:01   ` Sascha Hauer
2018-01-19  9:14     ` Antony Pavlov
2018-01-14 21:22 ` [PATCH v2 4/7] move parseopt to lib/ Antony Pavlov
2018-01-14 21:22 ` [PATCH v2 5/7] include/parseopt.h: add guard macro Antony Pavlov
2018-01-14 21:22 ` [PATCH v2 6/7] parseopt: introduce parseopt_u16() and parseopt_str() Antony Pavlov
2018-01-14 21:22 ` [PATCH v2 7/7] sandbox: parse libftdi options Antony Pavlov
2018-01-17  9:53 ` [PATCH v2 0/7] sandbox: add gpio support with libftdi1 Sascha Hauer
2018-01-19  9:29   ` Antony Pavlov
2018-01-19  9:40     ` Sascha Hauer
2018-01-19 11:39       ` Antony Pavlov [this message]
2018-01-18 18:13 ` Antony Pavlov
2018-01-19  7:32   ` Sascha Hauer

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=20180119143940.d1d9548f464ff98ecff94372@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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