- 07 Aug, 2015 21 commits
-
-
H Hartley Sweeten authored
Use the BIT() marco to define the bits of this register. For aesthetics, rename all the defines to remove the '_BIT' from the name. Also, use ME4000_AI_STATUS_REG instead of ME4000_AI_CTRL_REG when reading the register (they happen to be the same). 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 authored
Use the helper function to check the range type instead of relying on the value. For aesthetics, rename the local variable used for the range. 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 authored
The chanspec channel, range, and aref are unsigned int values. Use the correct types when extracting 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>
-
H Hartley Sweeten authored
The coemdi (*insn_read) functions are supposed to read insn->n values from the hardware. Make this function work like the core expects. Use the comedi_offset_munge() helper to munge the two's complement values to offset binary. 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 authored
Use the comedi_timeout() helper to busy-wait for the analog input end-of- conversion instead of the udelay(). 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 authored
Use the BIT() macro to define the bits of this 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 authored
Rename this function so it has namespace associated with the driver. The last entry of the chanlist needs the ME4000_AI_LIST_LAST_ENTRY bit set to end the list. Fix the function and tidy if up a bit. 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 authored
The comedi_lrange table for the analog inputs is inverted compared to the values that need to be written to the ME4000_AI_CHANNEL_LIST_REG to select the range. Create a macro, ME4000_AI_LIST_RANGE(), to handle the inversion. Remove the old defines and simplify the code a bit. 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 authored
This define evaluates to 0 and is OR'ed with the 'entry' value that is written to the ME4000_AI_CHANNEL_LIST_REG when the channel aref is a single-ended type (AREF_GROUND or AREF_COMMON). OR'ing a zero value is pretty silly, just remove it. Remove the switch() in me4000_ai_insn_read() to 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 authored
In comedi drivers the local variable used for the dev->private pointer is normally named 'devpriv'. For aesthetics, rename the variables in this driver. Also, rename the struct to follow the norm. 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 authored
Some of the boards supported by this driver can do analog input sample & hold on 8 of the channels. The 'ai_sh_nchan' member of the boardinfo is used to indicate which boards support this feature. To save a bit of space, convert this member to a bit-field, 'can_do_sh_ai'. Note, this feature is not currently supported. 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 authored
This member of the boardinfo is always '4' for the boards that have an analog output FIFO. Covert it to a bit-field, 'has_ao_fifo', to save a bit of space. 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 authored
For the boards that have analog output capability, there are always 4 analog output channels. Convert the 'ao_nchan' member of the boardinfo into a bit-field, 'has_ao', to save a bit of space and set the analog output subdevice 'n_chan' to 4 when supported. 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 authored
This member of the boardinfo is only used as a flag indicating that the board supports differential analog inputs. Convert the member to a bit- field to save a bit of space. For aesthetics, rename the member to 'can_do_diff_ai'. 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 authored
Change the boardinfo 'has_counter' and 'ai_trig_analog' flags into bit-fields to save a bit of space. 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 authored
The maximum differential channel is half the subdevice 'n_chan'. Use that instead and remove the need for the 'board' variable. Also, the comedi core does no validate the aref flags. Add a check to ensure that the subdevice actually supports the AREF_DIFF mode. 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 authored
The 'board' pointer is only used in this function to verify that the 'chan' is valid for an aref of AREF_DIFF. For differential inputs, the maximum channel is half the subdevice 'n_chan'. Use that instead and remove the 'board' variable. Also, the comedi core does not validate the aref flags. Add a check to ensure that the subdevice actually supports the AREF_DIFF mode. 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 authored
The comedi core validates that the 'chan' is valid for the subdevice before calling the (*insn_read) operation. Remove the unnecessary check. 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 authored
Some of the boards supported by this driver do not have differential analog inputs. Only set the SDF_DIFF subdev_flag when the board supports it. 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 authored
All the boards supported by this driver have analog inputs. They just differ in the number of channels (32 or 16). Always initialize the analog input subdevice in me4000_auto_attach(). 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 authored
All the boards supported by this driver have 32 digital I/O channels. Remove the unnecessary boardinfo. 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>
-
- 06 Aug, 2015 1 commit
-
-
Daniel Machon authored
Globals are initialized to zero or NULL by GCC. No need to explicitly initialize them. Signed-off-by:
Daniel Machon <dmachon.dev@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 Aug, 2015 18 commits
-
-
Miguel Bernabeu Diaz authored
Fix checkpatch.pl warning: WARNING: Use #include <linux/io.h> instead of <asm/io.h> Signed-off-by:
Miguel Bernabeu Diaz <miguelbernadi@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shraddha Barke authored
This patch uses kasprintf which combines kzalloc and sprintf. kasprintf also takes care of the size calculation. Semantic patch used is as follows: @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf (flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); Signed-off-by:
Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shraddha Barke authored
Replace comma between expression statements by a semicolon. The semantic patch used is as follows: @@ expression e1,e2; @@ e1 - , + ; e2; Signed-off-by:
Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shraddha Barke authored
Replace comma between expression statements by a semicolon. The semantic patch used is as follows: @@ expression e1,e2; @@ e1 - , + ; e2; Signed-off-by:
Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shraddha Barke authored
Replace comma between expression statements by a semicolon. The semantic patch used is as follows: @@ expression e1,e2; @@ e1 - , + ; e2; Signed-off-by:
Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shraddha Barke authored
This patch does away with the cast on void * as it is unnecessary. Semantic patch used is as follows: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by:
Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shraddha Barke authored
This patch does away with the cast on void * as it is unnecessary. Semantic patch used is as follows: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by:
Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shraddha Barke authored
This patch does away with the cast on void * as it is unnecessary. Semantic patch used is as follows: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by:
Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Neil Horman authored
Switch the visornic over to use napi. Currently there is a kernel thread that sits and waits on a wait queue to get notified of incoming virtual interrupts. It would be nice if we could handle frame reception using the standard napi processing instead. This patch creates our napi instance and has the rx thread schedule it Given that the unisys hypervisor currently requires that queue servicing be done by a polling loop that wakes up every 2ms, lets instead also convert that to a timer, which is simpler, and allows us to remove all the thread starting and stopping code. Signed-off-by:
Neil Horman <nhorman@redhat.com> Signed-off-by:
Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chandra S Gorentla authored
The character ' ' is removed after the character '('. This fixes the checkpatch.pl error - "space prohibited after that open parenthesis '('". Signed-off-by:
Chandra S Gorentla <csgorentla@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chandra S Gorentla authored
Added 'void' keyword in the paranthesis of function definitions, when there are no arguments to the functions. This fixes the checkpatch.pl error - "Bad function definition 'function()' should probably be function(void)". Signed-off-by:
Chandra S Gorentla <csgorentla@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Daniel Machon authored
Fixed coding styles issues with braces. Signed-off-by:
Daniel Machon <dmachon.dev@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shraddha Barke authored
The Linux kernel coding style guidelines suggest not using typedefs for structure and enum types. This patch gets rid of the typedefs for Ack_session_info_t. The following Coccinelle semantic patch detects the cases for struct type: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by:
Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lars Svensson authored
Fixing indentation errors in drivers/staging/iio/iio_simple_dummy_events.c. Signed-off-by:
Lars Svensson <lars1.svensson@sonymobile.com> Acked-by:
Daniel Baluta <daniel.baluta@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lior Pugatch authored
Patch created to satisfy checkpatch.pl Signed-off-by:
Lior Pugatch <buzz5800@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ting-Chih Hsiao authored
remove spaces at the start of a line align enum variable with other parameters Signed-off-by:
Ting-Chih Hsiao <s894330@hotmail.com> Acked-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Oleg Drokin authored
cfs_daemonize is long gone and replaced by a proper call to kthread_run, so update the comment to reflect that fact. Signed-off-by:
Oleg Drokin <green@linuxhacker.ru> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Oleg Drokin authored
Ever since daemonize was removed in 3.18, there are no longer any flags passed to kthread_run. Most of the comments were deleted, but this one lingered on until now. Signed-off-by:
Oleg Drokin <green@linuxhacker.ru> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-