GitHub/LineageOS/android_kernel_motorola_exynos9610.git
9 years agostaging: comedi: adv_pci1710: absorb move_block_from_fifo()
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:26 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: absorb move_block_from_fifo()

This function is only called by pci1710_handle_fifo(). Absorb it and clean up
pci1710_handle_fifo().

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>
9 years agostaging: comedi: adv_pci1710: transfer all ai samples in one step
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:25 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: transfer all ai samples in one step

The two step process to transfer the ai samples in pci1710_handle_fifo() doesn't
make any sense. If the async buffer does not have enough room for the samples the
core will set the async event COMEDI_CB_OVERFLOW which will cause the async command
to cancel. Splitting the transfer doesn't add any value.

Transfer all the samples in one step 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>
9 years agostaging: comedi: adv_pci1710: remove 'turn' param from move_block_from_fifo()
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:24 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: remove 'turn' param from move_block_from_fifo()

This parameter is not used in the function. It was only used in some debug
messages that were previously removed. Remove the parameter.

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>
9 years agostaging: comedi: adv_pci1710: do comedi_handle_events() in common code patch
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:23 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: do comedi_handle_events() in common code patch

The pci1710_handle_every_sample() and pci1710_handle_fifo() helpers, called by
the interrupt handler, both have multiple comedi_handle_events() calls. Remove
these and just do a single comedi_handle_events() at the end of the interrupt
handler.

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>
9 years agostaging: comedi: adv_pci1710: introduce pci171x_ai_read_sample()
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:22 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: introduce pci171x_ai_read_sample()

Introduce a helper function to read an analog input sample, check for
channel dropout, and mask the sample to the maxdata of the subdevice.

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>
9 years agostaging: comedi: adv_pci1710: tidy up setup_channel_list()
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:21 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: tidy up setup_channel_list()

Rename this function so it has namespace associated with the driver.

Tidy up the code to clarify the function. Remove the unnecessary static const
array muxonechan[].

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>
9 years agostaging: comedi: adv_pci1710: clarify the 'act_chanlist'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:20 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: clarify the 'act_chanlist'

This driver saves the channel list of a scan in the private data and uses
that list to check analog input samples for data dropout.

Currently the channel numbers are shifted 12 bits so that they match the
channel number in the samples that are read from the board. All of the
shifts make the driver a bit harder to follow.

Store the channel numbers directly to the 'act_chanlist' and shift the
sample value instead when checking for the dropout. Add a comment for
clarity.

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>
9 years agostaging: comedi: adv_pci1710: refactor boardinfo 'cardtype'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:19 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: refactor boardinfo 'cardtype'

The 'cardtype' in the boardinfo is only used to:

 1) determine if the board is a pci1720 during the attach of the driver
    and when reseting the board
 2) determine is the board is not a pci1713 when checking for analog input
    data dropout

There is also an unnecessary use of the 'cardtype' when canceling an analog
input async command.

Remove the 'cardtype' member and add two bit-field flags, 'is_pci1713' and
'is_pci1720'. Refactor the driver to use the new flags.

Remove the unnecessary cardtype handling in pci171x_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>
9 years agostaging: comedi: adv_pci1710: remove boardinfo 'rangelist_ao'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:18 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: remove boardinfo 'rangelist_ao'

This boardinfo is not necessary. All the boards with analog outputs have
the same range options except for the pci1720 board. That board type is
already handled specially during the driver attach.

Remove the boardinfo and add the subdevice range_table initialization in
the cardtype switch.

Rename the range tables to clarify that they are "analog output" ranges.

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>
9 years agostaging: comedi: adv_pci1710: update the MODULE_DESCRIPTION
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:17 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: update the MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something more useful than the generic
"Comedi low-level 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>
9 years agostaging: comedi: adv_pci1710: remove function separation comments
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:16 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: remove function separation comments

Remove the remaining, unnecessary, function separation comments.

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>
9 years agostaging: comedi: adv_pci1710: rename 'this_board' local variables
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:15 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: rename 'this_board' local variables

For aesthetics, rename all the 'this_board' local variables to simply
'board'. That's more common in comed drivers.

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>
9 years agostaging: comedi: adv_pci1710: tidy up analog input subdevice init
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:14 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: tidy up analog input subdevice init

For aesthetics, add some whitespace to the analog input subdevice init and
rename the (*insn_read) support function. Also remove the unnecessary comments.

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>
9 years agostaging: comedi: adv_pci1710: tidy up analog output subdevice init
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:13 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: tidy up analog output subdevice init

For aesthetics, add some whitespace to the analog output 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>
9 years agostaging: comedi: adv_pci1710: tidy up digital input and output subdevice init
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:12 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: tidy up digital input and output subdevice init

For aesthetics, add some whitespace to the digital input and output subdevice
init and rename the support functions. Also remove the unnecessary comment.

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>
9 years agostaging: comedi: adv_pci1710: tidy up counter subdevice init
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:11 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: tidy up counter subdevice init

For aesthetics, add some whitespace to the counter subdevice init and
rename the support functions. Also remove the unnecessary comments.

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>
9 years agostaging: comedi: adv_pci1710: tidy up pci171x_insn_write_ao()
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:10 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: tidy up pci171x_insn_write_ao()

For aesthetics, rename this function and tidy it up.

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>
9 years agostaging: comedi: adv_pci1710: tidy up pci1720_insn_write_ao()
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:09 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: tidy up pci1720_insn_write_ao()

For aesthetics, rename this function and tidy it up.

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>
9 years agostaging: comedi: adv_pci1710: use comedi_subdevice 'readback'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:08 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: use comedi_subdevice 'readback'

Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.

The board is "reset" prior to the subdevice init. Part of this reset
sets all the analog output channels to 0V. Move the initialization of
the 'readback' values after the 'readback' member has been allocated.

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>
9 years agostaging: comedi: adv_pci1710: change boardinfo 'n_aochan' to 'has_ao'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:07 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: change boardinfo 'n_aochan' to 'has_ao'

Some of the boards supported by this driver have analog outputs. The pci1720
board has 4 analog output channels and the others have 2.

For aesthetics, change the 'n_aochan' member to a bit-field flag 'has_ao' and
refactor the board attach accordingly. Remove the unnecessary initialization
of the subdevice 'len_chanlist'. That member is only used by subdevices that
support async commands.

Also, remove the unnecessary 'number of channels' check in pci171x_reset().
The boards that used this function, and have analog outputs, always have 2
channels.

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>
9 years agostaging: comedi: adv_pci1710: change boardinfo 'fifo_half_size' to 'has_large_fifo'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:06 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: change boardinfo 'fifo_half_size' to 'has_large_fifo'

The boards supported by this driver have a 4K or 1K FIFO that is used when reading
analog input samples when running an async command. The maximum number of samples
in the FIFO is half the FIFO size due to the 2 bytes/sample (12-bit resolution).

For aesthetics, change the 'fifo_half_size' member to a bit-field flag 'has_large_fifo'
and add a new member to the private data to hold the 'max_samples' available in the
FIFO. Refactor the board attach and pci1710_handle_fifo() accordingly.

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>
9 years agostaging: comedi: adv_pci1710: remove boardinfo 'ai_ns_min'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:05 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: remove boardinfo 'ai_ns_min'

The minimum analog input conversion time is 10000 ns for all board types. Remove
this 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>
9 years agostaging: comedi: adv_pci1710: change boardinfo 'n_aichand' to 'has_diff_ai'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:04 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: change boardinfo 'n_aichand' to 'has_diff_ai'

The 'n_aichand' member of the boardinfo is actually a flag indicating that the
board supports differential analog inputs. The number of channels is always
half the single-ended number of channels.

For aesthetics, change the 'n_aichand' member to a bit-field flag 'has_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>
9 years agostaging: comedi: adv_pci1710: remove boardinfo 'ao_maxdata'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:03 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: remove boardinfo 'ao_maxdata'

The analog output resolution is always 12-bits in this driver. 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>
9 years agostaging: comedi: adv_pci1710: remove boardinfo 'ai_maxdata'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:02 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: remove boardinfo 'ai_maxdata'

The analog input resolution is always 12-bits in this driver. 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>
9 years agostaging: comedi: adv_pci1710: rename boardinfo 'have_irq'
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:01 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: rename boardinfo 'have_irq'

For aesthetics, rename this member of the boardinfo to 'has_irq' and change
it to a bit-field 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>
9 years agostaging: comedi: adv_pci1710: simplify digital input and output boardinfo
H Hartley Sweeten [Tue, 20 Jan 2015 21:53:00 +0000 (14:53 -0700)]
staging: comedi: adv_pci1710: simplify digital input and output boardinfo

The boards that have digital inputs and outputs always have 16 input channels and
16 output channels.

Replace the 'n_dichan' and 'n_dochan' members of the boardinfo with the fit-field
flag 'has_di_do' and refactor the board attach accordingly.

Remove the unnecessary initialization of the subdevice 'len_chanlist'. That
member is only used by subdevices that support async commands.

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>
9 years agostaging: comedi: adv_pci1710: change boardinfo 'n_counter' to 'has_counter'
H Hartley Sweeten [Tue, 20 Jan 2015 21:52:59 +0000 (14:52 -0700)]
staging: comedi: adv_pci1710: change boardinfo 'n_counter' to 'has_counter'

The 'n_counter' member of the boardinfo is actually a flag indicating that the
board exposes a single channel counter subdevice.

For aesthetics, change the 'n_counter' member to a bit-field flag 'has_counter'
and refactor the board attach accordingly.

Remove the unnecessary initialization of the subdevice 'len_chanlist'. That
member is only used by subdevices that support async commands.

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>
9 years agostaging: comedi: pcl818: introduce pcl818_ai_write_sample()
H Hartley Sweeten [Tue, 20 Jan 2015 19:06:03 +0000 (12:06 -0700)]
staging: comedi: pcl818: introduce pcl818_ai_write_sample()

This driver can acquire analog input samples during the async command with
DMA, by using the FIFO, or sample-by-sample using the End-Of-Conversion
interrupt. All three methods do the following sequence:

  1) check for channel dropout
  2) add the sample to the async buffer
  3) advance the channel dropout detection and detect the end of the command

Merge this sequence into a new helper 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>
9 years agostaging: comedi: drivers: remove inappropriate COMEDI_CB_EOA events
H Hartley Sweeten [Tue, 20 Jan 2015 19:06:02 +0000 (12:06 -0700)]
staging: comedi: drivers: remove inappropriate COMEDI_CB_EOA events

Hardware errors should be reported with the COMEDI_CB_ERROR event. This event
will cause the async command to cancel. It's not necessary to also set the
COMEDI_CB_EOA event. Remove these events.

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>
9 years agostaging: comedi: das16: use COMEDI_CB_CANCEL_MASK to see if command is running
H Hartley Sweeten [Tue, 20 Jan 2015 19:06:01 +0000 (12:06 -0700)]
staging: comedi: das16: use COMEDI_CB_CANCEL_MASK to see if command is running

In das16_interrupt(), use COMEDI_CB_CANCEL_MASK to determine if the async
command is still running and the dma needs to be re-enabled. This will
cause the driver not re-enable the dma if the async buffer overflows
(COMEDI_CB_OVERFLOW), a hardware error occurs (COMEDI_CB_ERROR), or the
command completes (COMEDI_CB_EOA).

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>
9 years agostaging: comedi: comedidev.h: add namespace to the subdevice "runflags"
H Hartley Sweeten [Tue, 20 Jan 2015 19:06:00 +0000 (12:06 -0700)]
staging: comedi: comedidev.h: add namespace to the subdevice "runflags"

Tidy up and document the subdevice "runflags". Rename them so they have
comedi namespace.

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>
9 years agostaging: comedi: comedidev.h: remove unused "polling" function prototypes
H Hartley Sweeten [Tue, 20 Jan 2015 19:05:59 +0000 (12:05 -0700)]
staging: comedi: comedidev.h: remove unused "polling" function prototypes

These "polling" functions are not implemented in the comedi core. Remove the
unnecessary prototypes.

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>
9 years agostaging: comedi: comedidev.h: remove unused "minor bits" information
H Hartley Sweeten [Tue, 20 Jan 2015 19:05:58 +0000 (12:05 -0700)]
staging: comedi: comedidev.h: remove unused "minor bits" information

The enum comedi_minor_bits and the COMEDI_SUBDEVICE_MINOR_{SHIFT,OFFSET}
defines are not used. Remove 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>
9 years agostaging: comedi: addi_apci_1500: rewrite the subdevice support functions
H Hartley Sweeten [Tue, 20 Jan 2015 19:01:54 +0000 (12:01 -0700)]
staging: comedi: addi_apci_1500: rewrite the subdevice support functions

This driver is a mess. It violates the comedi API so much that I doubt
anything actually works.

Drop the addi-data/hwdrv_apci1500.c file and rewrite the subdevice support
functions.

This board has 16 digital inputs (subdevice 0) and 16 digital outputs
(subdevice 1).

It also has three 16-bit timer/counters provided by a Z8536 CIO chip
(subdevice 2). The Z8536 chip is also used to support pattern match
interrupt detection of the first 14 digital input channels.

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>
9 years agostaging: comedi: aio_iiro_16: return input state in async command sample
H Hartley Sweeten [Tue, 20 Jan 2015 19:00:22 +0000 (12:00 -0700)]
staging: comedi: aio_iiro_16: return input state in async command sample

Modify the sample data returned by the async command to include the current
state of the digital inputs. Otherwise the command needs to be canceled in
order for the user to do an (*insn_bits) operation to check the digital
inputs.

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>
9 years agostaging: comedi: cb_pcidas64: fix incorrect AI range code handling
Ian Abbott [Mon, 19 Jan 2015 14:47:27 +0000 (14:47 +0000)]
staging: comedi: cb_pcidas64: fix incorrect AI range code handling

The hardware range code values and list of valid ranges for the AI
subdevice is incorrect for several supported boards.  The hardware range
code values for all boards except PCI-DAS4020/12 is determined by
calling `ai_range_bits_6xxx()` based on the maximum voltage of the range
and whether it is bipolar or unipolar, however it only returns the
correct hardware range code for the PCI-DAS60xx boards.  For
PCI-DAS6402/16 (and /12) it returns the wrong code for the unipolar
ranges.  For PCI-DAS64/Mx/16 it returns the wrong code for all the
ranges and the comedi range table is incorrect.

Change `ai_range_bits_6xxx()` to use a look-up table pointed to by new
member `ai_range_codes` of `struct pcidas64_board` to map the comedi
range table indices to the hardware range codes.  Use a new comedi range
table for the PCI-DAS64/Mx/16 boards (and the commented out variants).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.18.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das1800: prefer kmalloc_array over kmalloc with multiply
Chase Southwood [Tue, 20 Jan 2015 02:42:49 +0000 (20:42 -0600)]
staging: comedi: das1800: prefer kmalloc_array over kmalloc with multiply

Checkpatch doesn't like kmalloc with multiply very much:
drivers/staging/comedi/drivers/das1800.c:1377: WARNING: Prefer kmalloc_array over kmalloc with multiply

So this patch swaps that use out for kmalloc_array instead.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agocomedi: rtd520: if condition with no effect - if identical to else
Nicholas Mc Guire [Sun, 18 Jan 2015 11:53:24 +0000 (12:53 +0100)]
comedi: rtd520: if condition with no effect - if identical to else

The if and the else branch code are identical - so the condition has no
effect on the effective code - this patch removes the condition and the
duplicated code.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMAINTAINERS: add entry for staging/fbtft/
Noralf Trønnes [Fri, 23 Jan 2015 18:29:07 +0000 (19:29 +0100)]
MAINTAINERS: add entry for staging/fbtft/

Add MAINTAINERS entry for staging/fbtft/
FBTFT is a framework for writing framebuffer drivers
for displays with LCD controllers having onchip RAM.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: nvec: specify a platform-device base id
Marc Dietrich [Tue, 20 Jan 2015 22:01:28 +0000 (23:01 +0100)]
staging: nvec: specify a platform-device base id

commit 6e3f62f079 (mfd: core: Fix platform-device id generation) modified
the computation of the mfd cell id. Negative numbers forbit the specification
of cell ids as we do. Fix this for now by specifying a base of 0 instead. In
the long run, this may be changed to automatic cell ids (base -2).

Reported-by: Misha Komarovskiy <zombah@gmail.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
9 years agoMerge tag 'iio-for-3.20a_take2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Wed, 21 Jan 2015 02:13:37 +0000 (10:13 +0800)]
Merge tag 'iio-for-3.20a_take2' of git://git./linux/kernel/git/jic23/iio into staging-testing

Jonathan writes:

First round of IIO new drivers, cleanups and functionality for the 3.20 cycle take 2

Updated pull request with Daniel's fix on top for the power management
Kconfig changes that had snuck in since last update of the IIO tree
worked it's way through from mainline.

Original pull message

New device support
* jsa1212 proxmity / ambient light sensor
* SM08500 supported added to the kxcjk-1013 accelerometer driver
* KMX61 Accelerometer/Magnetometer.  This took a somewhat rocky path
  being first merged, then reverted for a rewrite after a discussion of
  how to support additional functionality and finally being merged prior
  to some last reviews coming in, with resultant follow up patches.
* Freescale mma9551l driver (minor follow up warning supression patch).
* Semtech SX9500 proximity device driver.
* ak8975 gains support for ak09911 and ak09912 and drop the standalone driver
  for the ak09911.

New functionality
 * Dummy driver gains some virtual registers making it more flexible.
 * IIO_ACTIVITY channel types, with modifiers running, walking etc.  This is
   to support on chip motion clasifiers.  As such it is in the form of a
   confidence percentage.  The only devices so far only do binary decisions
   but this gives us room when other devices give more nuanced clasification.
 * IIO_EV_DIR_NONE type for events where there is no obvious direction.
   First case is step detection.
 * IIO_STEPS channel type for pedometers.
 * ENABLE mask element used to control turning on counting types such as
   the pedometer that need a 'start point'.
 * INSTANCE event type to support things that happen once.
 * info element for height calibration (used in various motion estimation
   algorithms). Note heigh tof use
 * dummy driver demonstration of the use of all the new bits above.
 * event monitor support for the new events.
 * inv_mpu6050 gains an i2c mux to allow bypassing the device to access
   additional devices connected on the other side of it.  Note that in
   Windows these are handled by firmware on the device and not exposed
   directly.
 * inv_mpu6050 gains ACPI enumeration.
 * inkern interface gains iio_write_channel_raw to allow in kernel users
   of DAC functionality via a simple wrapper.
 * Document input current readings in the ABI docs.
 * Add an error message when we get an out of range error in device tree
   processing for the in kernel interfaces.  Basically a device tree debugging
   aid.
 * Add a sanity check that a scan index for a channel is unique during
   registration.  There to help catch bugs as this should never happen
   in a bug free driver.

Cleanups and fixlets

 A rework of buffer registration from Lars - a precursor to some other
 upcoming new stuff (a few patches from others rolled in here as well).
 * Ensure all drivers register the same channels for the device and buffer.
 * Move buffer registration into the core rather than using the old
   two step approach.  Now we have simple ways of using a unified set channels
   for both without requiring channels be exposed by both interface, this
   removes a fair bit of boilerplate.
 * Stop sca3000 and ad5933 (both in staging) enabling buffer channels by
   default. It has long be convention in IIO to startup with no channels
   enabled and leave it up to userspace to say what goes in the buffer.
   Getting rid of these allows us to drop export of iio_scan_mask_set.
 * Drop get_bytes_per_datum from iio_buffer_access_funcs as not been used
   for a while.
 * Allocate standard buffer attributes in the core rather than in every
   driver with a buffer.
 * Make the length attribute read only when a driver is not able to set
   the length.
 * Drop the get_length callback for buffers as it is already available in
   struct iio_buffer.
 * Drop an unused arguement form iio_kfifo_allocate and add devm allocator
   for it.
 * some kconfig entries gain anotation with the resulting module name.
 * Fix a resulting compile issue in dummy driver due to a stub taking
   wrong parameters as a result of the above rework.
 * Fix an off by 2 error in copying the core assigned buffer attributes.

Other cleanups,
 * Trivial space before comma fixups.
 * ak8975 fixlets - none critical.  Rework to allow more device support.
 * Drop unnecessary sizeof(u8) calls.
 * bmp280 - refactor the compensation code to reduce copy operations and
   code length.  A second patch futher optimized this and performed some
   other minor cleanups.
 * kxcjk-1013 - various power control cleanups to avoid unnecessary enable
   / disable of device.  Make sure it is only controlled at all if CONFIG_PM
   is enabled.  Also som cleanups of error paths.
 * Small cleanups in adf4530 driver - pointless message and unnecessary braces.
 * Clarifiy the proximity ABI docs to make it clear it should get bigger
   as we move futher away.
 * Drop a misleading comment form industrialio-core.c
 * Trivial white space cleanups.
 * sca3000 looses an unused debug function.
 * Fix char unsigned ordering in ad8366
 * Increase the sleep time in ad9523 to make it predictable (value didn't
   really matter so make it more than 20 msecs)
 * mxs-lradc touchscreen property cleanups in device tree are fixed to ensure
   the meet all the 'interesting' documentation.
 * A couple of cleanups for the staging ad5933 driver to avoid unnecessary
   conversion to a processed temperature vlaue in kernel and remove
   platform data form the state structure as not needed after probe.
 * Fix a wrong scale factor in the docs.

Misc
 * Add IIO include files to the maintainers entry.

9 years agostaging: fbtft: remove ARCH_BCM2708 optimization
Noralf Trønnes [Tue, 20 Jan 2015 22:40:26 +0000 (23:40 +0100)]
staging: fbtft: remove ARCH_BCM2708 optimization

ARCH_BCM2708 is not present in mainline so remove optimization.

Signed-off-by: Noralf Trønnes <notro@tronnes.org>
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoiio kmx61 / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
Daniel Baluta [Fri, 9 Jan 2015 09:39:30 +0000 (11:39 +0200)]
iio kmx61 / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM

After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.

Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
drivers/iio/imu/kmx61.c

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoMerge 3.19-rc5 into staging-next
Greg Kroah-Hartman [Mon, 19 Jan 2015 02:59:48 +0000 (10:59 +0800)]
Merge 3.19-rc5 into staging-next

We want the staging fixes in this branch as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoLinux 3.19-rc5
Linus Torvalds [Sun, 18 Jan 2015 06:02:20 +0000 (18:02 +1200)]
Linux 3.19-rc5

9 years agoMerge tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sun, 18 Jan 2015 06:00:40 +0000 (18:00 +1200)]
Merge tag 'armsoc-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "We've been sitting on our fixes branch for a while, so this batch is
  unfortunately on the large side.

  A lot of these are tweaks and fixes to device trees, fixing various
  bugs around clocks, reg ranges, etc.  There's also a few defconfig
  updates (which are on the late side, no more of those).

  All in all the diffstat is bigger than ideal at this time, but nothing
  in here seems particularly risky"

* tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
  reset: sunxi: fix spinlock initialization
  ARM: dts: disable CCI on exynos5420 based arndale-octa
  drivers: bus: check cci device tree node status
  ARM: rockchip: disable jtag/sdmmc autoswitching on rk3288
  ARM: nomadik: fix up leftover device tree pins
  ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree
  ARM: at91/dt: sam9263: Add missing clocks to lcdc node
  ARM: at91: sama5d3: dt: correct the sound route
  ARM: at91/dt: sama5d4: fix the timer reg length
  ARM: exynos_defconfig: Enable LM90 driver
  ARM: exynos_defconfig: Enable options for display panel support
  arm: dts: Use pmu_system_controller phandle for dp phy
  ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
  ARM: dts: berlin: correct BG2Q's SM GPIO location.
  ARM: dts: berlin: add broken-cd and set bus width for eMMC in Marvell DMP DT
  ARM: dts: berlin: fix io clk and add missing core clk for BG2Q sdhci2 host
  ARM: dts: Revert disabling of smc91x for n900
  ARM: dts: imx51-babbage: Fix ULPI PHY reset modelling
  ARM: dts: dra7-evm: fix qspi device tree partition size
  ARM: omap2plus_defconfig: use CONFIG_CPUFREQ_DT
  ...

9 years agoMerge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux
Linus Torvalds [Sun, 18 Jan 2015 03:29:11 +0000 (15:29 +1200)]
Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux

Pull clock driver fixes from Mike Turquette:
 "Small number of fixes for clock drivers and a single null pointer
  dereference fix in the framework core code.

  The driver fixes vary from fixing section mismatch warnings to
  preventing machines from hanging (and preventing developers from
  crying)"

* tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux:
  clk: fix possible null pointer dereference
  Revert "clk: ppc-corenet: Fix Section mismatch warning"
  clk: rockchip: fix deadlock possibility in cpuclk
  clk: berlin: bg2q: remove non-exist "smemc" gate clock
  clk: at91: keep slow clk enabled to prevent system hang
  clk: rockchip: fix rk3288 cpuclk core dividers
  clk: rockchip: fix rk3066 pll lock bit location
  clk: rockchip: Fix clock gate for rk3188 hclk_emem_peri
  clk: rockchip: add CLK_IGNORE_UNUSED flag to fix rk3066/rk3188 USB Host

9 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sun, 18 Jan 2015 03:26:52 +0000 (15:26 +1200)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is one fix for a Multiqueue sleeping in invalid context problem
  and a MAINTAINER file update for Qlogic"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ->queue_rq can't sleep
  MAINTAINERS: Update maintainer list for qla4xxx

9 years agostaging: fbtft: add fbtft_device driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:36 +0000 (10:11 +0100)]
staging: fbtft: add fbtft_device driver

This commit adds the fbtft_device driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add flexfb driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:35 +0000 (10:11 +0100)]
staging: fbtft: add flexfb driver

This commit adds the flexfb driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_watterott driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:34 +0000 (10:11 +0100)]
staging: fbtft: add fb_watterott driver

This commit adds the fb_watterott driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_upd161704 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:33 +0000 (10:11 +0100)]
staging: fbtft: add fb_upd161704 driver

This commit adds the fb_upd161704 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_uc1701 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:32 +0000 (10:11 +0100)]
staging: fbtft: add fb_uc1701 driver

This commit adds the fb_uc1701 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_tls8204 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:31 +0000 (10:11 +0100)]
staging: fbtft: add fb_tls8204 driver

This commit adds the fb_tls8204 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_tinylcd driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:30 +0000 (10:11 +0100)]
staging: fbtft: add fb_tinylcd driver

This commit adds the fb_tinylcd driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_st7735r driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:29 +0000 (10:11 +0100)]
staging: fbtft: add fb_st7735r driver

This commit adds the fb_st7735r driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ssd1351 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:28 +0000 (10:11 +0100)]
staging: fbtft: add fb_ssd1351 driver

This commit adds the fb_ssd1351 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ssd1331 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:27 +0000 (10:11 +0100)]
staging: fbtft: add fb_ssd1331 driver

This commit adds the fb_ssd1331 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ssd1306 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:26 +0000 (10:11 +0100)]
staging: fbtft: add fb_ssd1306 driver

This commit adds the fb_ssd1306 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ssd1289 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:25 +0000 (10:11 +0100)]
staging: fbtft: add fb_ssd1289 driver

This commit adds the fb_ssd1289 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_s6d1121 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:24 +0000 (10:11 +0100)]
staging: fbtft: add fb_s6d1121 driver

This commit adds the fb_s6d1121 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_s6d02a1 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:23 +0000 (10:11 +0100)]
staging: fbtft: add fb_s6d02a1 driver

This commit adds the fb_s6d02a1 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ra8875 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:22 +0000 (10:11 +0100)]
staging: fbtft: add fb_ra8875 driver

This commit adds the fb_ra8875 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_pcd8544 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:21 +0000 (10:11 +0100)]
staging: fbtft: add fb_pcd8544 driver

This commit adds the fb_pcd8544 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ili9486 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:20 +0000 (10:11 +0100)]
staging: fbtft: add fb_ili9486 driver

This commit adds the fb_ili9486 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ili9481 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:19 +0000 (10:11 +0100)]
staging: fbtft: add fb_ili9481 driver

This commit adds the fb_ili9481 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ili9341 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:18 +0000 (10:11 +0100)]
staging: fbtft: add fb_ili9341 driver

This commit adds the fb_ili9341 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ili9340 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:17 +0000 (10:11 +0100)]
staging: fbtft: add fb_ili9340 driver

This commit adds the fb_ili9340 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ili9325 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:16 +0000 (10:11 +0100)]
staging: fbtft: add fb_ili9325 driver

This commit adds the fb_ili9325 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_ili9320 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:15 +0000 (10:11 +0100)]
staging: fbtft: add fb_ili9320 driver

This commit adds the fb_ili9320 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_hx8353d driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:14 +0000 (10:11 +0100)]
staging: fbtft: add fb_hx8353d driver

This commit adds the fb_hx8353d driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_hx8347d driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:13 +0000 (10:11 +0100)]
staging: fbtft: add fb_hx8347d driver

This commit adds the fb_hx8347d driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_hx8340bn driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:12 +0000 (10:11 +0100)]
staging: fbtft: add fb_hx8340bn driver

This commit adds the fb_hx8340bn driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_bd663474 driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:11 +0000 (10:11 +0100)]
staging: fbtft: add fb_bd663474 driver

This commit adds the fb_bd663474 driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: add fb_agm1264k-fl driver
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:10 +0000 (10:11 +0100)]
staging: fbtft: add fb_agm1264k-fl driver

This commit adds the fb_agm1264k-fl driver from the fbtft project at
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: core support
Thomas Petazzoni [Wed, 31 Dec 2014 09:11:09 +0000 (10:11 +0100)]
staging: fbtft: core support

This commit adds the core fbtft framework from
https://github.com/notro/fbtft.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Noralf Tronnes <notro@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: mt29f_spinand: Fix typo in Kconfig
Masanari Iida [Thu, 15 Jan 2015 10:47:24 +0000 (19:47 +0900)]
staging: mt29f_spinand: Fix typo in Kconfig

This patch fix a spelling typo in Kconfig.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: davinci_vpfe: fix space prohibited before semicolon warning
Aya Mahfouz [Wed, 14 Jan 2015 21:46:49 +0000 (23:46 +0200)]
staging: davinci_vpfe: fix space prohibited before semicolon warning

This patch fixes the following checkpatch.pl warning:

space prohibited before semicolon

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: remove space after casts
Fabian Holler [Wed, 7 Jan 2015 09:39:54 +0000 (10:39 +0100)]
staging: android: remove space after casts

This patch fixes the following checkpatch.pl warnings:
ashmem.c:753: CHECK:SPACING: No space is necessary after a cast
ashmem.c:756: CHECK:SPACING: No space is necessary after a cast
ashmem.c:777: CHECK:SPACING: No space is necessary after a cast

Signed-off-by: Fabian Holler <fabian.holler@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: remove blank lines after open braces
Fabian Holler [Wed, 7 Jan 2015 09:39:53 +0000 (10:39 +0100)]
staging: android: remove blank lines after open braces

This patch fixes the following checkpatch.pl warnings:
ashmem.c:552: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
ashmem.c:801: CHECK:BRACES: Blank lines aren't necessary after an open brace

Signed-off-by: Fabian Holler <fabian.holler@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: fix indentation to match open parenthesis
Fabian Holler [Wed, 7 Jan 2015 09:39:52 +0000 (10:39 +0100)]
staging: android: fix indentation to match open parenthesis

This patches fixes the following checkpatch.pl warning:
ashmem.c:450: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis

Signed-off-by: Fabian Holler <fabian.holler@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: android: Correct coding style in logger.c
Guillaume Vercoutere [Mon, 5 Jan 2015 14:24:06 +0000 (15:24 +0100)]
staging: android: Correct coding style in logger.c

Correct intent and missing space

Signed-off-by: Guillaume Vercoutere <gvercoutere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: android: fix line length coding style issue in sync_debug.c
Steve Pennington [Wed, 24 Dec 2014 15:33:02 +0000 (09:33 -0600)]
Staging: android: fix line length coding style issue in sync_debug.c

This is a patch to sync_debug.c that fixes an over 80 character warning found by the checkpatch.pl tool
Signed-off-by: Steve Pennington <sgpenn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging:board: remove unnecessary function
Tsung-Han Lin [Wed, 17 Dec 2014 18:33:24 +0000 (02:33 +0800)]
staging:board: remove unnecessary function

Remove the unnecessary 'of_can_translate_address',
which is already removed in commit
d9c6866be8a145e32da616d8dcbae806032d75b5 ("of: kill off
of_can_translate_address").

Signed-off-by: Tsung-Han Lin <tsunghan.tw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: virtpci: Remove no-op suspend/resume functions
Lars-Peter Clausen [Sun, 11 Jan 2015 20:01:27 +0000 (21:01 +0100)]
staging: virtpci: Remove no-op suspend/resume functions

The virtpci bus driver still uses the legacy suspend/resume callbacks. In
their current implementation these callbacks only contain a macro that
always expands to 'do { } while(0)'. So instead of converting them to dev PM
ops just remove them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ion: always initialize the free list parameters
Mitchel Humpherys [Fri, 9 Jan 2015 01:24:27 +0000 (17:24 -0800)]
staging: ion: always initialize the free list parameters

Currently we initialize the heap free_lock and free list size in
ion_heap_init_deferred_free, which is only called when the
ION_HEAP_FLAG_DEFER_FREE heap flag is given.  However, the lock and size
are used in the shrinker path as well as the deferred free path, and we
can register a shrinker *without* enabling deferred freeing.  So, if a
heap provides a shrinker but *doesn't* set the DEFER_FREE flag we will
use these parameters uninitialized (resulting in a spinlock bug and
broken shrinker accounting).

Fix these problems by initializing the free list parameters directly in
ion_device_add_heap, which is always called no matter which heap
features are being used.

Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: xgifb: remove unnecessary check
Sudip Mukherjee [Wed, 31 Dec 2014 11:27:46 +0000 (16:57 +0530)]
staging: xgifb: remove unnecessary check

the check for htotal and vtotal is not required as we have already
checked for them and returned -EINVAL if any of them is zero.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ion: ion_cma_heap: remove ion_cma_get_sgtable
Zeng Tao [Tue, 9 Dec 2014 01:19:40 +0000 (09:19 +0800)]
staging: ion: ion_cma_heap: remove ion_cma_get_sgtable

Remove the temporary code ion_cma_get_sgtable,
use dma_common_get_sgtable instead

Signed-off-by: Zeng Tao <prime.zeng@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: mt29f_spinand: check for the return value of spinand_read_status
Devendra Naga [Fri, 5 Dec 2014 20:34:27 +0000 (15:34 -0500)]
staging: mt29f_spinand: check for the return value of spinand_read_status

The spinan_read_status can fail, check for the return value and
fail if the spinand_read_status fails.

Cc: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: speakup: Combine the consecutive string
Panir.Nyan [Wed, 24 Dec 2014 04:07:32 +0000 (04:07 +0000)]
staging: speakup: Combine the consecutive string

Combine the consecutive string

Signed-off-by: Panir Nyan <Panir.Nyan@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: speakup: Split the comment to fit the length
Panir.Nyan [Wed, 24 Dec 2014 04:07:31 +0000 (04:07 +0000)]
staging: speakup: Split the comment to fit the length

Split the comment to fit the length.

Signed-off-by: Panir Nyan <Panir.Nyan@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: Fix comment in prism2sta.c
Masanari Iida [Sun, 30 Nov 2014 15:29:01 +0000 (00:29 +0900)]
staging: wlan-ng: Fix comment in prism2sta.c

This patch fix a spelling typo and modify a comment.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: Fix typo in comments and printk
Masanari Iida [Sun, 30 Nov 2014 15:29:00 +0000 (00:29 +0900)]
staging: wlan-ng: Fix typo in comments and printk

This patch fix spelling typo in comments and print.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wlan-ng: hfa384x_usb: fixed an 'else' statement coding style issue
Eduardo Barretto [Sat, 20 Dec 2014 01:34:33 +0000 (23:34 -0200)]
Staging: wlan-ng: hfa384x_usb: fixed an 'else' statement coding style issue

Removed useless 'else' statement that followed an 'if' statement that
had a return 1 and moved all the content from the 'else' to outside of
the switch case, this way if any case is sufficient it returns '1',
otherwise it will return 0.

Signed-off-by: Eduardo Barretto <edusbarretto@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: use gotos for handling error in dgap_remap()
Daeseok Youn [Fri, 26 Dec 2014 01:34:32 +0000 (10:34 +0900)]
staging: dgap: use gotos for handling error in dgap_remap()

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rts5208/ms.c: Code style fix (space before comma)
Robert Kmiec [Sun, 4 Jan 2015 00:32:07 +0000 (01:32 +0100)]
staging: rts5208/ms.c: Code style fix (space before comma)

This commit fixes the following errors reported by checkpatch.pl -f:
./rts5208/ms.c:1294: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1345: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1622: ERROR: space prohibited before that ',' (ctx:WxW)
./rts5208/ms.c:1991: ERROR: space prohibited before that ',' (ctx:WxW)

This patch also adds missing spaces before and after '+' sign in two places.

This file has some other style issues and they will be fixed with latter
patches.

Signed-off-by: Robert Kmiec <robert.r.kmiec@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: clocking-wizard: Handle invalid clk in notifier
Soren Brinkmann [Mon, 5 Jan 2015 17:21:29 +0000 (09:21 -0800)]
staging: clocking-wizard: Handle invalid clk in notifier

Even though it should never happen, handle the case that the clock
notifier is called with an unexpected clock handle. This avoids the
compiler warning:
   drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c: In function 'clk_wzrd_clk_notifier':
>> drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c:99:6: warning: 'max' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (ndata->new_rate > max)
         ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoClocking-wizard: Fixed missing blank line warning
Athira Lekshmi [Sun, 7 Dec 2014 09:05:00 +0000 (14:35 +0530)]
Clocking-wizard: Fixed missing blank line warning

Added a new line after declaration to remove the warning
'Missing a blank line after declarations'

Signed-off-by: Athira Lekshmi <andnlnbn18@gmail.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agocptm1217: check if interrupts are masked at probe
Devendra Naga [Fri, 2 Jan 2015 18:17:06 +0000 (13:17 -0500)]
cptm1217: check if interrupts are masked at probe

the function cp_tm1217_mask_interrupt can return failure.
added the check and the failure path.

Cc: Ramesh Agarwal <ramesh.agarwal@intel.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>