Leo Kim [Mon, 21 Dec 2015 05:18:26 +0000 (14:18 +0900)]
staging: wilc1000: wilc_deinit(): fixes inconsistent returns
This patch fixes the warning reported by smatch.
- wilc_deinit() warn: inconsistent returns 'sem:&hif_drv->sem_cfg_values'
This semaphore protect a cfg_values variable but cfg_values variables was not
used here. So, just remove this line.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Mon, 21 Dec 2015 05:18:25 +0000 (14:18 +0900)]
staging: wilc1000: wilc_init(): fixes inconsistent returns
This patch fixes the warning reported by smatch.
- wilc_init() warn: inconsistent returns 'sem:&hif_drv->sem_cfg_values'
No need to up the sema here since down was not called before get here.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Mon, 21 Dec 2015 05:18:24 +0000 (14:18 +0900)]
staging: wilc1000: fixes potential null dereference 'wid.val'
This patch fixes the error reported by smatch.
- Handle_ListenStateExpired() error: potential null dereference 'wid.val'
If kmalloc failed, referenced to a NULL pointer.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Mon, 21 Dec 2015 05:18:23 +0000 (14:18 +0900)]
staging: wilc1000: replace explicit NULL comparisons with !
This patch replace explicit NULL comparison with ! operator to simplify code.
Reported by checkpatch.pl for Comparison to NULL could be written !XXX" or "XXX".
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:22 +0000 (14:18 +0900)]
staging: wilc1000: linux_wlan_spi.c: fix NULL comparison style
This patch fixes checkpatch CHECK:comparison to NULL could be written "b".
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:21 +0000 (14:18 +0900)]
staging: wilc1000: linux_wlan_spi.c: add a blank
This patch fixes checkpatch warning: missing a blank like after declarations.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:20 +0000 (14:18 +0900)]
staging: wilc1000: linux_wlan_spi.c: remove braces for single statement
This patches fixes checkpatch warning: braces {} are not necessary for single
statement blocks. Remove some comments also.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:19 +0000 (14:18 +0900)]
staging: wilc1000: wilc_sdio_cmd52: return linux error value
This patch changes return value with linux error value, not 1 or 0.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:18 +0000 (14:18 +0900)]
staging: wilc1000: wilc_sdio_cmd53: return linux error value
This patch changes return value with linux error value, not 1 or 0.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:17 +0000 (14:18 +0900)]
staging: wilc1000: linux_wlan_sdio.c: remove braces
This patch fixes checkpatch warning braces{} are not necessary for single
statment blocks.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:16 +0000 (14:18 +0900)]
staging: wilc1000: linux_wlan_sdio.c: fix checkpatch warning line over 80
This patch fixes checkpatch warning line over 80 characters.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:15 +0000 (14:18 +0900)]
staging: wilc1000: remove unused functions
This patch removes unused function pointer hif_sync and hif_clear_int, and
removes it's related functions sdio_clear_int, sdio_sync, wilc_spi_clear_int
and wilc_spi_sync.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:14 +0000 (14:18 +0900)]
staging: wilc1000: remove wilc_debug_func of hif_init
This patch removes wilc_debug_func of hif_init and remove it's related
functions as well because it is not used anymore.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:13 +0000 (14:18 +0900)]
staging: wilc1000: sdio/spi: use device print api instead of custom one
This patch use device print api instead of driver defined print. Remove
varialbe dPrint as well. String "[wilc sdio]" and "[wilc spi]" are also removed
from all the print statment if exist because it shows which device the message
is related to.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:12 +0000 (14:18 +0900)]
staging: wilc1000: move all of wilc_wlan_dev_t to struct wilc
linux_wlan.c and wilc_wlan.c was separated into two part at the beginning
to support various platforms. They are in charge of send/receive control and
packet data, so they will be merged into one file wlan.c later.
First of all, wilc_wlan_dev_t which is used as global variable of wilc_wlan.c
will be moved into struct wilc.
This patch moves all members of wilc_wlan_dev_t to struct wilc and use wilc
instead of g_wlan. Finally remove wilc_wlan_dev_t and g_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:11 +0000 (14:18 +0900)]
staging: wilc1000: remove unused varialbe tx_buffer_offset
This patch removes unused variable tx_buffer_offset of wilc_wlan_dev_t.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:10 +0000 (14:18 +0900)]
staging: wilc1000: remove io_type of wilc_wlan_dev_t
io_type of wilc_wlan_dev_t is unneeded, we can use io_type of struct wilc.
Remove io_type of wilc_wlan_dev_t and use io_type of wilc.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:09 +0000 (14:18 +0900)]
staging: wilc1000: wilc_wlan.c: remove hif_func of wilc_wlan_dev_t
hif_func of wilc_wlan_dev_t is duplicate because we have same struct
wilc_hif_func ops of struct wilc which is available in wilc_wlan.c.
Rename ops of struct wilc with hif_func and remove hif_func of wilc_wlan_dev_t,
and use wilc->hif_func instead of g_wlan.hif_func in all functions.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:08 +0000 (14:18 +0900)]
staging: wilc1000: use kernel define byte order macros
This patch removes define BIG_ENDIAN and use kernel define byte order macros
instead of swap itself. Remove unused BYTE_SWAP macro and __CHECK_ENDIAN__
in Makefile also.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:07 +0000 (14:18 +0900)]
staging: wilc1000: rename index to tcp_pending_ack_idx
This patch renames "index" of struct txq_entry_t to tcp_pending_ack_idx
since this name could be confused index of txq_entry_t. It is index of
tcp pending ack.
It fixes
8e55639d066f ("staging: wilc1000: rename tcp_PendingAck_index
of struct txq_entry_t")
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:06 +0000 (14:18 +0900)]
staging: wilc1000: remove wilc memory allocation config
This patch remove memory allocation options in Kconfig. It was used a long time
ago to aquire memory, which we will not use this config anymore.
Remove it's config, related define and codes as well. We will take
PREALLOCATE_AT_LOADING_DRIVER as it is default.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Mon, 21 Dec 2015 05:18:05 +0000 (14:18 +0900)]
staging: wilc1000: remove define COMPLEMENT_BOOT
This patch removes define COMPLEMENT_BOOT in Makefile. The feature was removed
by commit
b46d68825c2d ('staging: wilc1000: remove COMPLEMENT_BOOT') but
the define was not removed. So remove completely.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:26 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: rename pci171x_ai_*()
Rename these functions so they have namespace associated with the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:25 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: rename pci171x_ai_{cmd,cmdtest}()
Rename these functions so they have namespace associated with the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:24 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: fix ai (*insn_read)
An (*insn_read) can only happen if the subdevice is in a non-busy state,
i.e. an async command is not running. The board reset and subdevice
(*cancel) will ensure that the control bits (devpriv->ctrl) are already
cleared.
The (*insn_read) only needs to enable the software trigger before reading
samples. It should also disable the software trigger when done. Fix the
(*insn_read) to do this.
For aesthetics, rename the function so it has namespace associated with
the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:23 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: fix counter 0 internal clock source
There are a number of descrepencies in the various manuals for the boards
that this driver supports. Some show a 10 MHz clock for counters 1 and 2
others show a 1 MHz clock. Counter 0 can use either a div 10 of that clock
or an external clock (up to 10 MHz).
Currently this driver initializes counters 1 and 2 with a 10 MHz clock.
For consistency, return 1 MHz (10 MHz/10) for counter 0 when the user
queries the internal clock source with INSN_CONFIG_GET_CLOCK_SRC.
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 [Fri, 13 Nov 2015 18:11:22 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: tidy up pci1710_reset()
Change the return type to void, this function always succeeds and the
caller does not check the return value anyway.
Fix the initial programming of the control register. The SW bit enables
the software trigger and should not be set here. Setting CNT0 selects the
external clock source for counter 0 (the user counter). It makes more
sense to select the internal 1 MHz clock.
Remove the unnecessary initialization of the private data members. This
function is only called during the (*auto_attach) after the private
data was kzalloc'ed.
Remove the redundant clearing of the A/D FIFO and pending interrupts.
Just do it once.
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 [Fri, 13 Nov 2015 18:11:21 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: ai (*cancel) should not enable software trigger
The (*cancel) operation should do just that. Remove the setting of the SW bit
which enables the software trigger.
For aesthetics, rename the function so it has namespace associated with the
driver and add a couple 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>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:20 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: post increment 'subdev' in (*auto_attach)
For aesthetics, post-increment the 'subdev' index when used to get a
comedi_subdevice pointer instead of incrementing it after the subdevice
is initialized.
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 [Fri, 13 Nov 2015 18:11:19 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: tidy up analog input subdev_flags
Remove the SDF_COMMON flag, the analog reference is not programmable and
the default aref (AREF_GROUND -> SDF_GROUND) provides adequate information
about the reference.
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 [Fri, 13 Nov 2015 18:11:18 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: tidy up analog output subdev_flags
Remove the SDF_COMMON flag, the analog reference is not programmable and
the default aref (AREF_GROUND -> SDF_GROUND) provides adequate information
about the reference.
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 [Fri, 13 Nov 2015 18:11:17 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: support external analog output reference
The analog outputs can use an external reference to create the D/A output
range. Add an entry to the comedi_lrange table for it and modify the
(*insn_write) to support it.
Note that the D/A output range is 0 to +Vref with a -Vref. The comedi_lrange
does not include the sign of the range. It simmply allows the user to convert
between the 12-bit samples values (0x0000 - 0x0fff) and a physical value (0.0
to 1.0) using the comedilib comedi_to_phys() and comedi_from_phys() functions.
A physical value of 0.0 would actually be 0V with a -Vref and -V with a +Vref
and 1.0 would be +V with a -Vref and 0V with a -Vref. Ths user will need to
work this out but at least they can now use the external reference.
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 [Fri, 13 Nov 2015 18:11:16 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: rename pci171x_ao_insn_write()
Rename this function so it has namespace associated with the driver.
For aesthetics, move the function so it is located in the middle of
the analog input support functions.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:15 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: rename pci171x_d[io]_insn_bits
Rename these functions so they have namespace associated with the driver.
For aesthetics, move the functions so they are not located in the middle
of the analog input/output support functions.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:14 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: rename pci171x_insn_counter_config()
Rename this function so it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:13 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: rename interrupt_service_pci1710()
Rename this function so it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:12 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: tidy up boardinfo definition
Remove the unnecessary comments and rename the 'rangelist_ai' member for
aesthetics.
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 [Fri, 13 Nov 2015 18:11:11 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: remove 'has_large_fifo' and 'has_diff_ai' boardinfo
The pci1711/31 boards are the only ones that have a smaller FIFO (1K vs 4K) and
single-ended analog inputs (no differential).
Replace the 'has_large_fifo' and 'has_diff_ai' members of the boardinfo with
'is_pci1711' and use that to determine how to initialize the analog input
subdev_flags as well as the private data 'max_samples'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:10 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: remove 'has_di_do' boardinfo
This member of the boardinfo isn't really necessary. All the boards
except the pci1713 have 16 digital inputs and 16 digital outputs.
There is already a 'is_pci1713' member in the boardinfo so that can
be used to determine the subdevices for the digital inputs and outputs
need to be allocated and initialized.
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 [Fri, 13 Nov 2015 18:11:09 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: remove 'n_aichan' boardinfo
This member of the boardinfo isn't really necessary. All the boards
have analog inputs, the pci1713 has 32 channels the rest have 16
channels.
There is already a 'is_pci1713' member in the boardinfo so that can
be used to determine the number of channels for the analog input
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>
H Hartley Sweeten [Fri, 13 Nov 2015 18:11:08 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: define the mux control register bits
For aesthetics, define some macros to set the bits in the mux control
register. Also, rename the 'mux_ext' member of the private data.
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 [Fri, 13 Nov 2015 18:11:07 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: refactor ai range programming
The gain codes used to program the analog output range are currently
stored in const char arrays. The values look a bit "magic" and it's
not clear how they associate with the comedi_lrange without looking
through user manuals.
Refactor the ai range programming to clarify the driver and remove
the magic numbers. Also, refine the bits in the range register that
set the differential and unipolar modes.
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 [Fri, 13 Nov 2015 18:11:06 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: don't "reset" board when detaching
Currently this driver calls pci1710_reset() during the (*detach) of
the driver. That function does the following:
1) program the control register to stop any operations
2) clears the analog input FIFO
3) clears any pending interrupts
4) sets all the analog output channels to unipolar 5V range and 0V output
5) sets all the digital outputs to 0V
Before detaching the comedi core will (*cancel) any running async commands.
This will handle 1-3 above.
Depending on the application, it might not be safe to reset the analog and
digital outputs when the driver is detached.
Remove the board reset when detaching and just use comedi_pci_detach()
directly for the driver (*detach).
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 [Fri, 13 Nov 2015 18:11:05 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: remove 'has_counter' boardinfo
All the boards supported by this driver have a 8254 counter. Channels
1 and 2 are used to create the cascaded 32-bit analog input pacer.
Counter 0 is available for the user on all the boards except the PCI-1713.
Remove the 'has_counter' boardinfo and use the 'is_pci1713' boardinfo to
determine if the user counter subdevice needs to be allocated and
initialized.
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 [Fri, 13 Nov 2015 18:11:04 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: remove 'has_irq' boardinfo
All the boards supported by this driver can use an interrupt. 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>
H Hartley Sweeten [Fri, 13 Nov 2015 19:39:26 +0000 (12:39 -0700)]
staging: comedi: adv_pci_dio: separate out PCI-1760 support
The PCI-1760 is board unique. It uses an outgoing/incoming mailbox
programming sequence to access the hardware. The other boards supported
by this driver use simple register mapping. Including support for the
PCI-1760 in this driver just makes it harder to understand.
Separate out the PCI-1760 support into a new driver, adv_pci1760.
Clean up the new driver. The original code had a bunch of CamelCase and
other checkpatch.pl issues.
The code used to access the outgoing/incoming mailboxes was also a bit
awkward with the passing of the arrays for the outgoing and incoming
mailbox bytes. Replace them with two new functions that send a command
and return the feedback data from the command based on the programming
flow chart in the datasheet for the PCI-1760.
The new adv_pci1760 driver also fixes the incomplete timer subdevice.
This subdevice is actually the 2 PWM outputs so the subdevice type
has been changed to COMEDI_SUBD_PWM.
The counter subdevice support was not complete in the original code.
They are also a bit strange since they are up counters connected to
each of the digital inputs. For now that subdevice has been disabled
(COMEDI_SUBD_UNUSED).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mario J. Rugiero [Thu, 3 Dec 2015 16:24:05 +0000 (13:24 -0300)]
staging: wilc1000: replace 'ptr > 0' check by 'ptr' check.
This silences a sparse warning about incompatible comparisons, while making the
intent of the check a bit clearer.
Signed-off-by: Mario J. Rugiero <mrugiero@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Masanari Iida [Mon, 23 Nov 2015 13:41:17 +0000 (22:41 +0900)]
staging: wilc1000: Fix typo in wilc_msgqueue.h
This patch fix some spelling typo in wilc_msgqueue.h
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bogicevic Sasa [Wed, 18 Nov 2015 11:45:05 +0000 (12:45 +0100)]
drivers:staging:wilc1000 Fix all comparison to NULL could be written ...
This fixes all "comparison to NULL could be written like ..."
Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chandra S Gorentla [Sun, 15 Nov 2015 04:06:58 +0000 (09:36 +0530)]
staging: wilc1000: Remove 'if' statement, which is always false
- 'if' which is always false is removed
- variable associated with this 'if' is deleted
Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Fri, 18 Dec 2015 09:26:02 +0000 (18:26 +0900)]
staging: wilc1000: fix a bug when unload driver
kernel crashes when load and unload driver several times. I used git bisect to
track down and found that removing NULL setting caused the panic.
This reverts only related codes of the patch(
a4ab1ade75a3).
Fixes: a4ab1ade75a3 ("staging: wilc1000: replace drvHandler and hWFIDrv with hif_drv")
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Wed, 25 Nov 2015 02:59:49 +0000 (11:59 +0900)]
staging: wilc1000: Handle_SetMulticastFilter(): fixes right shifting more than type allows
This patch fixes the warning reported by smatch.
- Handle_SetMulticastFilter() warn: right shifting more than type allows
That is unnecessary action of boolean type. just assign 0.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Wed, 25 Nov 2015 02:59:48 +0000 (11:59 +0900)]
staging: wilc1000: change if with else if
The if statement should be else if since it is part of whole if condition.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Wed, 25 Nov 2015 02:59:47 +0000 (11:59 +0900)]
staging: wilc1000: Handle_AddBASession: remove unused function
This patch removes unused a function Handle_AddBASession.
And, removes the relation define.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Wed, 25 Nov 2015 02:59:42 +0000 (11:59 +0900)]
staging: wilc1000: fixes blank lines aren't necessary brace
This patch fixes the checks reported by checkpatch.pl
for Blank lines aren't necessary after an open brace '{' and
Blank lines aren't necessary before a close brace '}'.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Wed, 25 Nov 2015 02:59:41 +0000 (11:59 +0900)]
staging: wilc1000: wilc_wfi_cfgoperations.c: remove over-commenting
There are over-commenting in the wilc_wfi_cfgoperations.c file and most of them
are not helpful to explain what the code does and generate 80 ending
line over warnings. So, all of comments are removed in this patch and the
comments will later be added if necessary with the preferred Linux style.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 25 Nov 2015 02:59:40 +0000 (11:59 +0900)]
staging: wilc1000: fix rmmod failure
This patch fixes rmmod failure. wilc->firmware needs to be set to NULL because
it is used again to check firmware is released when module exit.
Fixes: 8b8ad7bc90bc ("staging: wilc1000: rename wilc_firmware in the struct wilc")
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Fri, 20 Nov 2015 07:56:32 +0000 (16:56 +0900)]
staging: wilc1000: return linux error value
Return proper linux error value -ETIMEDOUT instead of -1.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Fri, 20 Nov 2015 07:56:31 +0000 (16:56 +0900)]
staging: wilc1000: remove unused variable
wilc_sdio_func is not used anymore so just delete it.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:35 +0000 (15:56 +0900)]
staging: wilc1000: rename pstrNetworkInfo in get_rssi_avg function
This patch renames pstrNetworkInfo to network_info that is
first argument of get_rssi_avg function to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:34 +0000 (15:56 +0900)]
staging: wilc1000: rename pJoinParams in CfgScanResult function
This patch renames pJoinParams to join_params that is
fourth argument of CfgScanResult function to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:33 +0000 (15:56 +0900)]
staging: wilc1000: rename pUserVoid in CfgScanResult function
This patch renames pUserVoid to user_void that is
third argument of CfgScanResult function to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:32 +0000 (15:56 +0900)]
staging: wilc1000: rename pstrNetworkInfo in CfgScanResult function
This patch renames pstrNetworkInfo to network_info that is
second argument of CfgScanResult function to avoid camelcase.
And, remove the relation comment.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:31 +0000 (15:56 +0900)]
staging: wilc1000: rename enuScanEvent in CfgScanResult function
This patch renames enuScanEvent to scan_event that is
first argument of CfgScanResult function to avoid camelcase.
And, remove the relation comment.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:30 +0000 (15:56 +0900)]
staging: wilc1000: rename pUserVoid in add_network_to_shadow function
This patch renames pUserVoid to user_void that is
second argument of add_network_to_shadow function to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:29 +0000 (15:56 +0900)]
staging: wilc1000: rename pUserVoid in is_network_in_shadow function
This patch renames pUserVoid to user_void that is
second argument of is_network_in_shadow function to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:28 +0000 (15:56 +0900)]
staging: wilc1000: update_scan_time: remove unused argument
This patch removes pUserVoid that is first argument of
update_scan_time function because it is not used in this function.
Remove argument in the function call also.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:27 +0000 (15:56 +0900)]
staging: wilc1000: reset_shadow_found: remove unused argument
This patch removes pUserVoid that is first argument of
reset_shadow_found function because it is not used in this function.
Remove argument in the function call also.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:26 +0000 (15:56 +0900)]
staging: wilc1000: rename s32Freq variable
This patch renames s32Freq variable to freq to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:25 +0000 (15:56 +0900)]
staging: wilc1000: rename pstrNetworkInfo variable
This patch renames pstrNetworkInfo variable to network_info
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:24 +0000 (15:56 +0900)]
staging: wilc1000: rename bDirectScan in refresh_scan function
This patch renames bDirectScan to direct_scan that is
third argument of refresh_scan function to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:23 +0000 (15:56 +0900)]
staging: wilc1000: rename pUserVoid in refresh_scan function
This patch renames pUserVoid to user_void that is
first argument of refresh_scan function to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:22 +0000 (15:56 +0900)]
staging: wilc1000: clear_shadow_scan: remove unused argument
This patch removes pUserVoid that is first argument of
clear_shadow_scan function because it is not used in this function.
Remove argument in the function call also.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:21 +0000 (15:56 +0900)]
staging: wilc1000: rename wilc_connected_SSID variable
This patch renames wilc_connected_SSID variable to wilc_connected_ssid
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:20 +0000 (15:56 +0900)]
staging: wilc1000: rename duringIP_TIME variable
This patch renames duringIP_TIME variable to during_ip_time
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:19 +0000 (15:56 +0900)]
staging: wilc1000: rename bWilc_ie variable
This patch renames bWilc_ie variable to wilc_ie to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:18 +0000 (15:56 +0900)]
staging: wilc1000: rename u8P2P_vendorspec variable
This patch renames u8P2P_vendorspec variable to p2p_vendor_spec
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:17 +0000 (15:56 +0900)]
staging: wilc1000: rename u8P2Precvrandom variable
This patch renames u8P2Precvrandom variable to p2p_recv_random
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:16 +0000 (15:56 +0900)]
staging: wilc1000: rename u8P2Plocalrandom variable
This patch renames u8P2Plocalrandom variable to p2p_local_random
to avoid camelcase.
And, remove the relation comment.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:15 +0000 (15:56 +0900)]
staging: wilc1000: rename u8P2P_oui variable
This patch renames u8P2P_oui variable to p2p_oui to avoid camelcase.
And, remove the relation comment.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:14 +0000 (15:56 +0900)]
staging: wilc1000: rename u8WLANChannel variable
This patch renames u8WLANChannel variable to wlan_channel to avoid camelcase.
And, remove the relation comment.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:13 +0000 (15:56 +0900)]
staging: wilc1000: rename WILC_WFI_rates variable
This patch renames WILC_WFI_rates variable to ieee80211_bitrates
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:12 +0000 (15:56 +0900)]
staging: wilc1000: rename WILC_WFI_2ghz_channels variable
This patch renames WILC_WFI_2ghz_channels variable to ieee80211_2ghz_channels
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:11 +0000 (15:56 +0900)]
staging: wilc1000: rename astrLastScannedNtwrksShadow variable
This patch renames astrLastScannedNtwrksShadow variable to last_scanned_shadow
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 19 Nov 2015 06:56:10 +0000 (15:56 +0900)]
staging: wilc1000: rename u32LastScannedNtwrksCountShadow variable
This patch renames u32LastScannedNtwrksCountShadow variable to last_scanned_cnt
to avoid camelcase.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:37 +0000 (15:11 +0900)]
staging: wilc1000: use wilc instead of wilc_dev and remove wilc_dev
This patch changes wilc_dev with wilc in the function call
wilc_wlan_get_num_conn_ifcs, and remove wilc_dev and it's related codes.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:36 +0000 (15:11 +0900)]
staging: wilc1000: wilc_dbg: remove wilc
This patch remove parameter struct wilc since it is not used and also wilc_dev
will be removed.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:35 +0000 (15:11 +0900)]
staging: wilc1000: wilc_wlan_cfg_get: pass struct wilc
This patch passes the struct wilc to the function and use it instead of
global variable wilc_dev.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:34 +0000 (15:11 +0900)]
staging: wilc1000: wilc_wlan_cfg_set: pass struct wilc
This patch pass struct wilc to the function and use it instead of global
variable wilc_dev.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:33 +0000 (15:11 +0900)]
staging: wilc1000: wilc_send_config_pkt: pass struct wilc
This patch passes struct wilc to wilc_send_config_pkt. The function
wilc_wlan_cfg_set and wilc_wlan_cfg_get function will get wilc to replace
wilc_dev with it.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:32 +0000 (15:11 +0900)]
staging: wilc1000: add struct wilc to host_if_drv
This patch adds struct wilc to host_if_dev and assign wilc to use driver's
primary structure in host_if_dev.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:31 +0000 (15:11 +0900)]
staging: wilc1000: wilc_spi_write_read: pass struct wilc
This patch adds new function parameter struct wilc and use it instead of
global variable wilc_dev, and pass wilc to the function as well.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:30 +0000 (15:11 +0900)]
staging: wilc1000: wilc_spi_read: pass struct wilc
This patch adds new function parameter struct wilc and use it instead of
global variable wilc_dev, and pass wilc to the functions as well.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:29 +0000 (15:11 +0900)]
staging: wilc1000: wilc_spi_write: pass struct wilc
This patch add new function parameter struct wilc and use it instead of
wilc_dev, and pass wilc to the function as well.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:28 +0000 (15:11 +0900)]
staging: wilc1000: wilc_sdio_cmd53: pass struct wilc
This patch adds new function parameter struct wilc and use it instead of
global variable wilc_dev and pass wilc to the function as well.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:27 +0000 (15:11 +0900)]
staging: wilc1000: wilc_sdio_cmd52: pass struct wilc
This patch adds new function parameter struct wilc and use it instead of
wilc_dev. Pass wilc to the function as well.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:26 +0000 (15:11 +0900)]
staging: wilc1000: pass wilc to all function pointers of wilc_hif_func
This patch adds new function parameter struct wilc to all function pointers
of struct wilc_hif_func, and all functions of wilc_sdio.c and wilc_spi.c
need to be changed as it's function pointer is changed.
Pass wilc in all the functions call as well.
The wilc will be passed to functions in linux_wlan_sdio.c and linux_wlan_spi.c
to replace with global variable wilc_dev in the next patch.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:25 +0000 (15:11 +0900)]
staging: wilc1000: pass struct wilc to the functions which use hif_func
This patch passes struct wilc to the functions which use hif_func inside.
The function pointers of wilc_hif_func will pass wilc also in the later
patch. Pass wilc to the functions if necessary.
Flollowings are modified functions.
chip_wakeup
wilc_chip_sleep_manually
chip_allow_sleep
wilc_get_chipid
wilc_unknown_isr_ext
wilc_pllupdate_isr_ext
wilc_sleeptimer_isr_ext
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:24 +0000 (15:11 +0900)]
staging: wilc1000: remove paltform define PLAT_WMS8304
This patch removes PLAT_WMS8304 and it's related codes as well. We will not
use this way of supporting other platform. This will be supported if necessary
by device tree later.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Wed, 18 Nov 2015 06:11:23 +0000 (15:11 +0900)]
staging: wilc1000: remove spi speed control codes
This patch removes spi speed control codes. We are not using define SPEED to
specify speed of spi, it is not proper way of doing this. It will be
provided by the device tree.
The following functions and variable are removed.
MIN_SPEED, MAX_SPEED, SPEED
wilc_spi_set_max_speed
wilc_spi_max_bus_speed
wilc_spi_default_bus_speed
hif_set_max_bus_speed
hif_set_default_bus_speed
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>