All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org,
	Grant Likely <grant.likely@secretlab.ca>,
	Martin Persson <martin.persson@stericsson.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/4] Pinmux subsystem
Date: Tue, 10 May 2011 23:25:44 +0200	[thread overview]
Message-ID: <BANLkTikSwkYEvbQ8XVrB3LUetVqBBUjT2g@mail.gmail.com> (raw)
In-Reply-To: <20110502225708.GD28001@n2100.arm.linux.org.uk>

Finally I'm back at the pinmux patch set trying to answer all questions
accumulated:

2011/5/3 Russell King - ARM Linux <linux@arm.linux.org.uk>:

> While I like the idea of consolidating the pinmuxing stuff, I'm not sure
> about having a struct pin_mux pointer in each bus types device structure.
> It'd mean this would have to be added to platform devices as well...

Yeah I'm not sure about the patch to the AMBA/PrimeCell bus really,
an alternative is for all drivers to request their mux individually. But in
the AMBA bus we already request the silicon block clock and the
silicon power switch so it seemed natural to also request a mux setting,
if there is one.

> Then there's SA1100 (and PXA?) to consider with its IrDA setup, where its
> necessary to switch the pin muxing during driver operation, when switching
> between SIR and FIR modes (SIR uses the UART, FIR uses a separate hardware
> block.)
>
> So any per-device pinmuxing subsystem also needs a way that a driver can
> change the pinmuxing of its associated pins on the fly too.

It can, basically:

struct pinmux *pmx;

pmx = pinmux_get(dev, "irda-uart");
pinmux_enable(pmx);
(... SIR UART operations ...)
pinmux_disable(pmx);
pinmux_put(pmx);
(... stuff to init FIR silicon ...)
pmx = pinmux_get(dev, "irda-fir");
pinmux_enable(pmx);
(... etc ...)

Just like you would take an alternative clock or regulator in case using i would
exclude the use of another clock/regulator.

Thanks,
Linus Walleij

WARNING: multiple messages have this Message-ID (diff)
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] Pinmux subsystem
Date: Tue, 10 May 2011 23:25:44 +0200	[thread overview]
Message-ID: <BANLkTikSwkYEvbQ8XVrB3LUetVqBBUjT2g@mail.gmail.com> (raw)
In-Reply-To: <20110502225708.GD28001@n2100.arm.linux.org.uk>

Finally I'm back at the pinmux patch set trying to answer all questions
accumulated:

2011/5/3 Russell King - ARM Linux <linux@arm.linux.org.uk>:

> While I like the idea of consolidating the pinmuxing stuff, I'm not sure
> about having a struct pin_mux pointer in each bus types device structure.
> It'd mean this would have to be added to platform devices as well...

Yeah I'm not sure about the patch to the AMBA/PrimeCell bus really,
an alternative is for all drivers to request their mux individually. But in
the AMBA bus we already request the silicon block clock and the
silicon power switch so it seemed natural to also request a mux setting,
if there is one.

> Then there's SA1100 (and PXA?) to consider with its IrDA setup, where its
> necessary to switch the pin muxing during driver operation, when switching
> between SIR and FIR modes (SIR uses the UART, FIR uses a separate hardware
> block.)
>
> So any per-device pinmuxing subsystem also needs a way that a driver can
> change the pinmuxing of its associated pins on the fly too.

It can, basically:

struct pinmux *pmx;

pmx = pinmux_get(dev, "irda-uart");
pinmux_enable(pmx);
(... SIR UART operations ...)
pinmux_disable(pmx);
pinmux_put(pmx);
(... stuff to init FIR silicon ...)
pmx = pinmux_get(dev, "irda-fir");
pinmux_enable(pmx);
(... etc ...)

Just like you would take an alternative clock or regulator in case using i would
exclude the use of another clock/regulator.

Thanks,
Linus Walleij

  reply	other threads:[~2011-05-10 21:25 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-02 19:16 [PATCH 0/4] Pinmux subsystem Linus Walleij
2011-05-02 19:16 ` Linus Walleij
2011-05-02 22:57 ` Russell King - ARM Linux
2011-05-02 22:57   ` Russell King - ARM Linux
2011-05-10 21:25   ` Linus Walleij [this message]
2011-05-10 21:25     ` Linus Walleij
2011-05-10 21:45     ` Russell King - ARM Linux
2011-05-10 21:45       ` Russell King - ARM Linux
2011-05-10 23:15       ` Linus Walleij
2011-05-10 23:15         ` Linus Walleij
2011-05-03 17:27 ` Andrew Lunn
2011-05-03 17:27   ` Andrew Lunn
2011-05-03 19:29   ` Valdis.Kletnieks
2011-05-03 19:29     ` Valdis.Kletnieks at vt.edu
2011-05-10 21:42   ` Linus Walleij
2011-05-10 21:42     ` Linus Walleij
2011-05-11  9:50     ` Andrew Lunn
2011-05-11  9:50       ` Andrew Lunn
2011-05-12  0:41       ` Linus Walleij
2011-05-12  0:41         ` Linus Walleij
2011-05-12  7:00         ` Andrew Lunn
2011-05-12  7:00           ` Andrew Lunn
2011-05-15 13:33     ` Andrew Lunn
2011-05-15 13:33       ` Andrew Lunn
2011-05-15 17:50       ` Linus Walleij
2011-05-15 17:50         ` Linus Walleij
2011-05-17  1:57         ` Kyungmin Park
2011-05-17  1:57           ` Kyungmin Park
2011-05-18 20:02           ` Linus Walleij
2011-05-18 20:02             ` Linus Walleij
2011-05-18 21:21             ` Mark Brown
2011-05-18 21:21               ` Mark Brown
2011-05-12  7:44 ` Sascha Hauer
2011-05-12  7:44   ` Sascha Hauer
2011-05-12  9:40   ` Tony Lindgren
2011-05-12  9:40     ` Tony Lindgren
2011-05-12 14:02   ` Linus Walleij
2011-05-12 14:02     ` Linus Walleij
2011-05-12 21:17     ` RE : " Matthieu Castet
2011-05-12 21:17       ` Matthieu Castet
2011-05-13  7:05       ` RE : " Linus Walleij
2011-05-13  7:05         ` Linus Walleij
2011-05-13 16:03         ` RE : " Matthieu CASTET
2011-05-13 16:03           ` Matthieu CASTET
2011-05-14  7:57           ` RE : " Linus Walleij
2011-05-14  7:57             ` Linus Walleij
2011-05-13  9:59     ` Sascha Hauer
2011-05-13  9:59       ` Sascha Hauer

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=BANLkTikSwkYEvbQ8XVrB3LUetVqBBUjT2g@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=grant.likely@secretlab.ca \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=martin.persson@stericsson.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 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.