public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2, 5/6] dm: sunxi: Modify the GPIO driver to support driver model
Date: Tue, 28 Oct 2014 15:30:35 +0100	[thread overview]
Message-ID: <20141028143035.GA23753@lukather> (raw)
In-Reply-To: <CAGb2v66_OvSDhakWqdZT51UCgYgvwHdtoB_eixdM-zmZZgCLSA@mail.gmail.com>

Hi,

On Tue, Oct 28, 2014 at 11:39:07AM +0800, Chen-Yu Tsai wrote:
> Hi,
> >>> When everything is moved to driver model I suppose we can be more clever.
> >>>
> >>>>
> >>>> Our "gpio-pin-numbers" are based on a sparse numbering
> >>>> scheme assuming 32 pins / bank, and there are assumptions this is
> >>>> the case in various places, so we cannot fix this until we've
> >>>> fully gone dm for all gpio usage. But here it would be nice
> >>>> to have the actual numbers of pins.
> >>>>
> >>>> Doing so requires at least one table with bank -> number of gpio-s
> >>>> mapping. And I think it may also differ on SoC type in some cases
> >>>> (I would need to take a look at the datasheets)
> >>>
> >>> Hoping this can be in the device tree. Do you have a binding for it?
> >>
> >> This is in the (kernel) driver, not the device tree bindings.
> >> So we would need to at least add a table for that.
> >>
> >> I don't see any pinmux related stuff in this patch. Does the gpio
> >> dm handle that?
> >
> > No, or at least not yet. Does sunxi have kernel support for pinctrl?
> > We could perhaps use that binding if it exists. Otherwise I think the
> > current code is our best bet - we can select the correct serial port
> > based on static configuration (CONFIG) for now.
> 
> It does. But the bindings are based on strings for function descriptions,
> which implies a whole lookup table in the driver. Not sure this would be
> great for SPL.
> 
> Also Linus Walleij (pinctrl maintainer) proposed some new generic
> bindings, though I don't know if we will ever switch over.
> CCing Maxime Ripard (sunxi maintainer) on this.

I'm not planning to move to the new bindings any time soon, and no one
is actively working on that to my knowledge either.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141028/922e8e47/attachment.pgp>

  reply	other threads:[~2014-10-28 14:30 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23  4:02 [U-Boot] [PATCH v2 0/6] dm: Introduce driver model for sunxi Simon Glass
2014-10-23  4:02 ` [U-Boot] [PATCH v2 1/6] dm: sunxi: dts: Add sun7i device tree files Simon Glass
2014-10-24  8:32   ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-28  1:05     ` Simon Glass
2014-10-23  4:02 ` [U-Boot] [PATCH v2 2/6] dm: sunxi: Add a new config for an FDT-based pcDuino3 Simon Glass
2014-10-24  8:38   ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-28  0:04     ` Simon Glass
2014-10-28  9:13       ` Hans de Goede
2014-10-29  3:02         ` Simon Glass
2014-10-29  9:32           ` Hans de Goede
2014-10-29 19:30             ` Simon Glass
2014-10-30  8:36               ` Hans de Goede
2014-10-23  4:02 ` [U-Boot] [PATCH v2 3/6] dm: sunxi: Add pinmux functions which take a bank parameter Simon Glass
2014-10-24  9:00   ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-23  4:02 ` [U-Boot] [PATCH v2 4/6] dm: sunxi: Make sure that GPIOs are requested Simon Glass
2014-10-24  9:01   ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-23  4:02 ` [U-Boot] [PATCH v2 5/6] dm: sunxi: Modify the GPIO driver to support driver model Simon Glass
2014-10-24  9:08   ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-28  0:05     ` Simon Glass
2014-10-28  2:53       ` Chen-Yu Tsai
2014-10-28  3:29         ` Simon Glass
2014-10-28  3:39           ` Chen-Yu Tsai
2014-10-28 14:30             ` Maxime Ripard [this message]
2014-10-23  4:02 ` [U-Boot] [PATCH v2 6/6] dm: sunxi: Add support for serial using " Simon Glass
2014-10-24  9:10   ` [U-Boot] [U-Boot, v2, " Hans de Goede
2014-10-24  9:42   ` [U-Boot] [PATCH v2 " Ian Campbell
2014-10-28  0:06     ` Simon Glass
2014-10-29  8:05       ` Ian Campbell
2014-10-29 19:28         ` Simon Glass
2014-10-30  9:08           ` Ian Campbell
2014-10-30  9:36             ` Hans de Goede
2014-10-30 10:14               ` Ian Campbell
2014-10-31  2:45                 ` Simon Glass
2014-10-31  9:07                 ` Hans de Goede
2014-10-31  9:30                   ` Ian Campbell
2014-10-31  9:33                     ` Hans de Goede
2014-10-31  9:55                       ` Ian Campbell

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=20141028143035.GA23753@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=u-boot@lists.denx.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