From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: linux-sh@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>,
Magnus Damm <magnus.damm@gmail.com>,
Simon Horman <horms@verge.net.au>,
Linus Walleij <linus.walleij@linaro.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Phil Edworthy <phil.edworthy@renesas.com>,
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>,
devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH v2 1/8] sh-pfc: Add OF support
Date: Sat, 12 Jan 2013 18:18:54 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.1301121745320.14443@axis700.grange> (raw)
In-Reply-To: <1357693395-1653-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
Hi Laurent
On Wed, 9 Jan 2013, Laurent Pinchart wrote:
> Support device instantiation through the device tree. The compatible
> property is used to select the SoC pinmux information.
>
> Set the gpio_chip device field to the PFC device to enable automatic
> GPIO OF support.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Cc: devicetree-discuss@lists.ozlabs.org
This whole pinctrl mega-series is a very welcome improvement to the
sh-/r-mobile GPIO framework, and is very well done IMHO! But,
unfortunately, as discussed with you privately yesterday, there is still a
problem with pinctrl DT support on sh73a0, which will, probably, enforce
an update to one or several of patches from this lot. To explain to other
readers, on sh73a0 pin numbers are not contiguous, they are sparse.
When pins are referred to from C code, macro names are used, which are
then correctly decoded to respective positions in pin descriptor tables.
Whereas with DT, pins are referred to from .dts files using their physical
numbers, which then refer to either wrong or missing entries in those
tables.
I do not know where this problem should be solved best - either in
descriptor tables, or in DT handling code, so, I don't know which patches
would be affected. Don't think you'll want to keep the one-to-one
index-to-pin mapping by also making pin-descriptor arrays sparse, so, so
far I only see one possibility to fix this - by using the .enum_id field
from struct sh_pfc_pin instead of just the index - both in C and in DT
case, and those .enum_id values will have to provide physical pin numbers
instead of plane indices. That way you'd have to update at least
drivers/pinctrl/sh-pfc/pfc-sh73a0.c and the sh_pfc_map_gpios() function in
drivers/pinctrl/sh-pfc/pinctrl.c.
Anyway, I'm sure you'll find a suitable solution of this problem and for
now I'll let Simon decide which patches he wants to apply and which ones
he'd prefer to hold back;-)
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2013-01-12 17:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1357693395-1653-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
2013-01-09 1:03 ` [PATCH v2 1/8] sh-pfc: Add OF support Laurent Pinchart
2013-01-12 17:18 ` Guennadi Liakhovetski [this message]
2013-01-15 1:10 ` Simon Horman
2013-01-21 0:38 ` Simon Horman
[not found] ` <20130121003828.GD19062-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2013-01-24 11:17 ` Laurent Pinchart
2013-01-25 2:32 ` Simon Horman
2013-01-24 11:28 ` Laurent Pinchart
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=Pine.LNX.4.64.1301121745320.14443@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=lethal@linux-sh.org \
--cc=linus.walleij@linaro.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=nobuhiro.iwamatsu.yj@renesas.com \
--cc=phil.edworthy@renesas.com \
/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).