<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/staging/comedi/drivers.c, branch v4.3</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>staging: comedi: do not return -ENOSYS.</title>
<updated>2015-08-05T18:55:44+00:00</updated>
<author>
<name>Ted Chen</name>
<email>tedc.37zngo@gmail.com</email>
</author>
<published>2015-08-04T17:18:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1a59adb222bc4758241eb4ff253faa5b1ebd4cab'/>
<id>1a59adb222bc4758241eb4ff253faa5b1ebd4cab</id>
<content type='text'>
fixed coding style issue by replacing ENOSYS
with EIO because it means 'invalid syscall nr'
and nothing else.

Signed-off-by: Ted Chen &lt;tedc.37zngo@gmail.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixed coding style issue by replacing ENOSYS
with EIO because it means 'invalid syscall nr'
and nothing else.

Signed-off-by: Ted Chen &lt;tedc.37zngo@gmail.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: wrap COMEDI_SRF_FREE_SPRIV usage</title>
<updated>2015-04-30T15:15:59+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2015-04-21T12:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8fc369ae38ff281d38e9ea11805a5cae862989bc'/>
<id>8fc369ae38ff281d38e9ea11805a5cae862989bc</id>
<content type='text'>
The `COMEDI_SRF_FREE_SPRIV` flag in the `runflags` member of `struct
comedi_subdevice` indicates that the memory pointed to by the `private`
member can be automatically freed by the comedi core on subdevice
clean-up (when the low-level comedi device is being "detached").  the
flag doesn't really belong in `runflags`, but it was somewhere
convenient to keep it without having to add a new member to the
structure.

Rather than access the `COMEDI_SRF_FREE_SPRIV` flag directly, use some
new wrapper functions:

* comedi_can_auto_free_spriv(s) - checks whether the subdevice's
  `s-&gt;private` points to memory that can be freed automatically.
* comedi_set_spriv_auto_free(s) - marks the subdevice as having a
  `s-&gt;private` that points to memory that can be freed automatically.

Export `comedi_set_spriv_auto_free()` for use by the low-level comedi
driver modules, in particular the "amplc_dio200_common" module.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Reviewed-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `COMEDI_SRF_FREE_SPRIV` flag in the `runflags` member of `struct
comedi_subdevice` indicates that the memory pointed to by the `private`
member can be automatically freed by the comedi core on subdevice
clean-up (when the low-level comedi device is being "detached").  the
flag doesn't really belong in `runflags`, but it was somewhere
convenient to keep it without having to add a new member to the
structure.

Rather than access the `COMEDI_SRF_FREE_SPRIV` flag directly, use some
new wrapper functions:

* comedi_can_auto_free_spriv(s) - checks whether the subdevice's
  `s-&gt;private` points to memory that can be freed automatically.
* comedi_set_spriv_auto_free(s) - marks the subdevice as having a
  `s-&gt;private` that points to memory that can be freed automatically.

Export `comedi_set_spriv_auto_free()` for use by the low-level comedi
driver modules, in particular the "amplc_dio200_common" module.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Reviewed-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: drivers: (!foo) preferred over (foo == NULL)</title>
<updated>2015-03-07T00:01:28+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hsweeten@visionengravers.com</email>
</author>
<published>2015-03-04T19:15:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e2850160763e716e55fa6328bfab335cac90fc80'/>
<id>e2850160763e716e55fa6328bfab335cac90fc80</id>
<content type='text'>
Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: add 'pacer' member to struct comedi_device</title>
<updated>2015-03-02T02:51:49+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hsweeten@visionengravers.com</email>
</author>
<published>2015-02-23T21:57:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=43db062afe993fbfed184d78293527679fef9784'/>
<id>43db062afe993fbfed184d78293527679fef9784</id>
<content type='text'>
Add a new member to the comedi_device struct for a comedi_8254 'pacer'. This
provides a convient place to store the data allocated by the comedi_8254 module
for boards that use an 8254 device to create the data acquisition pacer clock.

Automatically free this pointer in comedi_device_detach_cleanup() so that the
drivers don't need to do it when then are detached.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new member to the comedi_device struct for a comedi_8254 'pacer'. This
provides a convient place to store the data allocated by the comedi_8254 module
for boards that use an 8254 device to create the data acquisition pacer clock.

Automatically free this pointer in comedi_device_detach_cleanup() so that the
drivers don't need to do it when then are detached.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: comedidev.h: add namespace to the subdevice "runflags"</title>
<updated>2015-01-25T11:59:09+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hsweeten@visionengravers.com</email>
</author>
<published>2015-01-20T19:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=84bb0bccd26ec3029124a9dd200b985c1cde77bd'/>
<id>84bb0bccd26ec3029124a9dd200b985c1cde77bd</id>
<content type='text'>
Tidy up and document the subdevice "runflags". Rename them so they have
comedi namespace.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tidy up and document the subdevice "runflags". Rename them so they have
comedi namespace.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: drivers: have core hook up default (*insn_read) for readback</title>
<updated>2014-11-26T23:37:52+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hsweeten@visionengravers.com</email>
</author>
<published>2014-11-21T17:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=aa11672ef43c05d4ff5580ad41ceae9867e5430d'/>
<id>aa11672ef43c05d4ff5580ad41ceae9867e5430d</id>
<content type='text'>
Most of the comedi drivers that provide readback for write only subdevices now
use the comedi core comedi_alloc_subdev_readback() helper to allocate the subdevice
'reaback' member instead of using some member in their private data. These drivers
also hook up the (*insn_read) callback to the comedi_readback_insn_read() helper to
provide the readback.

Have the core automatically hook up the (*insn_read) callback after allocating the
memory if the driver has not already hooked it up to a private function.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of the comedi drivers that provide readback for write only subdevices now
use the comedi core comedi_alloc_subdev_readback() helper to allocate the subdevice
'reaback' member instead of using some member in their private data. These drivers
also hook up the (*insn_read) callback to the comedi_readback_insn_read() helper to
provide the readback.

Have the core automatically hook up the (*insn_read) callback after allocating the
memory if the driver has not already hooked it up to a private function.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: fix scan_end_arg == chanlist_len assumption</title>
<updated>2014-11-26T23:35:24+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2014-11-12T16:00:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=af57d89e162a18676cb87825e193125e40f4c34b'/>
<id>af57d89e162a18676cb87825e193125e40f4c34b</id>
<content type='text'>
Some comedi drivers allow the `scan_end_arg` value of an asynchronous
command to be a multiple (&gt; 1) of the `chanlist_len` although most
require them to be the same value.

`comedi_bytes_per_scan()` is incorrectly using `chanlist_len` as the
length of the scan.  Change it to use `scan_end_arg`.

`comedi_nsamples_left()` is incorrectly using `cur_chan` as the current
sample position in the scan (it is actually the current position in the
channel list).  Change it to use the actual sample position in the scan.
(Unfortunately we only have the current scan position in bytes currently,
so convert that to a sample position.)

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Reviewed-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some comedi drivers allow the `scan_end_arg` value of an asynchronous
command to be a multiple (&gt; 1) of the `chanlist_len` although most
require them to be the same value.

`comedi_bytes_per_scan()` is incorrectly using `chanlist_len` as the
length of the scan.  Change it to use `scan_end_arg`.

`comedi_nsamples_left()` is incorrectly using `cur_chan` as the current
sample position in the scan (it is actually the current position in the
channel list).  Change it to use the actual sample position in the scan.
(Unfortunately we only have the current scan position in bytes currently,
so convert that to a sample position.)

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Reviewed-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: drivers: introduce comedi_nsamples_left()</title>
<updated>2014-11-07T17:29:41+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hsweeten@visionengravers.com</email>
</author>
<published>2014-11-05T17:31:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f615915ee5faf74d8912df1694e810c8269f6b3f'/>
<id>f615915ee5faf74d8912df1694e810c8269f6b3f</id>
<content type='text'>
Introduce a helper function to calculate the number of samples remaining
when the cmd-&gt;stop_src is TRIG_COUNT.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a helper function to calculate the number of samples remaining
when the cmd-&gt;stop_src is TRIG_COUNT.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: drivers: introduce comedi_nscans_left()</title>
<updated>2014-11-07T17:29:41+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hsweeten@visionengravers.com</email>
</author>
<published>2014-11-05T17:31:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2ee37750014220c5cc5f560e967432edb870c890'/>
<id>2ee37750014220c5cc5f560e967432edb870c890</id>
<content type='text'>
Introduce a helper function to determine the number of scans left in
the async command.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a helper function to determine the number of scans left in
the async command.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: comedidev.h: add 'scans_done' member to comedi_async</title>
<updated>2014-11-05T22:59:46+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hsweeten@visionengravers.com</email>
</author>
<published>2014-11-05T17:20:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1dacbe5b26268fd3eaa6dad41271d296b072f3df'/>
<id>1dacbe5b26268fd3eaa6dad41271d296b072f3df</id>
<content type='text'>
Introduce a new member to comedi_async to count the number of scans completed.
This member is cleared by comedi_buf_reset() along with the other comedi_async
members. It is incremented in comedi_inc_scan_progress() when the end of scan
is detected.

This member will be used to clean up the scan counting in the comedi drivers.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new member to comedi_async to count the number of scans completed.
This member is cleared by comedi_buf_reset() along with the other comedi_async
members. It is incremented in comedi_inc_scan_progress() when the end of scan
is detected.

This member will be used to clean up the scan counting in the comedi drivers.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
