public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Philippe Rétornaz" <philippe.retornaz@gmail.com>
Cc: "Samuel Ortiz" <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	"Sascha Hauer" <kernel@pengutronix.de>,
	"Shawn Guo" <shawn.guo@linaro.org>,
	"Lee Jones" <lee.jones@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RESEND] mfd: mc13xxx: Remove unneeded mc13xxx_lock/unlock
Date: Mon, 02 Dec 2013 14:33:29 +0400	[thread overview]
Message-ID: <1385980409.843563145@f327.i.mail.ru> (raw)
In-Reply-To: <529C5804.2020501@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 979 bytes --]

Hello.

> Le 30/11/2013 06:01, Alexander Shiyan a écrit :
> > Locking is performed by regmap API so no additional locking is
> > needed. Nevertheless, keep locking in the ADC conversion routine.
> > This need for keep proper read ADC sequence when calling from adc &
> > touchscreen drivers.
> 
> You can't do that so easily !
> Regmap only protect against concurrent access to the SPI/I2C bus, but do
> not protect the driver's internal data.
> And it does not protect against a race between concurrent access at a
> higher level :
...
> It's OK to do this if you are protected by a mutex, but as soon as you
> remove it you will have concurrency between two irq_unmask/irq_mask.

irq_unmask/irq_mask and some other functions can be converted to use
mc13xxx_reg_rmw. So I'll make a patch for this first.
Thanks.

---
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

      reply	other threads:[~2013-12-02 10:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30  5:01 [PATCH RESEND] mfd: mc13xxx: Remove unneeded mc13xxx_lock/unlock Alexander Shiyan
2013-12-02  9:51 ` Philippe Rétornaz
2013-12-02 10:33   ` Alexander Shiyan [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=1385980409.843563145@f327.i.mail.ru \
    --to=shc_work@mail.ru \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philippe.retornaz@gmail.com \
    --cc=sameo@linux.intel.com \
    --cc=shawn.guo@linaro.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