Commit Graph

322448 Commits

Author SHA1 Message Date
Justin P. Mattock 789d1aef17 staging: "vt6655" Fix typos in comments.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:59:12 -07:00
Toshiaki Yamane 736f5d0a09 staging/vme: Use pr_ printks in vme_pio2_core.c
The below checkpatch warnings was fixed,

-WARNING: Prefer pr_err(... to printk(KERN_ERR, ...

and added pr_fmt.

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:22:48 -07:00
Toshiaki Yamane 538a697ac8 Staging: vme: Fix a white space issue
The below checkpatch error was fixed.

-ERROR: trailing whitespace

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:22:47 -07:00
Tejun Heo eb1e40a4dd staging: nvec: use system_nrt_wq instead of custom one
There isn't much reason to use custom workqueue in nvec.  It can use
system_nrt_wq instead and cancel the two work items on removal.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:18:15 -07:00
Marc Dietrich 71d64ef2fa staging: nvec: do not depend on MACH_PAZ00
With the removal of board files on the tegra arch, drivers can now only
be instantiated via device tree. Consequently, all MACH_<board> config
variables are removed. As a temporary solution always enable building
for the (up to now) only supported paz00 board until nvec is full ported
to device tree.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:18:15 -07:00
Marc Dietrich 4b8bf03d7f staging: nvec: release sync write lock in error case
We forgot to release the sync write lock in case the async write
fails. Found by rpiloose on IRC.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:18:14 -07:00
Marc Dietrich 4344379f63 staging: nvec: fix clock setup
commit 30b68231 "ARM: tegra: clock: add i2c fast clock entry in clock table"
added a new clock for the i2c controllers, so clock requests are no longer
conclusive. Fix this by specifying "div-clk" explicitly.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:18:14 -07:00
Wei Yongjun 4f19b38f13 staging: wlags49_h2: use is_broadcast_ether_addr() instead of memcmp()
Using is_broadcast_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is broadcast
address.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:16:26 -07:00
Masanari Iida cb154c1895 staging: wlags49_h2: Fix typo in staging/wlags49_h2 driver
Correct spelling typo in staging/wlags49_h2

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:16:26 -07:00
Devendra Naga 3cf7c7aaee staging: wlagn49_h2: move open brace of if from below to beside of if statement
the opening brace of the if statement should be beside to it, not below to it.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:15:38 -07:00
Devendra Naga 4b9645b711 staging: wlags49_h2: remove return statements at the end of all void functions
this patch removes the return statement at the end of all void functions,
since the function returning void no need to have a return at the end of the
function.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:15:38 -07:00
Devendra Naga e4d653f3e2 staging: wlagn49_h2: fix the checkpatch warning about the space after the open paranthesis
the following fix is done in the wl_wds_netif_carrier_off function:

wl_netdev.c:1764: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1764: ERROR: space prohibited before that close parenthesis ')'
wl_netdev.c:1768: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1768: ERROR: space prohibited before that close parenthesis ')'
wl_netdev.c:1768: ERROR: space required before the open parenthesis '('
wl_netdev.c:1769: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1769: ERROR: space prohibited before that close parenthesis ')'
wl_netdev.c:1769: ERROR: space required before the open parenthesis '('
wl_netdev.c:1770: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1770: ERROR: space prohibited before that close parenthesis ')'
wl_netdev.c:1770: ERROR: space required before the open parenthesis '('
wl_netdev.c:1771: ERROR: space prohibited after that open parenthesis '('
wl_netdev.c:1771: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:15:38 -07:00
Devendra Naga a350d1fdfb staging: wlags49_h2: style fix in w1_wds_netif_carrier_off
whitespaces at beginning of the line are removed and are replaced
with the tabs

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:15:38 -07:00
Devendra Naga 44e8482c77 staging: wlags49_h2: remove unneded return in wl_wds_netif_carrier_off
the return is at the end of void function, which is not needed as this
function returns void.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:15:38 -07:00
Devendra Naga e31bbfcc44 staging: wlags49_h2: coding style fix at wl_wds_netif_carrier_off
no braces needed for single statement if block

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:15:38 -07:00
Wei Yongjun 0c925aa043 staging: ozwpan: remove pointless conditional before kfree_skb()
Remove pointless conditional before kfree_skb().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:12:13 -07:00
Masanari Iida ba07275faf staging: ozwpan: Fix typo in staging/ozwpan
Fix spelling typo in staging/ozwpan

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:12:13 -07:00
Jonathan Brett 0e4da5cbae Staging: asus_oled: Add suspend/resume callbacks
- Add simple suspend/resume PM callbacks to disable oled display on
  suspend and return to previous state on resume

Signed-off-by: Jonathan Brett <jonbrett.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:12:13 -07:00
Toshiaki Yamane 411c076a2e staging/rts_pstor: remove braces {} in rtsx_chip.c
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:31:53 -07:00
Toshiaki Yamane 8a16a5839a staging/rts_pstor: remove braces {} in rtsx_transport.c
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:28:02 -07:00
Toshiaki Yamane c0cdcb7ca8 staging/rts_pstor: remove braces {} in rtsx_card.c
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:28:01 -07:00
Alan Cox 0ff15d5416 staging: rts_pstor: Fix invalid check
As noted by David Binderman

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=46581
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:26:46 -07:00
Rob Clark 1e0fdfc208 staging: drm/omap: invert dimensions on crtc when rotated
If rotated 90 or 270, we need to invert the dimensions used by drm
core for calculating if the dimensions of an attached fb are correct.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:18:10 -07:00
Tejun Heo 4619cdbc6b staging: omapdrm: use alloc_ordered_workqueue() instead of UNBOUND w/ max_active = 1
This is an equivalent conversion and will ease scheduled removal of
WQ_NON_REENTRANT.

Only compile tested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:18:10 -07:00
Emil Goode d4eb23a98f staging: drm/omap: Add error handling
This patch adds fail checks for kmalloc and kzalloc calls
and also adds a error path that frees allocated pages by
introducing a call to _drm_gem_put_pages.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:18:10 -07:00
Greg Kroah-Hartman 79e3f02887 Second set of IIO rework and new drivers for the 3.7 cycle.
Firstly we have the second half of a series reworking support for
 the various sigma delta ADCs from Analog.  The first half was fixes
 that have already merged in the v3.6 cycle.  Other than some
 little cleanups this mainly consists of a unifying library module
 that the various drivers can then use.  Another new driver is
 using this undergoing revisions and the code reduction already
 seen from this is considerable.  A nice piece of work.
 
 Secondly we have a good number of tidying up patches from various
 sources doing things like adding include guards and removing
 unintended header ordering requirements.  Also a mass annotation
 of missing __devinit/exit.  Peter Meerwald has been getting around
 with cleanup of lis3l02dq, documentation fixes, white space clenaups
 and a small issue with my spelling ;)
 
 Thirdly we have some improvements to our kfifo usage that have
 been around for a while but are now suddenly in demand from a
 number of users.
 
 Forth we have some clk_prepare_enable and clk_prepare_disable
 cleanups.
 
 Fifth is the addition of i2c dacs to the ad5446 driver
 
 Finally we have some email address updates. I'll do the
 MAINTAINERS one separately.
 
 So a general mixed bag but nothing terribly controversial
 or 'exciting'.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQRQpqAAoJEFSFNJnE9BaIa7IQALon1R0vcjaiUOhOEUCeYu7H
 kS9RHPZ0Gq8H8Hl/7Opdn44PwbvduBrr0X/HcI7x02T3nVYTCk1udGBBIRRMJtdd
 N+YNXGSDunbvfpJ9G785439lJPuGBoA/QgBmiL1Tx3DQQTF66Yrh7sQguNNY31GP
 1+wRYp9ILhDVa4saWgCGW8K7acfoFJVYjSCeFTAACcNa5f6vUpO+yFHf92cWGNmk
 2odGtHJo5Kfcr8IzpHAH0twCUjNFKzEzNhkJRNV7KZnHpTO0+Q9lBGAExGNkGWFo
 NtG5tZ5NAX+YstDKGXAu80xb9wcmnvtif7aoqyKpZA2/AabHiNW6gLAOONdvdVrs
 9ljiHv6DKgJvf4rNCxufRgE5OD0BItGECJENiuFsTktsUePF2yMPrQZzocYB7hVu
 Wf3tEppWnRLw9OPuDqkj7Rna8WkVVo8U+xhnu80AM7gGpOkciHm7YyS8DkPfxQaW
 j2kGslJCvSoerEtoXfaPoKIybH2h0GrSKWKHXqJxaKsXOjNIwZNzm02UgdiuRlO3
 IHqJr9y31pwlgc83OSA6UK5jXXX4PPiyV7+sR1bBr1F9k3MG4wSzsDRXRI90h24G
 ruhiTkW6J+I+HjHSw8G6g2WJbC+oWHcQHpvKDexwNPsEWDzjb+zEdO1ArnBpp+Fb
 mAp4Qv3PaI0LyQP8Y1xZ
 =jZe0
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-v3.7b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-next

Second set of IIO rework and new drivers for the 3.7 cycle.

Firstly we have the second half of a series reworking support for
the various sigma delta ADCs from Analog.  The first half was fixes
that have already merged in the v3.6 cycle.  Other than some
little cleanups this mainly consists of a unifying library module
that the various drivers can then use.  Another new driver is
using this undergoing revisions and the code reduction already
seen from this is considerable.  A nice piece of work.

Secondly we have a good number of tidying up patches from various
sources doing things like adding include guards and removing
unintended header ordering requirements.  Also a mass annotation
of missing __devinit/exit.  Peter Meerwald has been getting around
with cleanup of lis3l02dq, documentation fixes, white space clenaups
and a small issue with my spelling ;)

Thirdly we have some improvements to our kfifo usage that have
been around for a while but are now suddenly in demand from a
number of users.

Forth we have some clk_prepare_enable and clk_prepare_disable
cleanups.

Fifth is the addition of i2c dacs to the ad5446 driver

Finally we have some email address updates. I'll do the
MAINTAINERS one separately.

So a general mixed bag but nothing terribly controversial
or 'exciting'.
2012-09-04 12:12:05 -07:00
Ian Abbott c50141bf50 staging: comedi: das08: abbreviate IS_ENABLED()
The `IS_ENABLED(CONFIG_COMEDI_DAS08_ISA)` and
`IS_ENABLED(CONFIG_COMEDI_DAS08_PCI)` macro calls are a bit long-winded.
Define a couple of macros `DO_ISA` and `DO_PCI` as abbreviations for
them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:43 -07:00
Ian Abbott 9bfdd96262 staging: comedi: das08: Add helper functions to check bus type
Add inline helper function `is_isa_board(board)` to check if the driver
supports ISA boards and this is an ISA board, and `is_pci_board(board)`
to check if the driver supports PCI boards and this is a PCI board.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott 7c2b231520 staging: comedi: das08: Don't report iobase for PCI device
Don't bother reporting the I/O base address for PCI devices as it's not
very interesting.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott c6e37f4f22 staging: comedi: das08: absorb das08_pci_attach_common()
Absorb `das08_pci_attach_common()` into `das08_attach_pci()` since
that's the only place it was called from.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott b1128a6bda staging: comedi: das08: Remove manual configuration of PCI boards
Remove the code that allows PCI boards to be manually attached by the
`COMEDI_DEVCONFIG` ioctl (or the `comedi_config` application).
Supported PCI boards will be attached automatically at probe time via
`comedi_pci_auto_config()` and the `attach_pci` hook in the `struct
comedi_driver`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott f0ba1d6e19 staging: comedi: das08: Support read-back of AO subdevice
Stash the last value written to each AO channel in private data and
support the INSN_READ instruction to read it back.  Don't bother setting
the SDF_READABLE subdevice flag though as the hardware isn't really
readable - we're just faking it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott 8432eb35a9 staging: comedi: das08: Initialize AO channels
Initialize the AO subdevice channels to mid-range data value so they are
in a known state.  This allows us to support reading back the current
value in a later patch.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott 3b85aa6378 staging: comedi: das08: Rearrange AO write functions
Combine the AO write functions for 'JR' boards and other boards into a
single function and factor out the data writing from the comedi
instruction handling so it can be called from elsewhere in a later
patch.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott 624fcb2661 staging: comedi: das08: Unmark some __maybe_unused functions
The `das08jr_di_rbits()`, `das08jr_do_wbits()`, `das08jr_ao_winsn()` and
`das08ao_ao_winsn()` static functions are currently marked as
`__maybe_unused` as they were formerly only referred to by possibly
conditionally compiled out code.  This is no longer the case (they are
referred to by `das08_common_attach()`) so their `__maybe_unused` tags
can be removed.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott f8165b7d49 staging: comedi: das08: No need to check insn->n for counter config
There is no need to check the value of `insn->n` is correct in
`das08_counter_config()` as the core comedi module will have already
checked it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott 4d31848a73 staging: comedi: das08: Remove i8254_iobase from private data
The I/O port base address for the counter subdevice doesn't need to be
stored in the private data.  It can be calculated on the fly using the
offset in the static board data.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:42 -07:00
Ian Abbott fb8ff5d501 staging: comedi: das08: Remove pci_iobase from private data
The `pci_iobase` I/O port registers from PCI BAR 1 are never accessed,
so don't bother storing this base address in `struct
das08_private_struct`.

The `pci_iobase` member was checked for non-zero in `das08_detach()` but
we can check `dev->iobase` is non-zero instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:41 -07:00
Ian Abbott 9fcd4853f7 staging: comedi: das08: Remove dead code
Remove the code that has been in `#if 0` for a long time.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:41 -07:00
Ian Abbott 383ecb88c1 staging: comedi: das08,das08_cs: Move das08_cs_boards[]
Move `das08_cs_boards[]` from "das08.c" to "das08_cs.c" and make it
static const.  It no longer refers to anything in "das08.c" and no
longer needs to be exported.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:41 -07:00
Ian Abbott 5bacadc84b staging: comedi: das08: Avoid zero initializers in board structure
Don't bother initializing the `i8255_offset` and/or `i8254_offset`
members of `struct das08_board_struct` in `das08_boards[]` and
`das08_cs_boards[]` if they are zero as they are implicitly initialized
to zero anyway, and zero means the corresponding subdevices are absent.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:41 -07:00
Ian Abbott dd2ac5d4b7 staging: comedi: das08: Remove function pointers from board structure
Remove the `ai`, `ao`, `di` and `do` pointers from `struct
das08_board_struct`.  These were initialized in `das08_boards[]` and
`das08_cs_boards[]` to point to comedi instruction handler functions for
the subdevice, but there are only two sets of functions depending on
whether the `is_jr` member is true or false, and some of the functions
will be NULL if the corresponding `ai_nbits`, `ao_nbits`, `di_nchan` and
`do_nchan` members are zero.  Determine which handler functions to use
in das08_common_attach().

One element of `das08_boards[]` had `ao` set to NULL and `ao_nbits` set
to 12.  Set `ao_nbits` to 0 in this case to let das08_common_attach()
know this board has no AO subdevice.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:41 -07:00
Ian Abbott 1effe42da1 staging: comedi: das08: Mark 'JR' boards in board data
Add a bool member `is_jr` to `struct das08_board_struct` and initialize
it to `true` in those elements of `das08_boards[]` corresponding to the
'JR' board models.  This will be used by a following patch that removes
the `ai`, `ao`, `di` and `do` members from `struct das08_board_struct`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:41 -07:00
Ian Abbott ffd76b327a staging: comedi: das08: Add number of DI channels in board structure
Add member `di_nchan` to `struct das08_board_struct` to set the number
of digital input channels explicitly.  Currently, the code determines
the number of channels to 3 or 8 depending on what function the `di`
member points to, which is not very elegant.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:41 -07:00
Ian Abbott 4865a47fc3 staging: comedi: das08: Remove pc104 bustype value
Remove the `pc104` value from `enum das08_bustype` and replace
occurrences of it in the code and data with the `isa` value.  The code
treats them as equivalent anyway with expressions like
`(thisboard->bustype == isa || thisboard->bustype == pc104)`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 12:00:41 -07:00
Greg Kroah-Hartman c283cf384a Merge branch 'staging-linus' into staging-next
Pick up 2 more comedi patches from Ian that are needed for other
changes in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 11:58:26 -07:00
Ian Abbott 61ed59ed09 staging: comedi: das08: Correct AO output for das08jr-16-ao
Don't zero out bits 15..12 of the data value in `das08jr_ao_winsn()` as
that knobbles the upper three-quarters of the output range for the
'das08jr-16-ao' board.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 11:55:38 -07:00
Ian Abbott e6391a1828 staging: comedi: das08: Correct AI encoding for das08jr-16-ao
The element of `das08_boards[]` for the 'das08jr-16-ao' board has the
`ai_encoding` member set to `das08_encode12`.  It should be set to
`das08_encode16` same as the 'das08jr/16' board.  After all, this board
has 16-bit AI resolution.

The description of the A/D LSB register at offset 0 seems incorrect in
the user manual "cio-das08jr-16-ao.pdf" as it implies that the AI
resolution is only 12 bits.  The diagrams of the A/D LSB and MSB
registers show 15 data bits and a sign bit, which matches what the
software expects for the `das08_encode16` AI encoding method.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 11:55:38 -07:00
Ian Abbott 0edc7d8381 staging: comedi: serial2002: Set range for digital inputs and outputs
I got an update from the original author of this driver (Anders
Blomdell) to set the range table for digital input and digital output
subdevices.  Apply it.

Cc: Anders Blomdell <anders.blomdell@control.lth.se>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 11:52:55 -07:00
Greg Kroah-Hartman 4d480eface Merge branch 'staging-linus' into staging-next
This gets the 6 staging comedi patches that are needed for further
patches that Ian sent.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 11:46:38 -07:00