Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1346882
| From | Alison Schofield <amsfield22@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 0/2] iio: introduce iio_{claim|release}_direct_mode() |
| Date | 2016-03-01 20:00 +0100 |
| Message-ID | <r7XGy-4zK-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
This patchset introduces two helper functions to simplify driver code
requiring the device to be locked in direct mode during execution of a
code path. The staging driver ad7192 is updated to demonstrate usage.
This could be applied to approximately 18 known cases where the driver
is holding the lock in direct mode. Unknown cases might be those that
should, but don't, hold the lock.
Alternate implementation: Generalize to support a claim on any mode.
Do iio_claim_mode(device,mode) where if the device is in *mode*, it
is guaranteed to stay that way until release is called. I considered
and rejected this option because a) not sure other modes would ever
need to be locked, and b) the semantic improvement is less when it
is generalized.
This patchset was inspired by a discussion on linux-iio:
http://www.spinics.net/lists/linux-iio/msg18540.html
Alison Schofield (2):
iio: core: implement iio_{claim|release}_direct_mode()
staging: iio: adc7192: use iio_{claim|release}_direct_mode()
drivers/iio/industrialio-core.c | 39 +++++++++++++++++++++++++++++++++++++++
drivers/staging/iio/adc/ad7192.c | 24 +++++++++---------------
include/linux/iio/iio.h | 2 ++
3 files changed, 50 insertions(+), 15 deletions(-)
--
2.1.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[RFC PATCH 0/2] iio: introduce iio_{claim|release}_direct_mode() Alison Schofield <amsfield22@gmail.com> - 2016-03-01 20:00 +0100
[RFC PATCH 2/2] staging: iio: adc7192: use iio_{claim|release}_direct_mode() Alison Schofield <amsfield22@gmail.com> - 2016-03-01 20:10 +0100
[RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode() Alison Schofield <amsfield22@gmail.com> - 2016-03-01 20:10 +0100
Re: [RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode() Lars-Peter Clausen <lars@metafoo.de> - 2016-03-02 14:30 +0100
csiph-web