Elena Oat [Mon, 3 Mar 2014 19:47:18 +0000 (21:47 +0200)]
Staging: rtl8188eu: Fix warning of no space before tabs.
This patch fixes the warning of "Please, no space before tab" produced
by checkpatch.pl. The modified file: rtw_cmd.c.
Signed-off-by: Elena Oat <oat.elena@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Oat [Mon, 3 Mar 2014 07:44:19 +0000 (09:44 +0200)]
Staging: rtl8188eu: Fix the warning of space before parenthesis.
This patch fixes the warning of "space prohibited between function name
and open parenthesis '('". The modified file: rtw_cmd.c. The patch also
removes some strange spaces that were generated probably by some editor.
Signed-off-by: Elena Oat <oat.elena@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Fri, 7 Mar 2014 22:23:34 +0000 (14:23 -0800)]
Merge branch 'imx-drm-staging' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into staging-next
Russell writes:
This set of changes reorganises imx-drm's DT bindings by re-using the OF
graph parsing code which was located in drivers/media, removing the
temporary bindings.
The result is that more TODO entries are now removed. While we're not
quite done with this yet as there's a few straggling updates to imx-ldb
to come, but leaving these out is not detrimental at this point in time
- they are more an enhancement.
However, this pull has the additional complication that we're sharing
seven commits with Mauro's V4L git tree, which move the OF graph parsing
code out of drivers/media into drivers/of. Philipp's imx-drm changes
depend on these and my previously committed round of imx-drm commits.
Hence, the diffstat below is from a test merge with your tree head
(
17b02809cfa7).
Mauro merged those seven commits earlier today as a git pull, so both
trees will be sharing exactly the same commit IDs.
I've given these changes a spin here on both my Hummingboard and Cubox-i4
(one is iMX6Solo, the other is iMX6Quad based), which includes Xorg using
the DRM device directly, and I find nothing wrong.
The diffstat does look a little scarey - this is because we're having to
update the ARM DT files along with this change, and obviously the
dependency on the OF graph parsing code.
bahar sahin [Mon, 3 Mar 2014 01:56:03 +0000 (03:56 +0200)]
Staging: octeon: Fix coding style
This patch removes unnecessary braces to fix a checkpatch.pl warning.
Signed-off-by: bahar sahin <baharxf@gmail.com>
Reviewed-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Mon, 3 Mar 2014 01:03:54 +0000 (06:33 +0530)]
staging:octeon: Replace pr_warning by preferred pr_warn
This patch fixes the checkpatch.pl warning :
Prefer pr_warn(... to pr_warning(...
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Mon, 3 Mar 2014 01:00:46 +0000 (06:30 +0530)]
staging:octeon: remove space after opening parentheses
This patch fixes the checkpatch warning : space prohibited after
that open parenthesis '('.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ebru Akagunduz [Thu, 6 Mar 2014 17:42:16 +0000 (19:42 +0200)]
Staging:wlan-ng: no space before tabs in p80211mgmt.h
Fix checkpatch.pl issues with no space before tabs
in p80211mgmt.h
Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Wed, 5 Mar 2014 15:40:52 +0000 (21:10 +0530)]
staging:wlan-ng:Fix sparse warning cast to restricted __le16
This patch fixes the following sparse warnings:
drivers/staging/wlan-ng/hfa384x_usb.c:3582:14: warning: cast to
restricted __le16
drivers/staging/wlan-ng/hfa384x_usb.c:3584:19: warning: cast to
restricted __le16
by changing the annotations in the struct declaration.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tugce Sirin [Mon, 3 Mar 2014 00:39:45 +0000 (02:39 +0200)]
Staging: wlan-ng: Fix Sparse warning should it be static?
This patch fixes following Sparse warning should it be static? in
staging/wlan-ng.
Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Monam Agarwal [Sun, 2 Mar 2014 17:16:15 +0000 (22:46 +0530)]
Staging:
ced1401: Fix removed unused structs
This patch removes an unused struct while at the same time removing checkpatch.pl warning
WARNING: Avoid use of typedef
Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Monam Agarwal [Sun, 2 Mar 2014 15:30:46 +0000 (21:00 +0530)]
Staging:
ced1401: Fix do not add new typedefs
This patch fixes the following checkpatch.pl issues in ced_ioctl.h
WARNING: do not add new typedefs
Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Monam Agarwal [Sat, 1 Mar 2014 22:47:01 +0000 (04:17 +0530)]
Staging: gs_gpgaboot: Fix Bad function definition in io.c
This patch fixes the following checkpatch.pl issues in io.c
WARNING: Bad function definition
Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Monam Agarwal [Fri, 7 Mar 2014 11:33:08 +0000 (17:03 +0530)]
Staging: dgnc: Fix struct file_operations should normally be const
This patch fixes following checkpatch.pl warning:
WARNING:struct file_operations should normally be const
Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Mon, 3 Mar 2014 21:05:46 +0000 (23:05 +0200)]
staging: sbe-2t3e3: remove t3e3_resp_t typedef
Kernel coding style does not recommend using typedefs for structures, so
remove the t3e3_resp_t typedef.
Fix the following checkpatch warning:
drivers/staging/sbe-2t3e3/ctrl.h:123: WARNING: do not add new typedefs
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Mon, 3 Mar 2014 21:05:45 +0000 (23:05 +0200)]
staging: sbe-2t3e3: remove t3e3_stats_t typedef
Kernel coding style does not recommend using typedefs for structures, so
remove the t3e3_stats_t typedef.
Fix the following checkpatch warning:
drivers/staging/sbe-2t3e3/ctrl.h:107: WARNING: do not add new typedefs
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Mon, 3 Mar 2014 21:05:44 +0000 (23:05 +0200)]
staging: sbe-2t3e3: remove t3e3_param_t typedef
Kernel coding style does not recommend using typedefs for structures, so
remove the t3e3_param_t typedef.
Fix the following checkpatch warning:
drivers/staging/sbe-2t3e3/ctrl.h:87: WARNING: do not add new typedefs
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Mon, 3 Mar 2014 21:05:43 +0000 (23:05 +0200)]
staging: sbe-2t3e3: remove t3e3_tx_desc_t typedef
Kernel coding style does not recommend using typedefs for structures, so
remove the t3e3_tx_desc_t typedef.
Fix the following checkpatch warning:
drivers/staging/sbe-2t3e3/2t3e3.h:651: WARNING: do not add new typedefs
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kristina Martšenko [Mon, 3 Mar 2014 21:05:42 +0000 (23:05 +0200)]
staging: sbe-2t3e3: remove t3e3_rx_desc_t typedef
Kernel coding style does not recommend using typedefs for structures, so
remove the t3e3_rx_desc_t typedef.
Fix the following checkpatch warning:
drivers/staging/sbe-2t3e3/2t3e3.h:616: WARNING: do not add new typedefs
Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Oat [Sun, 2 Mar 2014 10:46:31 +0000 (12:46 +0200)]
Staging: sbe-2t3e3: Fix the error of (foo*) should be (foo *).
This patch fixes an error in 2t3e3.h that (foo*) should be (foo *).
Signed-off-by: Elena Oat <oat.elena@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Sat, 1 Mar 2014 21:38:46 +0000 (03:08 +0530)]
staging:sbe-2t3e3: remove assignment in if condition
This patch removes the assignment in an if condition to do away with
the checkpatch warning :'do not use assignment in if condition'.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Sat, 1 Mar 2014 21:22:20 +0000 (02:52 +0530)]
Staging:cxt1e1:musycc:remove assignment in if condition
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Tue, 4 Mar 2014 21:21:09 +0000 (02:51 +0530)]
staging: silicom : remove assignment in if condition
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ebru Akagunduz [Wed, 5 Mar 2014 17:15:30 +0000 (19:15 +0200)]
Staging:media: Fix Sparse warnings incorrect type in lirc_sasem.c
This patch fixes following sparse warning in dgap.c
drivers/staging/media/lirc/lirc_sasem.c:392:32: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/media/lirc/lirc_sasem.c:392:32: expected void const [noderef] <asn:1>*<noident>
drivers/staging/media/lirc/lirc_sasem.c:392:32: got char const *buf
drivers/staging/media/lirc/lirc_sasem.c:123:28: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/staging/media/lirc/lirc_sasem.c:123:28: expected int ( *write )( ... )
drivers/staging/media/lirc/lirc_sasem.c:123:28: got int ( static [toplevel] *<noident> )( ... )
Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ebru Akagunduz [Wed, 5 Mar 2014 17:15:29 +0000 (19:15 +0200)]
Staging:media: Fix Sparse Warnings "symbol was not declared. Should it be static?"
This patch fixes the Sparse Warnings "symbol was
not declared. Should it be static?"
Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Monam Agarwal [Sat, 1 Mar 2014 22:40:04 +0000 (04:10 +0530)]
Staging: media/cxd2099: Fix line length over 80 characters
This patch fixes the following checkpatch.pl issues in cxd2099.c
WARNING: line length over 80 characters
Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Sat, 1 Mar 2014 20:48:38 +0000 (02:18 +0530)]
staging:media: remove assignment in if condition
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Zabel [Wed, 5 Mar 2014 09:21:02 +0000 (10:21 +0100)]
staging: imx-drm: Update TODO
The device tree bindings are updated regardless of the common display
framework and in the meantime the HDMI driver was included.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:21:01 +0000 (10:21 +0100)]
ARM: dts: imx6qdl: Add IPU DI ports and endpoints, move imx-drm node to dtsi
This patch connects IPU and display encoder (HDMI, LVDS, MIPI)
device tree nodes, as well as parallel displays on the DISP0
and DISP1 outputs, using the OF graph bindings described in
Documentation/devicetree/bindings/media/video-interfaces.txt
The IPU ports correspond to the two display interfaces. The
order of endpoints in the ports is arbitrary.
Each encoder with an associated input multiplexer has multiple
input ports in the device tree. The order and reg property of
the ports must correspond to the multiplexer input order.
Since the imx-drm node now only needs to contain links to the
display interfaces, it can be moved to the SoC dtsi level. At
the board level, only connections between the display interface
ports and encoders or panels have to be added.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:21:00 +0000 (10:21 +0100)]
ARM: dts: imx53: Add IPU DI ports and endpoints, move imx-drm node to dtsi
This patch connects IPU and display encoder (VGA, LVDS)
device tree nodes, as well as parallel displays on the DISP0
and DISP1 outputs, using the OF graph bindings described in
Documentation/devicetree/bindings/media/video-interfaces.txt
The IPU ports correspond to the two display interfaces. The
order of endpoints in the ports is arbitrary.
Since the imx-drm node now only needs to contain links to the
display interfaces, it can be moved to the SoC dtsi level. At
the board level, only connections between the display interface
ports and encoders or panels have to be added.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:20:59 +0000 (10:20 +0100)]
ARM: dts: imx51: Add IPU ports and endpoints, move imx-drm node to dtsi
This patch connects IPU and and parallel display device tree
nodes using the OF graph bindings described in
Documentation/devicetree/bindings/media/video-interfaces.txt
The IPU ports correspond to the two display interfaces. The
order of endpoints in the ports is arbitrary.
Since the imx-drm node now only needs to contain links to the
display interfaces, it can be moved to the SoC dtsi level. At
the board level, only connections between the display interface
ports and panels have to be added.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:20:58 +0000 (10:20 +0100)]
ARM: dts: imx53-mba53: Fix TVE DDC I2C bus property
This patch fixes the Television Encoder node's DDC I2C bus property to
use the common property name of 'ddc-i2c-bus' instead of just 'ddc'.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:20:57 +0000 (10:20 +0100)]
imx-drm: imx-tve: Fix DDC I2C bus property
This patch fixes the TV Encoder DDC I2C bus property to use the common
'ddc-i2c-bus' property name instead of 'ddc'.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:20:56 +0000 (10:20 +0100)]
imx-drm: imx-hdmi: Fix DDC I2C bus property
This patch fixes the DDC I2C bus property to use the common 'ddc-i2c-bus'
property name instead of 'ddc'. This is already documented in
Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:20:55 +0000 (10:20 +0100)]
staging: imx-drm: Document imx-hdmi device tree bindings
This patch adds device tree binding documentation for the HDMI transmitter
on i.MX6.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:20:54 +0000 (10:20 +0100)]
staging: imx-drm: Document updated imx-drm device tree bindings
This patch updates the device tree binding documentation for i.MX IPU/display
nodes using the OF graph bindings documented in
Documentation/devicetree/bindings/media/video-interfaces.txt.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:20:53 +0000 (10:20 +0100)]
staging: imx-drm-core: use of_graph_parse_endpoint
Using of_graph_parse_endpoint recovers the port id from an endpoint device
tree node. This just replaces an open coded read of the "reg" property.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 5 Mar 2014 09:20:52 +0000 (10:20 +0100)]
staging: imx-drm-core: Use OF graph to find components and connections between encoder and crtcs
This patch adds support to find the involved components connected to
the IPU display interface ports using the OF graph bindings documented
in Documentation/devicetree/bindings/media/video-interfaces.txt.
It makes use of the of_graph (formerly v4l2_of) parsing helpers and
thus depends on the patch that moves those out to drivers/of.
Each display interface needs to have an associated port node in the
device tree. We can associate this node with the crtc platform device
and use it to find the crtc corresponding to a given port node instead
of using a combination of parent device node and id number, as before.
Explicitly converting the void* cookie to the port device tree node
allows to get rid of the ipu_id and di_id fields. The multiplexer
setting on i.MX6 now can be obtained from the port id (reg property)
in the device tree.
The imx-drm node now needs a ports property that contains phandles
to each of the IPU display interface port nodes. From there, all
attached encoders are scanned and enabled encoders are added to a
waiting list.
The bind order makes sure that once all components are probed, crtcs
are bound before encoders, so that imx_drm_encoder_parse_of can be
called from the encoder bind callbacks.
For parsing the OF graph, temporary copies of the V4L2 OF graph
helpers are used, that can be removed again once those are available
at a generic place.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Fri, 7 Mar 2014 16:17:06 +0000 (16:17 +0000)]
Merge branch 'topic/of-graph' of git://git.pengutronix.de/git/pza/linux into imx-drm-staging
Merge the of-graph dependency for imx-drm. These will be the basis of
the new DT bindings for imx-drm.
Philipp Zabel [Fri, 7 Mar 2014 14:49:54 +0000 (15:49 +0100)]
of: Fix of_graph_parse_endpoint stub for !CONFIG_OF builds
This patch fixes the following build error:
In file included from drivers/media/i2c/adv7343.c:29:0:
>> include/linux/of_graph.h:41:1: error: expected identifier or '(' before '{' token
{
^
include/linux/of_graph.h:39:19: warning: 'of_graph_parse_endpoint' declared 'static' but never defined [-Wunused-function]
static inline int of_graph_parse_endpoint(const struct device_node *node,
^
vim +41 include/linux/of_graph.h
35 const struct device_node *node);
36 struct device_node *of_graph_get_remote_port(const struct device_node *node);
37 #else
38
39 static inline int of_graph_parse_endpoint(const struct device_node *node,
40 struct of_endpoint *endpoint);
> 41 {
42 return -ENOSYS;
43 }
44
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Himangi Saraogi [Thu, 6 Mar 2014 22:37:18 +0000 (04:07 +0530)]
staging:lustre: Fix sparse warning of incorrect argument type
This patch fixes the following sparse warning :
drivers/staging/lustre/lustre/lmv/lproc_lmv.c:99:35: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/lustre/lustre/lmv/lproc_lmv.c:99:35: expected void const [noderef] <asn:1>*from
drivers/staging/lustre/lustre/lmv/lproc_lmv.c:99:35: got char const *buffer
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Thu, 6 Mar 2014 22:39:23 +0000 (04:09 +0530)]
staging:lustre: Fix sparse warnings of Using plain integer as NULL pointer
This patch fixes the following sparse warnings:
drivers/staging/lustre/lustre/lov/lov_obd.c:342:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:647:44: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:771:46: warning: Using plain integer as NULL pointer
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Sat, 1 Mar 2014 21:31:17 +0000 (03:01 +0530)]
staging: lustre: remove assignment in if condition
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Monam Agarwal [Sat, 1 Mar 2014 11:33:33 +0000 (17:03 +0530)]
Staging : lustre/lustre/lov: Fix Statements terminations use 1 semicolon in lov_ea.c
This patch fixes the following checkpatch.pl issues in lov_ea.c
Warning: Statements terminations use 1 semicolon in lov_ea.c
Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John de la Garza [Thu, 6 Mar 2014 23:51:59 +0000 (15:51 -0800)]
usbip:usbip_common.c: check return value of sscanf
Added code to check return value of sscanf.
Signed-off-by: John de la Garza <john@jjdev.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John de la Garza [Fri, 7 Mar 2014 00:30:36 +0000 (16:30 -0800)]
comedi:drivers:poc.c: unnecessary space before function pointer arguments
Removed unnecessary space before function pointer arguments.
Signed-off-by: John de la Garza <john@jjdev.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:27 +0000 (11:30 -0700)]
staging: comedi: pcl818: clarify pcl818_reset()
Like done in the pcl812 driver, use the boardinfo to determine what
should be reset.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:26 +0000 (11:30 -0700)]
staging: comedi: pcl812: clarify pcl812_reset()
Instead of using the 'board_type' and the switch, use the boardinfo
to determine what should be reset.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:25 +0000 (11:30 -0700)]
staging: comedi: pcl818: tidy up the remaining register defines
For aesthetics, rename the timer/counter enable request register
and define its bits.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:24 +0000 (11:30 -0700)]
staging: comedi: pcl816: tidy up the remaining register defines
For aesthetics, rename the clear INT request register.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:23 +0000 (11:30 -0700)]
staging: comedi: pcl812: tidy up the remaining register defines
The PCL812_CNTENABLE define is not used in this driver. Remove it.
For aesthetics, rename the software trigger register.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:22 +0000 (11:30 -0700)]
staging: comedi: pcl818: cleanup ai_cmd()
Rename this function so it has namespace associated with the driver.
The cmd->scan_begin_src is always TRIG_FOLLOW and the only valid
cmd->convert_src is TRIG_TIMER or TRIG_EXT so pcl818_ai_cmd_mode()
is always called with a 'mode' of 1 or 3. The 'mode' actually indicates
the trigger source.
Absorb pcl818_ai_cmd_mode() into this function and simplify the code.
This also removes the need for a forward declaration.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:21 +0000 (11:30 -0700)]
staging: comedi: pcl818: absorb pcl818_ai_mode13dma_int()
Absorb this function into pcl818_ai_cmd_mode() and simplify the code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:20 +0000 (11:30 -0700)]
staging: comedi: pcl818: define the mode register bits
Define the bits in the register to remove the magic values.
Tidy up pcl818_ai_cancel(). The 0x73 mask of the value read from
the control register will disable dma and interrupts but it does
not change the trigger mode. So the software trigger following it
might not work.
Just disable the trigger and clear any pending end-of-conversion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:19 +0000 (11:30 -0700)]
staging: comedi: pcl816: define the mode register bits
Define the bits in the register to remove the magic values.
Fix pcl816_ai_cancel(). The 0x73 mask of the value read from the control
register will not stop the A/D as indicated by the comment. This would just
clear the DS1, POE, and EXT bits which would only disable the external
trigger. Setting the control register to '0' would then stop the A/D which
means the software trigger following it would not work. Just disable the
trigger and clear any pending end-of-conversion.
Make sure the A/D trigger is disabled at the end of the (*insn_read).
Remove a couple unnecessary devpriv->dev checks. The pcl816_ai_cmd() and
pcl816_ai_poll() functions are only hooked up when devpriv->dma is valid.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:18 +0000 (11:30 -0700)]
staging: comedi: pcl812: define the mode register bits
For aesthetics, rename this register.
Define the bits in the register to remove the magic values.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:17 +0000 (11:30 -0700)]
staging: comedi: pcl818: cleanup setup_channel_list()
Move this function to remove the need for the forward declaration. Rename it
so it has namespace associated with the driver. Remove the unnecessary
comedi_subdevice parameter from the function.
The hardware has per-channel programmable gain. This function first sets the
range for each channel then sets the mux register to automatically scan the
channels.
The use of 'muxonechan' when programming the ranges is incorrect. Only the low
4-bits are supposed to be set when programming the ranges.
Introduce a couple helper functions to set the range for a channel and to set
the first/last channels to scan.
Tidy up the range and mux register defines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:16 +0000 (11:30 -0700)]
staging: comedi: pcl816: cleanup setup_channel_list()
Move this function to remove the need for the forward declaration. Rename it
so it has namespace associated with the driver. Remove the unnecessary
comedi_subdevice parameter from the function.
The hardware has per-channel programmable gain. This function first sets the
range for each channel then sets the mux register to automatically scan the
channels.
Remove the need for the 'ai_act_chanlist' member in the private data. It is
only used to set the first/last channel to scan.
Introduce a couple helper functions to set the range for a channel and to set
the first/last channels to scan.
Tidy up the range and mux register defines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:15 +0000 (11:30 -0700)]
staging: comedi: pcl812: cleanup setup_range_channel()
Move this function to remove the need for the forward declaration. Rename it
so it has namespace associated with the driver. Remove the unnecessary
comedi_subdevice parameter from the function.
The hardware does not support analog input channel scanning so the mux and
range need to be set before each (*insn_read) and when advancing to the next
channel in an async command. Instead of storing the last chan/range in the
private data just store the chanspec to determine if the mux and range need
to be changed.
Refactor pcl812_reset() a bit so we can use the helper function to set the
mux and range.
Define the bits in the mux register to remove the magic values.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:14 +0000 (11:30 -0700)]
staging: comedi: pcl812: define the status register bits
Define the bits in the status register.
Writing any value to the status register clears any pending interrupt.
For aesthetics, rename the status register and remove the "clrint"
register.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:13 +0000 (11:30 -0700)]
staging: comedi: pcl816: define the status register bits
Define the bits in the status register.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:12 +0000 (11:30 -0700)]
staging: comedi: pcl818: define the status register bits
Define the bits in the status register and remove the magic values.
Writing any value to the status register clears any pending interrupt.
For aesthetics, rename the status register and remove the "clrint"
register.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:11 +0000 (11:30 -0700)]
staging: comedi: pcl818: tidy up analog input registers
For aesthetics, rename the analog input register defines and convert
the offsets to hex.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:10 +0000 (11:30 -0700)]
staging: comedi: pcl816: tidy up analog input registers
For aesthetics, rename the analog input register defines and convert
the offsets to hex.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:09 +0000 (11:30 -0700)]
staging: comedi: pcl812: tidy up analog input registers
For aesthetics, rename the analog input register defines and convert
the offsets to hex.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:08 +0000 (11:30 -0700)]
staging: comedi: pcl812: introduce pcl812_ai_soft_trig()
Introduce a helper function to start a software triggered analog input
conversion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:07 +0000 (11:30 -0700)]
staging: comedi: pcl816: introduce pcl816_ai_soft_trig()
Introduce a helper function to start a software triggered analog input
conversion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:06 +0000 (11:30 -0700)]
staging: comedi: pcl818: introduce pcl818_ai_soft_trig()
Introduce a helper function to start a software triggered analog input
conversion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:05 +0000 (11:30 -0700)]
staging: comedi: pcl818: introduce pcl818_ai_clear_eoc()
Introduce a helper function to clear the end-of-conversion flag.
This flag is set when an analog input conversion is finished and the
hardware generates an interrupt request. Writing any value to the
register resets the flag and re-enables the interrupt.
Remove the clearing of the flag in pcl818_handle_eoc(). The interrupt
function will handle clearing the flag.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:04 +0000 (11:30 -0700)]
staging: comedi: pcl816: introduce pcl816_ai_clear_eoc()
Introduce a helper function to clear the end-of-conversion flag.
This flag is set when an analog input conversion is finished and the
hardware generates an interrupt request. Writing any value to the
register resets the flag and re-enables the interrupt.
Move the call in pcl816_ai_cancel() so that the flag is reset after
stopping the A/D.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:03 +0000 (11:30 -0700)]
staging: comedi: pcl812: introduce pcl812_ai_clear_eoc()
Introduce a helper function to clear the end-of-conversion flag.
This flag is set when an analog input conversion is finished and the
hardware generates an interrupt request. Writing any value to the
register resets the flag and re-enables the interrupt.
Remove a redundant call in pcl812_ai_cancel().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:02 +0000 (11:30 -0700)]
staging: comedi: pcl812: tidy up the analog input (*insn_read)
For aesthetics, move this function out of the async command support
code.
For safety, the INT request (end-of-conversion flag) should be cleared
before doing each conversion and after the final data sample is read.
The driver currently does not do this.
Refactor the function a bit so it's more like the pcl818 and pcl816
drivers and use common code to clear the flag for a timeout and after
the last sample.
Do a bit of other tidying up during the move.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:01 +0000 (11:30 -0700)]
staging: comedi: pcl816: tidy up the analog input (*insn_read)
For aesthetics, move this function out of the async command support
code.
For safety, the INT request (end-of-conversion flag) should be cleared
before doing each conversion and after the final data sample is read.
This driver does that but it's a bit awkward with the initial clear being
outside the for loop that reads the samples.
Refactor the function a bit so it's more like the pcl818 driver and we
can use common code to clear the flag for a timeout and after the last
sample.
Do a bit of other tidying up during the move.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:30:00 +0000 (11:30 -0700)]
staging: comedi: pcl818: tidy up the analog input (*insn_read)
For aesthetics, move this function out of the async command support
code.
For safety, the INT request (end-of-conversion flag) should be cleared
before doing each conversion and after the final data sample is read.
This driver already clears the flag before starting a conversion but it
does not clear the flag after the final sample.
Refactor the function a bit so that the flag is cleared for a conversion
timeout and after the last sample.
Do a bit of other tidying up during the move.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:59 +0000 (11:29 -0700)]
staging: comedi: pcl818: tidy up the analog output subdevice
For aesthetics, tidy up the analog output subdevice code.
Change the regsiter map defines to simplify the code.
Move the analog subdevice support functions out of the analog input
support functions. Tidy them up a bit during the move.
Reverse the logic of the subdevice init and add some whitespace.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:58 +0000 (11:29 -0700)]
staging: comedi: pcl812: tidy up the analog output subdevice
For aesthetics, tidy up the analog output subdevice code.
Change the regsiter map defines to simplify the code.
Move the analog subdevice support functions out of the analog input
support functions. Tidy them up a bit during the move.
Add some whitespace to the subdevice init.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:57 +0000 (11:29 -0700)]
staging: comedi: pcl816: move pcl816_reset()
For aesthetics, move this function to follow the pcl812 and pcl818 drivers
better.
Remove the commented out cut-and-paste code from the pcl818 driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:56 +0000 (11:29 -0700)]
staging: comedi: pcl818: tidy up the digital subdevices
For aesthetics, tidy up the digtial subdevice code.
Rename the register map defines for the digital input and output ports.
Move the two digital subdevice (*insn_bits) functions out of the analog
support functions. Tidy them up a bit during the move.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:55 +0000 (11:29 -0700)]
staging: comedi: pcl816: add support for digital subdevices
The PCL-816 boards have 16 digital inputs and 16 digtial outputs. Add the
subdevice support for these channels.
Allocate additional subdevice space to the analog outputs. This code is
not currently in the driver so mark the subdevice as COMEDI_SUBD_UNUSED.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:54 +0000 (11:29 -0700)]
staging: comedi: pcl812: tidy up the digital subdevices
For aesthetics, tidy up the digtial subdevice code.
rename the register map defines for the digital input and output ports.
Move the two digital subdevice (*insn_bits) functions out of the analog
support functions. Tidy them up a bit during the move.
Add some whitespace to the subdevice init.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:53 +0000 (11:29 -0700)]
staging: comedi: pcl818: consolidate the common interrupt code
The DMA, FIFO, and EOC interrupt handler functions, that are called by
the _real_ interrupt function, always return IRQ_HANDLED. Change the
return type for these functions to void and move the final return to
the real interrupt function.
Change the parameters to the handler functions to the comedi_device and
comedi_subdevice pointers.
At some point in the handler functions the interrupt request is cleared.
Move this to the real interrupt function.
Also at some point in the handlers, comedi_event() is called to pass any
events to the comedi subsystem. Move this to the real interrupt function
also.
For aesthetics, and to clarify the code, rename the interrupt function and
the handler functions.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:52 +0000 (11:29 -0700)]
staging: comedi: pcl816: consolidate the interrupt code
This driver only supports interrupt driven DMA transfers for async
command support. Absorb the interrupt_pcl816_ai_mode13_dma() helper
into the interrupt handler to clarify the code.
At some point during the interrupt, comedi_event() is called to pass
any events to the comedi subsystem. Move this to the interrupt handler.
Add a comedi_event() call to pcl816_ai_poll() due to the removal of
the call from transfer_from_dma_buf().
For aesthetics, rename the interrupt function so it has namespace
associated with the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:51 +0000 (11:29 -0700)]
staging: comedi: pcl812: consolidate the common interrupt code
The DMA and EOC interrupt handler functions, that are called by the
_real_ interrupt function, always return IRQ_HANDLED. Change the
return type for these functions to void and move the final return to
the real interrupt function.
Change the parameters to the handler functions to the comedi_device and
comedi_subdevice pointers.
At some point in the handler functions the interrupt request is cleared.
Move this to the real interrupt function.
Also at some point in the handlers, comedi_event() is called to pass any
events to the comedi subsystem. Move this to the real interrupt function
also.
For aesthetics, and to clarify the code, rename the interrupt function and
the handler functions.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:50 +0000 (11:29 -0700)]
staging: comedi: pcl818: remove 'ai_mode' from private data
This member of the private data is not needed. We can determine the
interrupt mode based on the 'dma' and 'usefifo' members.
Refactor the interrupt handler and the (*cancel) function to not use
the 'ai_mode' and remove the setting of this member in the (*do_cmd)
heler functions.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:49 +0000 (11:29 -0700)]
staging: comedi: pcl816: remove 'int816_mode' from private data
This member of the private data is not needed.
Refactor the interrupt handler and the (*cancel) function to not use
the 'int816_mode' and remove the setting of this member in the (*do_cmd)
heler function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:48 +0000 (11:29 -0700)]
staging: comedi: pcl818: exit interrupt quick when there is nothing to do
If an async ai command is not running or the ai_mode is 0 the interrupt
routine doesn't do anything other than spew some noise and clear the
interrupt request in the hardware.
Because this driver is manually attached, the "premature interrupt"
check in the interrupt handler should never happen. The interrupt is
only hooked up during the attach and it's released during the detach.
Combine these checks so that the interrupt function exits quick if it
has nothing to handle. Remove the noise.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:47 +0000 (11:29 -0700)]
staging: comedi: pcl816: exit interrupt quick when there is nothing to do
If an async ai command is not running or the int816_mode is 0 the
interrupt routine doesn't do anything other than spew some noise and
clear the interrupt request in the hardware.
Because this driver is manually attached, the "premature interrupt"
check in the interrupt handler should never happen. The interrupt is
only hooked up during the attach and it's released during the detach.
Combine these checks so that the interrupt function exits quick if it
has nothing to handle. Remove the noise.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:46 +0000 (11:29 -0700)]
staging: comedi: pcl812: remove "spurious interrupt" noise
Because this driver is manually attached, the "spurious interrupt"
check in the interrupt handler should never happen. The interrupt is
only hooked up during the attach and it's released during the detach.
Leave the check but remove the noise. Also make sure to clear the
interrupt request in the hardware.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:45 +0000 (11:29 -0700)]
staging: comedi: pcl818: fix (*cancel) when cmd->stop_src == TRIG_NONE
When using DMA, the async command (*cancel) operation is delayed until the
current DMA transfer is complete. When the DMA transfer finishes the interrupt
routine detects this and calls the (*cancel) again which should then cancel the
async command.
The current logic does not work when cmd->stop_src == TRIG_NONE. In this case
the (*cancel) function keeps delaying the cancel. The actual DMA does stop
because the DMA handler is not called to setup the next transfer but the
(*cancel) code is never executed.
Rename the 'irq_was_now_closed' flag in the private data to 'ai_cmd_canceled'
to clarify what it is.
Only set the flag in the (*cancel) when a DMA transfer is running and the
async command has not already been canceled. The interrupt routine then does
not need all the extra checks.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:44 +0000 (11:29 -0700)]
staging: comedi: pcl816: clarify 'irq_was_now_closed' flag in private data
This flag in the private data is set when an async command is canceled with
the ai (*cancel) operation. Rename the flag to 'ai_cmd_canceled' to clarify
its use.
Move the check for the flag in the interrupt handler. If the async command
was canceled there is no reason to handle the interrupt. Just clear interrupt
and return.
Also, make sure to clear the interrupt when the device is not attached.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:43 +0000 (11:29 -0700)]
staging: comedi: pcl818: reduce indent level in pcl818_ai_cancel()
If an async command is not running the (*cancel) function doesn't do
anything. Exit the function early if this is the case.
This allows reducing the indent level in the rest of the function.
Also, move the setting of the 'irq_was_now_closed' to the only place
wher it actually gets left set to 1 and remove the goto.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:42 +0000 (11:29 -0700)]
staging: comedi: pcl816: reduce indent level in pcl816_ai_cancel()
If an async command is not running the (*cancel) function doesn't do
anything. Exit the function early if this is the case.
This allows reducing the indent level in the rest of the function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:41 +0000 (11:29 -0700)]
staging: comedi: pcl818: factor out the common "dropout" detect code
The DMA, FIFO, and EOC interrupt handlers all have common code that
checks for channel dropout when running an async command.
Factor this common code into a helper function.
Only return the sample if the channel is valid. The EOC handler was
previously returning the value then checking for channel dropout.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:40 +0000 (11:29 -0700)]
staging: comedi: pcl818: introduce pcl818_ai_get_fifo_sample()
To clarify the code, introduce a helper function to read the analog
input data sample from the FIFO and optionally return the channel
that the sample was for. The channel is used to check for dropped
samples.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:39 +0000 (11:29 -0700)]
staging: comedi: pcl818: fix PCL818_FI_DATAHI
The A/D FIFO uses two registers to get each analog data sample.
PCL818_FI_DATALO is the LSB of the data and PCL818_FI_DATAHI is
the MSB of the data. The current define for PCL818_FI_DATAHI is
incorrect and results in the LSB getting read twice.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:38 +0000 (11:29 -0700)]
staging: comedi: pcl818: factor out the common "next ai chan" code
The DMA, FIFO, and EOC interrupt handlers all have common code that
bumps the counters in the private data that keep track of what channel
is being sampled next and when all the data has been sampled.
Factor this common code into a helper function.
Make sure the COMEDI_CB_BLOCK event is set when advancing to the next
channel so that when the comedi_event() is finally called the core will
wake the async_queue to return the analog input data.
Also, make sure the COMEDI_CB_EOS event is set at the completion of each
scan.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:37 +0000 (11:29 -0700)]
staging: comedi: pcl816: factor out the "next ai chan" code
Factor out the code that bumps the counters in the private data that keep
track of what channel is being samples next and when all the data has been
sampled.
Don't clear the events in the driver. The comedi core will clear the events
at the end of the comedi_event().
Make sure the COMEDI_CB_BLOCK event is set when advancing to the next
channel so that when the comedi_event() is finally called the core will
wake the async_queue to return the analog input data.
Also, make sure the COMEDI_CB_EOS event is set at the completion of each
scan.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:36 +0000 (11:29 -0700)]
staging: comedi: pcl812: factor out the common "next ai chan" code
The DMA and EOC interrupt handlers all have common code that bumps the
counters in the private data that keep track of what channel is being
sampled next and when all the data has been sampled.
Factor this common code into a helper function.
Don't clear the events in the driver. The comedi core will clear the events
at the end of the comedi_event().
Make sure the COMEDI_CB_BLOCK event is set when advancing to the next
channel so that when the comedi_event() is finally called the core will
wake the async_queue to return the analog input data.
Also, make sure the COMEDI_CB_EOS event is set at the completion of each
scan.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:35 +0000 (11:29 -0700)]
staging: comedi: pcl816: only hook up async command support if DMA is available
This driver only supports async commands if a DMA channel is available. Modify
the subdevice init so that the command support only gets hooked up if we can
do DMA.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:34 +0000 (11:29 -0700)]
staging: comedi: pcl816: remove unreachable interrupt handler code
According to the users manual, when using interrupt (non-DMA) transfers
this hardware generates an interrupt at the start of a conversion. This
requires the interrupt routine to busywait until the end-of-conversion.
It appears this was unreliable and interrupt only async command support
was removed at some time. Async command support is still available when
DMA is used.
Remove the unreachable interrupt only handler code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Tue, 4 Mar 2014 18:29:33 +0000 (11:29 -0700)]
staging: comedi: pcl818: interrupt handlers should not busywait
The interrupt is only generated by the hardware at the completion of
an A/D conversion. Because of this the sanity check to make sure that
the A/D conversion is complete and data is available is probably
unnecessary but it doesn't hurt anything.
The busywait loop is a different issue. Interrupt routines should not
busywait. That's just mean...
Remove the bustwait and use pcl818_ai_eoc() to check for the end-of-
conversion.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>