lkml.org 
[lkml]   [2013]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4] pinctrl: pinmux: Don't free pins requested by other devices in pinmux_disable_setting.
From
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.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2013-08-14 18:21    [W:0.534 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site