All of lore.kernel.org
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: DT include files
Date: Fri, 24 Jan 2014 09:02:09 +0100	[thread overview]
Message-ID: <2907925.DyxHkYtGr7@phil> (raw)
In-Reply-To: <20140113021912.GB23525@S2101-09.ap.freescale.net>

Hi Shawn,

did this topic get any final resolution - especially in terms of the pingrp.h 
header?

As I'm currently preparing two board files (imx50 and imx6sl) this discussion 
made me unsure if using the pin-group definitions is still the preferred style.


Thanks
Heiko

On Monday 13 January 2014 10:19:14 Shawn Guo wrote:
> On Sun, Jan 12, 2014 at 09:21:19PM +0100, Arnd Bergmann wrote:
> > I was under the impression that the generic pinctrl binding was designed
> > in a way to let you assign labels to each possible (reasonable)
> > configuration so you didn't have get to this level of detail at the
> > driver.
> 
> The generic part of pinctrl binding only covers the procedure how a
> client device get its pinctrl state configuration from a pin controller
> node.  That's what we defined in bindings/pinctrl/pinctrl-bindings.txt
> and implemented in pinctrl core.  But the details of how a pinctrl state
> configuration should be interpreted for a particular pin controller is
> defined by individual pin controller binding like fsl,imx-pinctrl.txt,
> and implemented in the pin controller driver like
> drivers/pinctrl/pinctrl-imx.c.
> 
> > I'm also surprised that you have to know multiple constants
> > (mux register, input register, config register offsets) to select a
> > particular pin. I would have expected that you could have one constant
> > from which the driver is able to compute the other ones.
> 
> That's what we do before.  We define a constant in the binding and have
> the driver to maintain these data and look up the data using the
> constant.  See commit below for imx6q example.
> 
>   d8fe357 pinctrl: pinctrl-imx: add imx6q pinctrl driver
> 
> The biggest problem with that approach is we have huge data to maintain
> in the driver because of the complexity and flexibility of IMX pin
> controller design.  And these data can not be init data.  Check that big
> array of struct imx_pin_reg in commit above for what I'm talking about.
> So when we build a v7 kernel image for IMX, we will have such big array
> for each of these SoCs, imx50, imx51, imx53, imx6sl, imx6dl, imx6q, and
> more to come.
> 
> That's why we went through the pain of breaking DT compatibility to move
> all these data into device tree one year ago with the commit below.
> 
>   e164153 pinctrl: imx: move hard-coding data into device tree
> 
> Now kernel gets released from the floating and we do not even need to
> touch kernel to add these data when new SoC support is added.
> 
> Shawn

WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	"arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: DT include files
Date: Fri, 24 Jan 2014 09:02:09 +0100	[thread overview]
Message-ID: <2907925.DyxHkYtGr7@phil> (raw)
In-Reply-To: <20140113021912.GB23525-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>

Hi Shawn,

did this topic get any final resolution - especially in terms of the pingrp.h 
header?

As I'm currently preparing two board files (imx50 and imx6sl) this discussion 
made me unsure if using the pin-group definitions is still the preferred style.


Thanks
Heiko

On Monday 13 January 2014 10:19:14 Shawn Guo wrote:
> On Sun, Jan 12, 2014 at 09:21:19PM +0100, Arnd Bergmann wrote:
> > I was under the impression that the generic pinctrl binding was designed
> > in a way to let you assign labels to each possible (reasonable)
> > configuration so you didn't have get to this level of detail at the
> > driver.
> 
> The generic part of pinctrl binding only covers the procedure how a
> client device get its pinctrl state configuration from a pin controller
> node.  That's what we defined in bindings/pinctrl/pinctrl-bindings.txt
> and implemented in pinctrl core.  But the details of how a pinctrl state
> configuration should be interpreted for a particular pin controller is
> defined by individual pin controller binding like fsl,imx-pinctrl.txt,
> and implemented in the pin controller driver like
> drivers/pinctrl/pinctrl-imx.c.
> 
> > I'm also surprised that you have to know multiple constants
> > (mux register, input register, config register offsets) to select a
> > particular pin. I would have expected that you could have one constant
> > from which the driver is able to compute the other ones.
> 
> That's what we do before.  We define a constant in the binding and have
> the driver to maintain these data and look up the data using the
> constant.  See commit below for imx6q example.
> 
>   d8fe357 pinctrl: pinctrl-imx: add imx6q pinctrl driver
> 
> The biggest problem with that approach is we have huge data to maintain
> in the driver because of the complexity and flexibility of IMX pin
> controller design.  And these data can not be init data.  Check that big
> array of struct imx_pin_reg in commit above for what I'm talking about.
> So when we build a v7 kernel image for IMX, we will have such big array
> for each of these SoCs, imx50, imx51, imx53, imx6sl, imx6dl, imx6q, and
> more to come.
> 
> That's why we went through the pain of breaking DT compatibility to move
> all these data into device tree one year ago with the commit below.
> 
>   e164153 pinctrl: imx: move hard-coding data into device tree
> 
> Now kernel gets released from the floating and we do not even need to
> touch kernel to add these data when new SoC support is added.
> 
> Shawn

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

  reply	other threads:[~2014-01-24  8:02 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-31  5:44 [GIT PULL 2/2] ARM: imx: device tree changes for 3.14 Shawn Guo
2014-01-02 20:21 ` DT include files (was: [GIT PULL 2/2] ARM: imx: device tree changes for 3.14) Olof Johansson
2014-01-02 20:21   ` Olof Johansson
2014-01-03  2:32   ` Shawn Guo
2014-01-03  2:32     ` Shawn Guo
2014-01-03  2:41     ` Olof Johansson
2014-01-03  2:41       ` Olof Johansson
2014-01-03  3:04       ` Shawn Guo
2014-01-03  3:04         ` Shawn Guo
2014-01-03 19:29         ` Olof Johansson
2014-01-03 19:29           ` Olof Johansson
2014-01-04  1:10           ` Shawn Guo
2014-01-04  1:10             ` Shawn Guo
2014-01-10  2:41             ` Shawn Guo
2014-01-10  2:41               ` Shawn Guo
2014-01-10  2:41               ` Olof Johansson
2014-01-10  2:41                 ` Olof Johansson
2014-01-10 13:28                 ` DT include files Tomasz Figa
2014-01-10 13:28                   ` Tomasz Figa
2014-01-10 15:30                   ` Rob Herring
2014-01-10 15:30                     ` Rob Herring
2014-01-10 17:03                     ` Gerhard Sittig
2014-01-10 17:03                       ` Gerhard Sittig
2014-01-13 16:48                       ` Stephen Warren
2014-01-13 16:48                         ` Stephen Warren
2014-01-13 18:10                         ` Gerhard Sittig
2014-01-13 18:10                           ` Gerhard Sittig
2014-01-10 18:37                     ` Olof Johansson
2014-01-10 18:37                       ` Olof Johansson
2014-01-11  3:12                       ` Shawn Guo
2014-01-11  3:12                         ` Shawn Guo
2014-01-11 13:15                         ` Arnd Bergmann
2014-01-11 13:15                           ` Arnd Bergmann
2014-01-12  3:25                           ` Shawn Guo
2014-01-12  3:25                             ` Shawn Guo
2014-01-12 20:21                             ` Arnd Bergmann
2014-01-12 20:21                               ` Arnd Bergmann
2014-01-12 23:16                               ` Linus Walleij
2014-01-12 23:16                                 ` Linus Walleij
2014-01-13  2:31                                 ` Shawn Guo
2014-01-13  2:31                                   ` Shawn Guo
2014-01-13  2:19                               ` Shawn Guo
2014-01-13  2:19                                 ` Shawn Guo
2014-01-24  8:02                                 ` Heiko Stübner [this message]
2014-01-24  8:02                                   ` Heiko Stübner
2014-01-25  2:25                                   ` Shawn Guo
2014-01-25  2:25                                     ` 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=2907925.DyxHkYtGr7@phil \
    --to=heiko@sntech.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 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.