1
0
Fork 0
Commit Graph

20 Commits (eaaa7ec71bff4cb34d9025ed89068d4b3cac3df0)

Author SHA1 Message Date
Jitendra Kumar Khasdev 2acc980bc6 staging: comedi: comedilib.h: Coding style warning fix for block comments
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 <jkhasdev@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 16:01:12 -08:00
Ian Abbott 0f3ce1a600 staging: comedi: comedi_bond: handle base channel for insn_bits
If a DIO subdevice has more than 32 channels, its 'insn_bits' handler is
supposed to take account of the base channel from
`CR_CHAN(insn->chanspec)`.  (The comedi core will adjust the base
channel to 0 and shift the mask and data to compensate if the subdevice
has less than or equal to 32 channels.)  The "comedi_bond" driver
currently ignores the base channel and assumes it is 0.

Replace `comedi_dio_bitfield()` in the "kcomedilib" module with
`comedi_dio_bitfield2()` that takes account of the base channel, and
rewrite the "comedi_bond" driver's 'insn_bits' handler
(`bonding_dio_insn_bits()`) to take account of the base channel and use
the new function.

No other modules use `comedi_dio_bitfield()` so it is safe to replace it
with `comedi_dio_bitfield2()`.  The name follows that of the equivalent
function in the user-space comedilib.  If the base channel is non-zero
and the subdevice has less than or equal to 32 channels it needs to
adjust things in the same way as the comedi core (same as `parse_insn()`
in "comedi_fops.c") due to most drivers ignoring the base channel.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:41:56 -07:00
Ian Abbott 16d2d3cbb3 staging: comedi: comedi_bond: get INSN_CONFIG_DIO_QUERY info from horse's mouth
The DIO subdevice of the "comedi_bond" device attempts to remember the
directions of DIO channels itself in the `io_bits` member of the
subdevice, but that is only large enough for the first 32 channels and
it might not be accurate anyway as changing the direction of one channel
may have affected a whole group of channels and we have no idea of the
initial directions before the "bonded" device was linked to the the
"comedi_bond" device.  It would be better to ask the bonded device for
this information when handling a `INSN_CONFIG_DIO_QUERY` configuration
instruction.  Add new function `comedi_dio_get_config()` to the
"kcomedilib" module to allow us to get the DIO direction of a channel
and use it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:41:56 -07:00
H Hartley Sweeten 641f064e5d staging: comedi: remove FSF address from boilerplate text
Addresses change...

Remove the paragraph with the FSF address from all the comedi source
files.

Also, remove the paragraph about the finding the complete GPL in the
COPYING file since it's unnecessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 17:34:22 -04:00
Greg Kroah-Hartman 472dfe77b9 Staging: comedi: kcomedilib: make it typesafe
If we really are passing in a struct comedi_device, then say we are,
don't mess around with void pointers for no reason.

This also fixes up the comedi_bond.c driver, which is the only
user of the kcomedilib code.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:02 -07:00
Greg Kroah-Hartman 88cccef019 Staging: comedi: kcomedilib: comedi_do_insn is now static
No one else calls this function, so mark it static.
Now we can strip out the unneeded functionality in here as well.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:02 -07:00
Greg Kroah-Hartman 027d53bc2f Staging: comedi: remove unused functions from comedilib.h
Remove the functions that are not used from this file.  Now it will
be easier to determine what code can be removed from kcomedilib by
using sparse.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:00 -07:00
Greg Kroah-Hartman e2a0eab0a1 Staging: comedi: move an include file out of comedlib.h
The one .c file that needs it can properly include it.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:00 -07:00
Greg Kroah-Hartman 703f5936e2 Staging: comedi: clean up comedilib.h
Remove a whole #ifdef section that is not needed anymore.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:00 -07:00
Greg Kroah-Hartman 981bdf41ea Staging: comedi: fix up coding style issues in comedilib.h
This resolves some issues with comedilib.h

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:57 -07:00
Mithlesh Thukral 0a85b6f0ab Staging: Comedi: Lindent changes to comdi driver in staging tree
Lindent changes to comdi driver in staging tree.
This patch is followed by the checkpatch.pl error fixes.
Did not make them part of this patch as the patch size is already huge.

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Bill Pemberton 1f6325d629 Staging: comedi: Remove comedi_krange typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:58 -07:00
Bill Pemberton 90035c0886 Staging: comedi: Remove comedi_insn typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:57 -07:00
Bill Pemberton ea6d0d4cab Staging: comedi: Remove comedi_cmd typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:57 -07:00
Bill Pemberton b50d88d080 Staging: comedi: Remove comedi_trig typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:57 -07:00
Bill Pemberton 790c55415a Staging: comedi: Remove lsampl_t and sampl_t typedefs
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:55 -07:00
Bill Pemberton 0b3fb27fa7 Staging: comedi: Remove comedi_t typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:55 -07:00
Greg Kroah-Hartman 02ebd471ea Staging: comedi: fix build error in comedilib.h
If anyone included this file, it would break the build.
This patch fixes the issue.

Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:17 -08:00
Greg Kroah-Hartman e0dcef71f6 Staging: comedi: fix up a lot of checkpatch.pl warnings
Only clean up some of the easier ones in the .h files

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:16 -08:00
David Schleef ed9eccbe89 Staging: add comedi core
This adds the Comedi core to the staging tree.
This is a data acquision infrastructure for Linux, providing a common
interface for these types of drivers.

Taken directly from the comedi git tree, with only minor tweaks
by Greg to get it to build properly within the kernel tree.

From: David Schleef <ds@schleef.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:16 -08:00