Commit graph

519327 commits

Author SHA1 Message Date
H Hartley Sweeten
7d6f3aaead staging: comedi: ni_stc.h: tidy up G0_G1_Select register and bits
Rename the CamelCase. Convert the inline helper functions into macros.

Tidy up the driver code to use the new macros. For consistency, make
the ni_set_gpct_dma_channel() helper follow the same style as the
ni_set_ai_dma_channel() and ni_set_ao_dma_channel() helpers.

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>
2015-05-09 19:05:18 +02:00
H Hartley Sweeten
a4b7ef9d8e staging: comedi: ni_stc.h: tidy up AI_AO_Select register and bits
Rename the CamelCase and convert the enum into macros.

Tidy up the driver code to use the new macros.

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>
2015-05-09 19:05:18 +02:00
H Hartley Sweeten
3446b08e83 staging: comedi: ni_mio_common: remove BUG_ON(gpct_index ...) checks
The gpct_index will always be 0 or 1. Remove the unnecessary BUG_ON()
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>
2015-05-09 19:05:17 +02:00
H Hartley Sweeten
25e941affe staging: comedi: ni_stc.h: tidy up DAC[01]_Direct_Data registers
Rename the CamelCase and convert the defines into a macro.

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>
2015-05-09 19:05:17 +02:00
H Hartley Sweeten
9e0ad6f4d1 staging: comedi: ni_stc.h: tidy up DAC_FIFO_Data register
Rename the CamelCase.

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>
2015-05-09 19:05:17 +02:00
H Hartley Sweeten
b497b8da80 staging: comedi: ni_stc.h: tidy up AO_Configuration register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:17 +02:00
H Hartley Sweeten
d504a6ee3d staging: comedi: ni_stc.h: tidy up Configuration_Memory_High register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:17 +02:00
H Hartley Sweeten
76efac7f52 staging: comedi: ni_stc.h: tidy up Configuration_Memory_Low register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:17 +02:00
H Hartley Sweeten
363f570ef0 staging: comedi: ni_stc.h: tidy up ADC_FIFO_Data_Register
Rename the CamelCase.

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>
2015-05-09 19:05:17 +02:00
H Hartley Sweeten
61260f5849 staging: comedi: ni_stc.h: tidy up 8255 register defines
Only the 'Port_A' define is used. Rename the CamelCase and remove the
unused 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>
2015-05-09 19:05:17 +02:00
H Hartley Sweeten
68885d9e00 staging: comedi: ni_stc.h: tidy up Misc_Command register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:16 +02:00
H Hartley Sweeten
2ed183fff4 staging: comedi: ni_stc.h: tidy up Serial_Command register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:16 +02:00
H Hartley Sweeten
906170b882 staging: comedi: ni_stc.h: tidy up XXX_Status register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:16 +02:00
H Hartley Sweeten
4f809ff5e8 staging: comedi: ni_stc.h: tidy up Window_{Address,Data} defines
Rename the CamelCase.

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>
2015-05-09 19:05:16 +02:00
H Hartley Sweeten
81bee07f95 staging: comedi: ni_stc.h: remove unused GPCT register bit defines
The bit defines in this header for the GPCT registers are not used. The ones
in ni_tio_internal.h are used instead. Remove them from this header.

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>
2015-05-09 19:05:16 +02:00
H Hartley Sweeten
549835c76a staging: comedi: ni_stc.h: tidy up AI_*_Save_Registers
Rename the CamelCase.

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>
2015-05-09 19:05:16 +02:00
H Hartley Sweeten
bab382efa8 staging: comedi: ni_stc.h: tidy up Joint_Status_2_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:15 +02:00
H Hartley Sweeten
8fbb015484 staging: comedi: ni_stc.h: tidy up DIO_Serial_Input_Register
Rename the CamelCase.

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>
2015-05-09 19:05:15 +02:00
H Hartley Sweeten
d3fed08132 staging: comedi: ni_stc.h: tidy up Joint_Status_1_Register
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:15 +02:00
H Hartley Sweeten
2c090acdc9 staging: comedi: ni_stc.h: tidy up AO_*_Save_Registers
Rename the CamelCase.

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>
2015-05-09 19:05:15 +02:00
H Hartley Sweeten
d9c4115fcd staging: comedi: ni_stc.h: tidy up G_Save_Register
Rename the CamelCase and define the G0 and G1 registers to add clarity
to the mio_regmap tables.

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>
2015-05-09 19:05:15 +02:00
H Hartley Sweeten
27650d9900 staging: comedi: ni_stc.h: tidy up G_HW_Save_Register
Rename the CamelCase and define the G0 and G1 registers to add clarity
to the mio_regmap tables.

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>
2015-05-09 19:05:15 +02:00
H Hartley Sweeten
6f764a47f3 staging: comedi: ni_stc.h: tidy up DIO_Parallel_Input_Register
Rename the CamelCase.

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>
2015-05-09 19:05:15 +02:00
H Hartley Sweeten
63b2bb05e1 staging: comedi: ni_stc.h: tidy up AO_Status_2_Register
Rename the CamelCase.

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>
2015-05-09 19:05:14 +02:00
H Hartley Sweeten
3ca18feff7 staging: comedi: ni_stc.h: tidy up AI_Status_2_Register
Rename the CamelCase.

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>
2015-05-09 19:05:14 +02:00
H Hartley Sweeten
7f0e1bac32 staging: comedi: ni_stc.h: tidy up G_Status_Register
Rename the CamelCase.

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>
2015-05-09 19:05:14 +02:00
H Hartley Sweeten
d123ee3ce0 staging: comedi: ni_stc.h: tidy up AO_Status_1_Register and bits
Rename the CamelCase. Use the BIT() marco to define the 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>
2015-05-09 19:05:14 +02:00
H Hartley Sweeten
7b14fffd78 staging: comedi: ni_stc.h: tidy up AI_Status_1_Register and bits
Rename the CamelCase. Use the BIT() marco to define the 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>
2015-05-09 19:05:14 +02:00
H Hartley Sweeten
c7edadc103 staging: comedi: ni_stc.h: tidy up AI_Mode_3_Register and bits
Rename the CamelCase. Use the BIT() marco to define the 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>
2015-05-09 19:05:14 +02:00
H Hartley Sweeten
5bd1c72837 staging: comedi: ni_stc.h: tidy up AO_Output_Control_Register and bits
Rename the CamelCase. Convert the inline helper function into a macro and
use the BIT() marco to define the 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>
2015-05-09 19:05:14 +02:00
H Hartley Sweeten
8102f3d0c1 staging: comedi: ni_stc.h: tidy up Write_Strobe_*_Register
The Write_Strobe_*_Register defines are noy used. Instead the more
descriptive Configuration_Memory_Clear, ADC_FIFO_Clear and DAC_FIFO_Clear
defines are used. Remove the unused defines and rename the CamelCase.

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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
24a11ba670 staging: comedi: ni_stc.h: tidy up RTSI_Board_Register
Rename the CamelCase.

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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
390bc6ffe7 staging: comedi: ni_stc.h: tidy up RTSI_Trig_[AB]_Output_Register and bits
Rename the CamelCase. Convert the inline helper functions to macros and use
the BIT() macro to define the 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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
63ff3f2c29 staging: comedi: ni_stc.h: tidy up AO_Personal_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
c1b74035e1 staging: comedi: ni_stc.h: tidy up AI_Personal_Register and bits
Rename the CamelCase. Use the BIT() macro to define the bits.

Tidy up ni_ai_reset() by using a local var to set the common bits and
programming the register in the common code path.

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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
04b6846731 staging: comedi: ni_stc.h: tidy up Second_IRQ_B_Enable_Register and bits
Rename the CamelCase. The bit defines are identical to NISTC_INTB_ENA_REG.
Reuse them.

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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
4c9c1d2c52 staging: comedi: ni_stc.h: tidy up Interrupt_B_Enable_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
d84e9c3489 staging: comedi: ni_stc.h: tidy up Second_IRQ_A_Enable_Register and bits
Rename the CamelCase. The bit defines are identical to NISTC_INTA_ENA_REG.
Reuse them.

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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
5cca26aaf2 staging: comedi: ni_stc.h: tidy up Interrupt_A_Enable_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:13 +02:00
H Hartley Sweeten
707502f3d0 staging: comedi: ni_stc.h: tidy up Joint_Reset_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:12 +02:00
H Hartley Sweeten
72bca4f5e2 staging: comedi: ni_stc.h: tidy up AO_Mode_3_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:12 +02:00
H Hartley Sweeten
38aba4c994 staging: comedi: ni_stc.h: tidy up G_Autoincrement_Register
Rename the CamelCase and define the G0 and G1 registers to add clarity
to the mio_regmap tables.

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>
2015-05-09 19:05:12 +02:00
H Hartley Sweeten
f21844d33b staging: comedi: ni_stc.h: tidy up AO_Trigger_Select_Register and bits
Rename the CamelCase. Use the BIT() macro to define the bits.

Tidy up the ni_ao_cmd() by using a local var to mask/set the bits then
programming the register in the common code path.

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>
2015-05-09 19:05:12 +02:00
H Hartley Sweeten
2b6285dab7 staging: comedi: ni_stc.h: tidy up AO_Start_Select_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:12 +02:00
H Hartley Sweeten
af5102a77e staging: comedi: ni_stc.h: tidy up AI_DIV_Load_A_Register
Rename the CamelCase.

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>
2015-05-09 19:05:12 +02:00
H Hartley Sweeten
f878071a44 staging: comedi: ni_stc.h: tidy up AI_Trigger_Select_Register and bits
Rename the CamelCase. Use the BIT() macro to define the bits.

Tidy up ni_ai_cmd() by using a local var to set the common bits and
programming the register in the common code path.

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>
2015-05-09 19:05:12 +02:00
H Hartley Sweeten
3e9088929f staging: comedi: ni_stc.h: tidy up AI_START_STOP_Select_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:12 +02:00
H Hartley Sweeten
27cf6c02ab staging: comedi: ni_stc.h: tidy up Analog_Trigger_Etc_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:11 +02:00
H Hartley Sweeten
aa9d73ba83 staging: comedi: ni_stc.h: tidy up AI_Output_Control_Register and bits
Rename the CamelCase. Use the BIT() macro to define the bits.

Tidy up the programming of this register un ni_ai_reset() by using a
local variable to set the common bits then writing the register in the
common code path.

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>
2015-05-09 19:05:11 +02:00
H Hartley Sweeten
d8f62c4638 staging: comedi: ni_stc.h: tidy up Interrupt_Control_Register and bits
Rename the CamelCase. Use the BIT() macro to define the 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>
2015-05-09 19:05:11 +02:00