<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging/comedi, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-12-22T00:02:21Z</updated>
<entry>
<title>STAGING: COMEDI: Using kernel types in plx9080.h</title>
<updated>2015-12-22T00:02:21Z</updated>
<author>
<name>Moritz König</name>
<email>moritz.koenig@fau.de</email>
</author>
<published>2015-12-17T15:53:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6e9b914332f5c60249a911c687eea1aa0cd37d5'/>
<id>urn:sha1:f6e9b914332f5c60249a911c687eea1aa0cd37d5</id>
<content type='text'>
This patch makes plx9080.h use kernel types.

Signed-off-by: Moritz König &lt;moritz.koenig@fau.de&gt;
Signed-off-by: Fabian Lang &lt;fabian.lang@fau.de&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Acked-by: Moritz Fischer &lt;moritz.fischer@ettus.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>STAGING: COMEDI: Added spaces around binary operators in plx9080.h</title>
<updated>2015-12-22T00:02:21Z</updated>
<author>
<name>Moritz König</name>
<email>moritz.koenig@fau.de</email>
</author>
<published>2015-12-17T15:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0bcce6b3a6a8c2ac8f5b8be8fb7be0d4e682072'/>
<id>urn:sha1:e0bcce6b3a6a8c2ac8f5b8be8fb7be0d4e682072</id>
<content type='text'>
This patch adds spaces around binary operators in plx9080.h.

Signed-off-by: Moritz König &lt;moritz.koenig@fau.de&gt;
Signed-off-by: Fabian Lang &lt;fabian.lang@fau.de&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>STAGING: COMEDI: Fixed format of comments in plx9080.h</title>
<updated>2015-12-22T00:02:21Z</updated>
<author>
<name>Moritz König</name>
<email>moritz.koenig@fau.de</email>
</author>
<published>2015-12-17T15:53:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e554840c947c2d25be24c790cf8db9579b2dfb4f'/>
<id>urn:sha1:e554840c947c2d25be24c790cf8db9579b2dfb4f</id>
<content type='text'>
This patch fixes the format of comments in plx9080.h.

Signed-off-by: Moritz König &lt;moritz.koenig@fau.de&gt;
Signed-off-by: Fabian Lang &lt;fabian.lang@fau.de&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: comedilib.h: Coding style warning fix for block comments</title>
<updated>2015-12-22T00:01:12Z</updated>
<author>
<name>Jitendra Kumar Khasdev</name>
<email>jkhasdev@gmail.com</email>
</author>
<published>2015-11-24T12:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2acc980bc623bd8cf3959e85e01fe98c6ede74f5'/>
<id>urn:sha1:2acc980bc623bd8cf3959e85e01fe98c6ede74f5</id>
<content type='text'>
This patch is to comedilib.h file that fixes up following warnings
reported by checkpatch.pl :
I) Block comments use * on subsequent lines.

Apart from it I have remove header file path by base file name as
suggested by community.

Signed-off-by: Jitendra Kumar Khasdev &lt;jkhasdev@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>
</entry>
<entry>
<title>staging: comedi: s526: add macros for counter control reg values</title>
<updated>2015-12-22T00:00:12Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2015-11-19T14:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e5417e49965a47f690fe33ab5b27011c86ef89b5'/>
<id>urn:sha1:e5417e49965a47f690fe33ab5b27011c86ef89b5</id>
<content type='text'>
The driver writes a couple of literal values to the counter
control/status register, 0x8000 to reset the counter, and 0x4000 to load
the counter from preload register 0.  Add a bunch of macros to define
these values and other values for the register, based on the Sensoray
526 manual.

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>
</entry>
<entry>
<title>staging: comedi: s526: replace counter mode bitfield struct</title>
<updated>2015-12-22T00:00:12Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2015-11-19T14:49:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=479bd5edab3ca840ba60a89d3172029039ddc2a6'/>
<id>urn:sha1:479bd5edab3ca840ba60a89d3172029039ddc2a6</id>
<content type='text'>
The driver uses `struct counter_mode_register_t` to describe the 16-bit
counter mode register as a sequence of bitfield members.  The struct
appears as the type of one of the members of `union cmReg`, the other
member of which is of type `unsigned short`, so the driver can
manipulate the register value as a whole, or as individual fields.
Although this is fairly convenient, it's not that conventional.  The
code also needs to define the bitfield members in ascending or
descending order of the physical bits, depending on whether bitfields
are little- or big-endian.

Rip all that out and replace it with a bunch of macros to set and mask
out bits of the register value, as that's the more conventional way to
do it.  A bonus is that we get rid of a load of CamelCase definitions in
the process.

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>
</entry>
<entry>
<title>staging: comedi: check for more errors for zero-length write</title>
<updated>2015-12-21T23:58:54Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2015-11-18T17:55:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28a60c456bc52bbe949ad54c6b23917a651fc342'/>
<id>urn:sha1:28a60c456bc52bbe949ad54c6b23917a651fc342</id>
<content type='text'>
If the "write" file operation handler, `comedi_write()` is passed 0 for
the amount to write, some error conditions are currently skipped and the
function just returns 0.  Change it to check those error conditions and
return an error value if appropriate.  The trickiest case is the check
for when the previously set up asynchronous command has terminated with
an error.  In that case, `-EPIPE` is returned (as it is for a write of
non-zero length) and the subdevice gets marked as non-busy.

A zero-length write that returns 0 has no other effects, in particular,
it does not cause the subdevice to be marked as non-busy.

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>
</entry>
<entry>
<title>staging: comedi: simplify returned errors for comedi_write()</title>
<updated>2015-12-21T23:58:54Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2015-11-18T17:55:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3318c7add8b43a071498a973548dd24b55c587d4'/>
<id>urn:sha1:3318c7add8b43a071498a973548dd24b55c587d4</id>
<content type='text'>
In order to perform a "write" file operation, an asynchronous COMEDI
command in the "write" direction needs to have been set up by the
current file object on the COMEDI "write" subdevice associated with the
file object.  If there is a "write" subdevice, but a command has not
been set up by the file object (or is has been set-up in the wrong
direction), `comedi_write()` currently returns one of two error values
`-EINVAL` or `-EACCES`.  `-EACCES` is returned if the command was set up
by a different subdevice, or somewhat randomly, if a COMEDI
"instruction" is currently being processed.  `-EINVAL` is returned in
other cases.  Simplify it by returning `-EINVAL` for all these cases.

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>
</entry>
<entry>
<title>staging: comedi: return error on "write" if no command set up</title>
<updated>2015-12-21T23:58:54Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2015-11-18T17:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40d0e80e08012ac99b187cbaaeb8aab92b71714d'/>
<id>urn:sha1:40d0e80e08012ac99b187cbaaeb8aab92b71714d</id>
<content type='text'>
The "write" file operation handler, `comedi_write()` returns an error
for pretty much any condition that prevents a "write" going ahead.  One
of the conditions that prevents a "write" going ahead is that no
asynchronous command has been set up, but that currently results in a
return value of 0 (unless COMEDI instructions are being processed or an
asynchronous command has been set up by a different file object).
Change it to return `-EINVAL` in this case.

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>
</entry>
<entry>
<title>staging: comedi: allow buffer wraparound in comedi_write()</title>
<updated>2015-12-21T23:58:54Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2015-11-18T17:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35a7475dc818320915e89ed0217872ff1ab66ec2'/>
<id>urn:sha1:35a7475dc818320915e89ed0217872ff1ab66ec2</id>
<content type='text'>
`comedi_write()` copies data from the user buffer to the acquisition
data buffer, which is cyclic, using a single call to `copy_from_user()`.
It currently avoids having to deal with wraparound of the cyclic buffer
by limiting the amount it copies (and the amount returned to the user).
Change it to deal with the wraparound using two calls to
`copy_from_user()` if necessary.

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>
</entry>
</feed>
