From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: samsung: Allow pin value to be initialized using pinfunc.
Date: Wed, 20 Nov 2013 14:38:57 +0100 [thread overview]
Message-ID: <1751377.1AvsyJs1NG@amdc1227> (raw)
In-Reply-To: <528BB1F2.4080107@wwwdotorg.org>
Hi Stephen,
On Tuesday 19 of November 2013 11:46:10 Stephen Warren wrote:
> On 11/19/2013 10:15 AM, Tomasz Figa wrote:
> > This patch extends the range of settings configurable via pinfunc API
> > to cover pin value as well. This allows configuration of default values
> > of pins.
>
> Shouldn't there be a driver that acquires the GPIO that's output to the
> pin, and configures the output value? IIRC there have been previous
> discussions re: having a list of e.g. initial GPIO output values in DT,
> and that was rejected, and this patch seems to be doing almost the exact
> same thing, just at the pinctrl level rather than GPIO level.
Well, on the contrary, I remember a discussion about specifying initial
clock tree configuration in DT (on Linaro Connect in Dublin, but AFAIR
also on the ML before. Through analogy, I would extend this to initial
pin settins. However maybe the use cases behind this will make things
clearer.
>
> That all said, I admit this could be a useful feature...
Two specific things I had in mind with this have been:
- pins of the SoC unused on particular boards, which often need different
configuration depending on pin bank, SoC revision and so on. I know
that _ideally_ this should be done by "firmware", but I believe we
have enough historic experience to know that we shouldn't expect from
the bootloader more than that it just loads us, as the name would
suggest (and I have even had experience with bootloaders that couldn't
properly do this basic task, screwing up, for example, by leaving MMU
turned on before jumping to the kernel).
- initializing safe default state of all pins on the board, to cope with
configurations when not all drivers are enabled. As an example, take an
embedded board with a little of flash storage, where the kernel has to
be really small, so not all SoC drivers can be compiled into it. Moving
the responsibility of setting initial pin states to drivers would leave
pins of inexistent drivers unconfigured.
I don't think I need to explain why misconfigured pins are a bad thing.
Best regards,
Tomasz
prev parent reply other threads:[~2013-11-20 13:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 17:15 [PATCH] pinctrl: samsung: Allow pin value to be initialized using pinfunc Tomasz Figa
2013-11-19 18:46 ` Stephen Warren
2013-11-19 18:59 ` Doug Anderson
2013-11-19 19:16 ` Stephen Warren
2013-11-20 0:02 ` Kyungmin Park
2013-11-20 0:07 ` Stephen Warren
2013-11-20 12:51 ` Mark Brown
2013-11-25 14:34 ` Linus Walleij
2013-11-25 20:01 ` Kevin Bracey
2013-11-26 0:30 ` Tomasz Figa
2013-12-03 9:31 ` Linus Walleij
2013-12-03 9:33 ` Tomasz Figa
2013-12-03 9:29 ` Linus Walleij
2013-12-05 15:07 ` Mark Brown
2013-12-05 15:11 ` Tomasz Figa
2013-12-05 16:49 ` Kevin Bracey
2013-12-05 17:03 ` Tomasz Figa
2013-12-05 18:00 ` Mark Brown
2013-12-09 10:22 ` Linus Walleij
2013-12-09 17:04 ` Mark Brown
2013-12-05 23:54 ` Stephen Warren
2013-12-09 12:57 ` Linus Walleij
2013-11-20 14:57 ` Tomasz Figa
2013-11-20 13:38 ` Tomasz Figa [this message]
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=1751377.1AvsyJs1NG@amdc1227 \
--to=t.figa@samsung.com \
--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).