From: Stephen Warren <swarren@wwwdotorg.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Sonic Zhang <sonic.adi@gmail.com>,
Grant Likely <grant.likely@linaro.org>,
LKML <linux-kernel@vger.kernel.org>,
adi-buildroot-devel@lists.sourceforge.net,
Sonic Zhang <sonic.zhang@analog.com>
Subject: Re: [PATCH v4] pinctrl: pinmux: Don't free pins requested by other devices in pinmux_disable_setting.
Date: Wed, 14 Aug 2013 10:28:42 -0600 [thread overview]
Message-ID: <520BB03A.80908@wwwdotorg.org> (raw)
In-Reply-To: <CACRpkdbJ4TYQ+X65166enY54w=4OjDrtEc-t4MzWYvBy=jt_jA@mail.gmail.com>
On 08/14/2013 10:27 AM, Linus Walleij wrote:
> On Wed, Aug 14, 2013 at 6:21 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 08/14/2013 09:54 AM, Linus Walleij wrote:
>>> On Wed, Aug 14, 2013 at 7:26 AM, Sonic Zhang <sonic.adi@gmail.com> wrote:
>>>
>>>> From: Sonic Zhang <sonic.zhang@analog.com>
>>>>
>>>> One peripheral may share part of its pins with the 2nd
>>>> peripheral and the other pins with the 3rd. If it requests all pins
>>>> when part of them has already be requested and owned by the 2nd
>>>> peripheral, this request fails and pinmux_disable_setting() is called.
>>>> The pinmux_disable_setting() frees all pins of the first peripheral
>>>> without checking if the pin is owned by itself or the 2nd, which
>>>> results in the malfunction of the 2nd peripheral driver.
>>>>
>>>> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>>>
>>> Hm it makes some sense so patch applied.
>>>
>>> That said I think we currently have drivers where a pin group
>>> mapped to a certain function in a certain setting *usually*
>>> don't overlap with pins in another group used with another
>>> function, and having it so seems racy, i.e. it will be some
>>> first-come-first-serve effect.
>>>
>>> I will add a warning print.
>>
>> Surely there's a warning print already when the enable_setting() fails,
>> so we don't need to do any more warning prints when the free_setting()
>> cleans up after that?
>
> Now I'm confused ... I added debug prints to pinmux_disable_setting()
> which is where the patch hits? free_setting() is just an empty function
> body still.
I wrote the wrong function name; s/free_setting/disable_setting/ in what
I wrote.
prev parent reply other threads:[~2013-08-14 16:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 5:26 Sonic Zhang
2013-08-14 15:54 ` Linus Walleij
2013-08-14 16:21 ` Stephen Warren
2013-08-14 16:27 ` Linus Walleij
2013-08-14 16:28 ` Stephen Warren [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=520BB03A.80908@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=grant.likely@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sonic.adi@gmail.com \
--cc=sonic.zhang@analog.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
all inboxes | Powered by JetHome®