From: vz@mleia.com (Vladimir Zapolskiy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv8 1/2] pwm: Add Allwinner SoC support
Date: Mon, 20 Oct 2014 16:10:31 +0300 [thread overview]
Message-ID: <544509C7.9010309@mleia.com> (raw)
In-Reply-To: <20141020102939.GB10616@piout.net>
Hi Alexandre,
On 20.10.2014 13:29, Alexandre Belloni wrote:
> Hi,
>
> On 20/10/2014 at 00:22:57 +0300, Vladimir Zapolskiy wrote :
>>> +struct sun4i_pwm_chip {
>>> + struct pwm_chip chip;
>>> + struct clk *clk;
>>> + void __iomem *base;
>>> + struct mutex ctrl_lock;
>>
>> why do you use mutex? I haven't found any blocking subcalls under
>> protection, a spinlock seems to fit better here.
>>
>
> A mutex here will do the right thing. The lock is never taken in
> interrupt context and a mutex is spinning for a few cycles before
> putting the thread to sleep.
and why do you want to put a thread to sleep in context of the driver?
> I'm not sure why you feel a spinlock would be better here.
>
Only because a spinlock is lighter than a mutex.
With best wishes,
Vladimir
next prev parent reply other threads:[~2014-10-20 13:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-19 18:28 [PATCHv8 0/2] Add Allwinner SoCs PWM support Alexandre Belloni
2014-10-19 18:28 ` [PATCHv8 1/2] pwm: Add Allwinner SoC support Alexandre Belloni
2014-10-19 21:22 ` Vladimir Zapolskiy
2014-10-20 10:29 ` Alexandre Belloni
2014-10-20 13:10 ` Vladimir Zapolskiy [this message]
2014-10-20 17:06 ` Alexandre Belloni
2014-10-20 17:36 ` Russell King - ARM Linux
2014-10-20 17:44 ` Vladimir Zapolskiy
2014-10-19 18:28 ` [PATCHv8 2/2] pwm: sunxi: document OF bindings Alexandre Belloni
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=544509C7.9010309@mleia.com \
--to=vz@mleia.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).