Re: [RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode()

2016-03-09 Thread Jonathan Cameron
On 09/03/16 20:06, Alison Schofield wrote: > On Sat, Mar 05, 2016 at 06:02:36PM +, Jonathan Cameron wrote: >> On 02/03/16 13:28, Lars-Peter Clausen wrote: >>> On 03/01/2016 08:02 PM, Alison Schofield wrote: It is often the case that the driver wants to be sure a device stays in

Re: [RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode()

2016-03-09 Thread Alison Schofield
On Sat, Mar 05, 2016 at 06:02:36PM +, Jonathan Cameron wrote: > On 02/03/16 13:28, Lars-Peter Clausen wrote: > > On 03/01/2016 08:02 PM, Alison Schofield wrote: > >> 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

Re: [RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode()

2016-03-05 Thread Jonathan Cameron
On 02/03/16 13:28, Lars-Peter Clausen wrote: > On 03/01/2016 08:02 PM, Alison Schofield wrote: >> 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:

Re: [RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode()

2016-03-02 Thread Lars-Peter Clausen
On 03/01/2016 08:02 PM, Alison Schofield wrote: > 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

[RFC PATCH 1/2] iio: core: implement iio_{claim|release}_direct_mode()

2016-03-01 Thread Alison Schofield
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)