linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7] pinctrl: imx27: imx27 pincontrol driver
Date: Thu, 7 Nov 2013 10:12:12 +0100	[thread overview]
Message-ID: <20131107091212.GH15098@pengutronix.de> (raw)
In-Reply-To: <CAHCPf3v3dsTyk9Cd93GBLBKQLSQ+Mb0mpq134X7Ko4U8m-b-qg@mail.gmail.com>

On Wed, Nov 06, 2013 at 10:54:02AM -0600, Matt Sealey wrote:
> On Tue, Oct 29, 2013 at 11:00 AM, Linus Walleij
> <linus.walleij@linaro.org> wrote:
> > On Tue, Oct 29, 2013 at 7:32 AM, Markus Pargmann <mpa@pengutronix.de> wrote:
> >
> >> imx27 pincontrol driver using the imx1 core driver. The DT bindings are
> >> similar to other imx pincontrol drivers.
> >>
> >> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> >> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> >> Acked-by: Shawn Guo <shawn.guo@linaro.org>
> >> ---
> >> Hi,
> >>
> >> another binding documentation update. The MUX_ID components are described more
> >> detailed now.
> >
> > Patch tentatively applied unless someone has very fundamental
> > issues with it, it stays in. I really want a full transfer of i.MX
> > pin controllers to the subsystem, using device tree so we can
> > get rid of the old i.MX cruft in arch/arm.
> 
> I think this is a rush-in patch. I actually read the manual last night
> and found some serious weirdness.
> 
> The i.MX27 doesn't have a dedicated IOMUX controller so actually
> having a whole separate node for it in the device tree - or even a
> separate driver - makes very little sense. I understand pinctrl and
> gpiolib are somewhat separated as software, but this is encoding a
> Linuxism into the tree.
> 
> In fact, the binding will conflict with actual binding of the GPIO
> (i.e. setting data, receiving interrupts) module since it's all one
> register set, and the "fsl,imx27-iomuxc" compatible property does not
> represent reality except to collect data in a different spot. There's
> no reason for it except to cut the documentation and tree definition
> in half, and have two nodes for Linux.

Yes this is potentially conflicting. But in reality the used registers
are not the same. The GPIO driver uses GPIO Data Register, Data
Direction register and some interrupt registers. IOMUX is using input
configuration, output configuration, GPIO in use and data direction
registers. So it is conflicting in exactly one register that is
controlling the data direction.

> 
> Would it be so bad to implement this as a regmap and have two drivers
> access the same regmap on the Linux side? You don't need two nodes for
> that, and the IOMUX definitions can live under the GPIO node. There is
> NOTHING stopping two drivers on Linux matching the same compatible
> property. Locking and coordination in software of a single IP block
> used by two drivers shouldn't be arbitrated by the device tree.

I am not sure if it is practical to use the GPIO nodes for the IOMUX
driver. There are actually 6 GPIO nodes. This would lead to 6
iomux controllers? The different pin functions may be distributed over
different controllers then.

The first version of this series [1] was designed to have a iomux node
with 6 gpio subnodes.

Regards,

Markus


[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/257180/focus=257184

-- 
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 |

  reply	other threads:[~2013-11-07  9:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28  9:00 [PATCH v6 0/8] ARM: imx27 pinctrl Markus Pargmann
2013-10-28  9:00 ` [PATCH v6 1/8] pinctrl: imx1 core driver Markus Pargmann
2013-10-29 13:55   ` Linus Walleij
2013-10-29 15:10     ` Markus Pargmann
2013-10-29 14:09   ` Linus Walleij
2013-10-28  9:00 ` [PATCH v6 2/8] pinctrl: imx27: imx27 pincontrol driver Markus Pargmann
2013-10-28 11:17   ` Kumar Gala
2013-10-28 16:43     ` Markus Pargmann
2013-10-28 19:28       ` Kumar Gala
2013-10-29 14:03   ` Linus Walleij
2013-10-29 14:32   ` [PATCH v7] " Markus Pargmann
2013-10-29 16:00     ` Linus Walleij
2013-11-06 16:54       ` Matt Sealey
2013-11-07  9:12         ` Markus Pargmann [this message]
2013-11-07  9:28           ` Lucas Stach
2013-11-07 10:38             ` Markus Pargmann
2013-11-07 16:58               ` Matt Sealey
2013-11-11  9:50               ` Linus Walleij
2013-10-28  9:00 ` [PATCH v6 3/8] ARM: dts: imx27 pin functions Markus Pargmann
2013-10-28  9:00 ` [PATCH v6 4/8] ARM: dts: imx27 pinctrl Markus Pargmann
2013-11-06 22:43   ` Matt Sealey
2013-11-08  9:45     ` Linus Walleij
2013-11-08 13:56       ` Markus Pargmann
2013-11-11 10:29         ` Linus Walleij
2013-11-11 18:19           ` [PATCH] pinctrl: imx1-core populate subdevices Markus Pargmann
2013-11-19 20:01             ` Linus Walleij
2013-11-27  3:33               ` Chris Ruehl
2013-11-27  5:19                 ` Chris Ruehl
2013-11-27  7:31                 ` Markus Pargmann
2013-11-27  8:45                   ` Chris Ruehl
2013-10-28  9:00 ` [PATCH v6 5/8] ARM: dts: imx27 phyCARD-S pinctrl Markus Pargmann
2013-10-28  9:00 ` [PATCH v6 6/8] ARM: dts: imx27 phycore move uart1 to rdk Markus Pargmann
2013-10-28  9:00 ` [PATCH v6 7/8] ARM: dts: imx27 phycore pinctrl Markus Pargmann
2013-10-28  9:00 ` [PATCH v6 8/8] ARM: imx27: enable pinctrl Markus Pargmann
2013-11-06 12:49 ` [PATCH v6 0/8] ARM: imx27 pinctrl Markus Pargmann
2013-11-06 13:27   ` Shawn Guo

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=20131107091212.GH15098@pengutronix.de \
    --to=mpa@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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 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).