Alison Schofield
08a3380551
iio: core: implement iio_device_{claim|release}_direct_mode()
...
It is often the case that the driver wants to be sure a device stays
in direct mode while it is executing a task or series of tasks. To
accomplish this today, the driver performs this sequence: 1) take the
device state lock, 2) verify it is not in a buffered mode, 3) execute
some tasks, and 4) release that lock.
This patch introduces a pair of helper functions that simplify these
steps and make it more semantically expressive.
iio_device_claim_direct_mode()
If the device is not in any buffered mode it is guaranteed
to stay that way until iio_release_direct_mode() is called.
iio_device_release_direct_mode()
Release the claim. Device is no longer guaranteed to stay
in direct mode.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-03-12 11:17:19 +00:00
..
2016-02-27 12:33:42 -08:00
2016-03-01 16:10:45 -08:00
2016-02-10 11:35:55 -05:00
2015-12-29 15:32:24 -05:00
2016-02-14 14:25:59 -08:00
2016-01-17 12:32:01 -08:00
2016-02-11 08:56:09 -07:00
2016-01-06 16:37:14 +01:00
2016-02-01 12:27:18 -08:00
2016-01-06 08:25:24 -05:00
2016-03-01 16:10:45 -08:00
2016-02-22 14:03:02 -08:00
2016-01-31 15:49:06 -08:00
2016-01-04 21:46:45 -05:00
2016-01-29 21:45:17 +01:00
2016-01-29 21:45:17 +01:00
2016-02-06 15:23:56 +08:00
2016-02-23 14:27:42 +09:00
2016-02-15 22:19:32 +05:30
2016-01-01 18:31:34 +01:00
2015-12-21 11:44:00 +09:00
2016-02-16 12:48:18 +00:00
2016-02-10 11:00:49 +01:00
2016-02-25 13:15:43 +10:00
2016-01-20 17:30:20 -08:00
2016-01-07 16:07:54 +01:00
2016-02-07 21:34:12 -08:00
2016-02-19 17:14:25 -08:00
2016-02-03 08:28:43 -08:00
2016-02-20 14:11:01 -08:00
2016-02-18 13:18:48 +01:00
2016-01-18 14:12:33 -05:00
2016-03-12 11:17:19 +00:00
2016-02-22 12:18:07 -08:00
2016-02-10 12:21:57 -08:00
2016-02-16 08:04:06 -08:00
2016-02-17 17:39:05 +00:00
2016-02-19 15:52:41 -05:00
2016-01-17 12:32:01 -08:00
2016-01-12 12:17:28 +01:00
2016-02-04 09:19:45 -07:00
2016-02-02 16:47:14 +05:30
2016-02-21 20:27:50 -05:00
2016-02-04 16:26:10 -02:00
2016-01-20 18:42:30 -08:00
2016-01-20 17:09:18 -08:00
2016-02-09 14:18:23 -08:00
2016-02-22 14:46:24 -08:00
2016-02-15 14:10:48 +01:00
2016-01-24 12:50:56 -08:00
2016-02-22 12:18:07 -08:00
2015-12-29 19:06:23 +01:00
2016-01-21 19:53:10 -05:00
2016-02-23 17:17:20 -08:00
2016-02-12 08:10:31 -07:00
2016-02-14 14:25:59 -08:00
2016-02-17 11:50:53 -08:00
2016-01-22 18:04:28 -05:00
2016-01-20 17:09:18 -08:00
2016-01-03 16:32:59 -08:00
2016-02-27 12:33:42 -08:00
2016-02-10 11:46:01 +05:30
2016-02-15 20:45:50 +01:00
2016-02-22 14:46:24 -08:00
2016-02-03 01:00:29 +01:00
2016-02-21 20:49:34 +01:00
2016-01-12 01:12:40 +01:00
2016-01-29 12:38:59 -08:00
2016-01-21 15:04:59 +01:00
2016-01-20 17:09:18 -08:00
2016-01-15 12:14:47 -08:00
2016-01-12 20:47:06 +02:00
2015-12-12 08:53:21 +01:00
2016-01-12 20:47:06 +02:00
2016-01-18 12:10:45 -08:00
2016-02-17 09:24:07 +01:00
2016-01-04 10:26:58 -05:00
2016-02-18 16:24:48 -08:00
2016-02-25 09:05:19 +09:00
2016-01-22 17:30:52 -08:00
2016-02-12 23:04:41 +00:00
2016-02-08 14:57:30 -08:00
2016-01-19 21:25:57 +02:00
2016-03-09 21:08:50 +00:00
2016-02-10 23:08:55 -08:00
2016-02-11 07:13:29 -08:00
2016-02-07 18:22:54 -08:00
2016-02-24 09:04:21 -08:00
2015-12-01 14:26:33 -08:00
2016-01-27 11:22:25 -07:00
2015-12-08 21:55:49 -05:00
2016-01-29 14:20:16 +02:00
2016-01-26 10:18:28 +02:00
2016-02-07 23:17:59 -08:00
2016-02-11 19:23:28 -08:00
2016-02-14 14:25:59 -08:00
2016-02-22 13:57:01 -08:00
2015-12-08 04:26:05 +01:00