# Re: \[PATCH 19/19 v2\] mfd/ti\_am335x\_tscadc: add private lock/unlock function for regmap read/write

- From: Mark Brown \<hidden\>
- Date: 2013-05-29 11:12:53 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2013/05/8921551
- Thread: https://ratatoskr.run/linux-iio/2013/05/8921551/t.md

```text
On Wed, May 29, 2013 at 10:46:42AM +0200, Sebastian Andrzej Siewior wrote:
> Without this, devm_regmap_init_mmio() creates & uses a simple
> spin_lock() and this should be enough. Within the probe function the
> registers are read and written in process context. Later they are
> accessed from the ISR and lockdep complains because now the lock is
> taken suddenly with IRQs enabled. Currently I don't see any other way to
> keep lockdep quiet than doing this.

This is not a good place to make this change, there's nothing specific
to the device here and in actual fact there's already a change in the
works from Lars-Peter Clausen converting the spinlock to always use
spin_lock_irqsave() so it should be resolved soon.  The thread was on
lkml in the past few days.
```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-input/2013/05/8921551/attachment/0) (application/pgp-signature, 836 bytes)
