SUPERH platform development
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC 1/3] pinctrl: sh-pfc: support sparse GPIO numbers
Date: Thu, 14 Feb 2013 11:55:16 +0000	[thread overview]
Message-ID: <20130214115516.GA3882@linux-sh.org> (raw)
In-Reply-To: <1360684204-12888-2-git-send-email-g.liakhovetski@gmx.de>

On Tue, Feb 12, 2013 at 04:50:02PM +0100, Guennadi Liakhovetski wrote:
> Not on all sh-/r-mobile platfotms all pins are numbered contiguously from 0
> to N-1. On all ARM-based platforms datasheets use simple numbers to identify
> them, unlike some SuperH-based SoC, naming pins, using strings, e.g. A31:A0,
> B11:B0, C31:C0, etc. So far the sg-pfc pinctrl driver supported only
> contiguous pin numbering. This patch adds support for sparse pin numbers to
> support sh73a0 and any other similar SoCs.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

The sh-pfc pinctrl driver is not the place where this sort of lookup
should be happening, especially as the pinctrl subsystem already tracks
GPIO ranges for us. Is there some reason you can't just expand the
platform definition and tie in to pinctrl_add_gpio_ranges() for
supporting multiple ranges instead?

Your sparse case isn't exactly sparse either, as you seem to only be
dealing with multiple linear ranges, which is rather different from a
single pin space with individual GPIOs spread far and wide. The former
entails traversing a list of ranges in lookup paths, while the latter
requires far more complex handling/translation if attempting to tightly
pack the space.

  parent reply	other threads:[~2013-02-14 11:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 15:50 [PATCH/RFC 1/3] pinctrl: sh-pfc: support sparse GPIO numbers Guennadi Liakhovetski
2013-02-13  4:31 ` Simon Horman
2013-02-14 11:55 ` Paul Mundt [this message]
2013-02-14 12:09 ` Laurent Pinchart
2013-02-14 12:10 ` Linus Walleij
2013-02-14 12:23 ` Laurent Pinchart
2013-02-14 12:38 ` Paul Mundt
2013-02-14 14:23 ` Laurent Pinchart
2013-02-14 15:26 ` 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=20130214115516.GA3882@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.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