From: Youngmin Nam <ym0914@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Tomasz Figa" <tomasz.figa@gmail.com>,
"Krzysztof Kozłowski" <k.kozlowski@samsung.com>,
"Kukjin Kim" <kgene@kernel.org>,
"Thomas Abraham" <thomas.ab@samsung.com>,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v2] pinctrl: samsung: Fixes samsung_gpio_direction_in/output releated with spinlock
Date: Mon, 8 Feb 2016 13:02:57 +0900 [thread overview]
Message-ID: <56B81371.4030007@gmail.com> (raw)
In-Reply-To: <CACRpkdaTesQL+ginJdjg0LYD=re7-ot=VLnX_=th-0gSqcQx0Q@mail.gmail.com>
Thanks Linus and Tomasz.
Sorry for late. I will rebase on v4.5-rc3 and resend.
Thanks.
On 2016년 01월 27일 21:36, Linus Walleij wrote:
> On Sun, Jan 24, 2016 at 7:02 AM, Youngmin Nam <ym0914@gmail.com> wrote:
>
>> Previously, samsung_gpio_drection_in/output function were not covered with
>> one spinlock.
>>
>> For example, samsung_gpio_direction_output function consists of two functions.
>> 1. samsung_gpio_set
>> 2. samsung_gpio_set_direction
>>
>> When 2 CPUs try to control the same gpio pin heavily,
>> (situation like i2c control with gpio emulation)
>> This situation can cause below problem.
>>
>> CPU 0 | CPU1
>> |
>> samsung_gpio_direction_output |
>> samsung_gpio_set(pin A as 1) | samsung_gpio_direction_output
>> | samsung_gpio_set(pin A as 0)
>> samsung_gpio_set_direction |
>> | samsung_gpio_set_direction
>>
>> The initial value of pin A will be set as 0 while we wanted to set pin A as 1.
>>
>> This patch modifies samsung_gpio_direction_in/output function
>> to be done in one spinlock to fix race condition.
>>
>> Additionally, the new samsung_gpio_set_value was added to implement
>> gpio set callback(samsung_gpio_set) with spinlock using this function.
>>
>> Signed-off-by: Youngmin Nam <ym0914@gmail.com>
>
> This patch does not apply to v4.5-rc1. Please rebase this
> and resend. (With Thomas ACK if it's valid.)
>
> Yours,
> Linus Walleij
>
next prev parent reply other threads:[~2016-02-08 4:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-24 6:02 [PATCH v2] pinctrl: samsung: Fixes samsung_gpio_direction_in/output releated with spinlock Youngmin Nam
2016-01-27 12:36 ` Linus Walleij
2016-02-08 4:02 ` Youngmin Nam [this message]
2016-01-27 13:51 ` Tomasz Figa
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=56B81371.4030007@gmail.com \
--to=ym0914@gmail.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=thomas.ab@samsung.com \
--cc=tomasz.figa@gmail.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.