Re: [PATCH RESEND] mfd: mc13xxx: Remove unneeded mc13xxx_lock/unlock

From
Alexander Shiyan <hidden>
Date
2013-12-02 10:35:44
Also in
lkml
Reply to
Philippe Rétornaz, 2013-12-02
Hello.
Le 30/11/2013 06:01, Alexander Shiyan a ?crit :
quoted
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.

---
Thread (3 messages) 3 messages, 2 authors, last reply 2013-12-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help