staging: comedi: rtd529: usleep_range is preferred over udelay
Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt". `udelay()` is only used in the
firmware upload process. Replace them with `usleep_range()` with a
reasonable upper limit.
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>
Ian Abbott [Wed, 23 Sep 2015 15:33:27 +0000 (16:33 +0100)]
staging: comedi: comedi_fops.c: Tweak kernel-doc for consistency
Adjust the kernel-doc in this file for consistency of capitalization and
punctuation. Make more use of the special kernel-doc markers for
parameter names, constant names, etc. Use the correct kernel-doc tag
for the return values sections.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 21 Sep 2015 17:52:48 +0000 (18:52 +0100)]
staging: comedi: comedidev.h: tweak kernel-doc for struct comedi_async
Tweak the formatting of the kernel-doc formatted comment for `struct
comedi_async` in order to stop it generating bogus headings for text
before a colon.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 21 Sep 2015 17:52:47 +0000 (18:52 +0100)]
staging: comedi: comedidev.h: use enum for COMEDI_CB_... constants
The existing constants `COMEDI_CB_EOS` etc. are in the form of macros
and have a bogus kernel-doc comment. Change them to `enum` constants so
they can be documented properly with kernel-doc.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add missing kernel-doc to the low-level COMEDI driver API functions
exported from "drivers.c" and tart up some of the existing kernel-doc
comments for consistency.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Comedi's "drivers.c" doesn't use anything from `<linux/dma-mapping.h>`,
but it does use `DMA_NONE` from `<linux/dma-direction.h>`, so replace
the appropriate `#include` directive.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:58 +0000 (17:18 +0200)]
staging: most: fix pcm_write input/output error
This patch keeps the process from sleeping after the PCM middle layer has
stopped playback by calling the pcm trigger callback. The patch is needed
to prevent aplay from causing a pcm_write Input/Output error.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:57 +0000 (17:18 +0200)]
staging: most: add poll syscall to AIM cdev
This patch adds the implementation of the poll syscall to the AIM cdev.
To have the full functionality, a helper function is needed in the
core module to retrieve the instantaneous availability of tx buffers.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:53 +0000 (17:18 +0200)]
staging: most: rename function
This patch renames the function audio_set_pcm_format(). Since the
function doesn't only set the PCM format anymore and to guard against
misunderstandings, its name needs to be changed.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:49 +0000 (17:18 +0200)]
staging: most: make hardware parameters channel exclusive
Since the PCM interface's hardware parameters are channel/substream
exclusive, the struct snd_pcm_hardware needs to be embedded in the
channel structure.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:47 +0000 (17:18 +0200)]
staging: most: add multi channel support to sound AIM
This patch adds 5.1 surround configuration with subbuffer cross-check,
when establishing a link to the core. For the sake of simplicity, only
one specific channel configuration is allowed.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:46 +0000 (17:18 +0200)]
staging: most: refactor channel structure
The struct most_c_obj has the same set of attributes for each of two AIMs.
This patch cleans up the code by introducing the new struct most_c_aim_obj
hat contains those fields.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Mon, 28 Sep 2015 15:18:45 +0000 (17:18 +0200)]
staging: most: add fair buffer distribution
This patch ensures a fair distribution of buffers, when two AIMs share a
single channel. The AIMs then won't be able to use more than half of all
pre-allocated buffers of the linked channel. However, in case the channel
is not shared, the AIM can exclusively use all available buffers.
Christian Gromm [Mon, 28 Sep 2015 15:18:44 +0000 (17:18 +0200)]
staging: most: consolidate code
The function drci_rd_reg() always delivers little endian representation of
the 16-bit DCI register. The value returned by this function must always be
carefully converted from __le16 to u16 type. This patch moves all those
conversions to the function itself.
Christian Gromm [Mon, 28 Sep 2015 15:18:40 +0000 (17:18 +0200)]
staging: most: fix buffer size for DIM2
This patch reduces the DBR buffer size to prevent an overflow in the DIM2
module. It is needed, because the MediaLB hardware has problems with DBR
buffers that exceed the size of 255 messages.
Christian Gromm [Mon, 28 Sep 2015 15:18:32 +0000 (17:18 +0200)]
staging: most: fix race condition in AIM networking
If the network device is being opened right after it has been registered
via function register_netdev(), the device state is not yet consistent in
the context of function ndo_open(). This patch cares about having the
initialization done right, before the networking device is registered.
Christian Gromm [Mon, 28 Sep 2015 15:18:31 +0000 (17:18 +0200)]
staging: most: remove aim reset
This patch partly reverts a modification of function most_stop_channel()
that is trying to reset an established link between an AIM and an HDM in
all suitable places. But since the function most_stop_channel() is
stopping the data transfer it is the wrong place to do so.
Glen Lee [Thu, 24 Sep 2015 09:15:05 +0000 (18:15 +0900)]
staging: wilc1000: remove function pointer os_wait
This patch removes function pointer os_wait which is pointer of
linux_wlan_lock_timeout and just call the real name function directly.
Remove also static from linux_wlan_lock_timeout declaration.
As os_wait is deleted, structure wilc_wlan_os_func_t is useless. Delete
wilc_wlan_os_func_t, os_func 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 [Thu, 24 Sep 2015 09:15:01 +0000 (18:15 +0900)]
staging: wilc1000: remove pointer varialbes of hif_cs
Remove hif_lock and hif_critical_section which are pointer of
g_linux_wlan->hif_cs. Remove also it's related codes.
Just use mutex varialbe g_linux_wlan->hif_cs.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:15:00 +0000 (18:15 +0900)]
staging: wilc1000: remove pointer variables of txq_add_to_head_cs
This patch removes txq_add_to_head_critical_section and txq_add_to_head_lock
which are pointer of g_linux_wlan->txq_add_to_head_cs.
Just use g_linux_wlan->txq_add_to_head_cs as argument of function.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:59 +0000 (18:14 +0900)]
staging: wilc1000: remove pointer varialbe cfg_wait and cfg_wait_event
This patch removes cfg_wait and cfg_wait_event which are pointer of
g_linux_wlan->cfg_event. No need to have pointer varialbe of it. Just use
g_linux_wlan->cfg_event.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:58 +0000 (18:14 +0900)]
staging: wilc1000: remove pointer variable of g_linux_wlan->txq_event
Remove variable txq_wait and txq_wait_event which are pointer varialbe
of g_linux_wlan->txq_event. No need to have extra pointer varialbe. Just use
g_linux_wlan->txq_event. Remove os_context.txq_wait_event, txq_wait 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 [Thu, 24 Sep 2015 09:14:57 +0000 (18:14 +0900)]
staging: wilc1000: use g_linux_wlan->rxq_cs for function arguemnt
Use mutex variable g_linux_wlan->rxq_cs instead of pointer varialbe.
No need to make extra pointer variable for the mutex. Remove
rxq_critical_section, rxq_lock 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 [Thu, 24 Sep 2015 09:14:56 +0000 (18:14 +0900)]
staging: wilc1000: use g_linux_wlan->txq_spinlock not the pointer of it
Use spinlock variable g_linux_wlan->txq_spinlock itself instead of
g_wlan.txq_spinlock which is pointer of g_linux_wlan->txq_spinlock.
Delete os_context.txq_spin_lock, g_wlan.txq_spinlock 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 [Thu, 24 Sep 2015 09:14:54 +0000 (18:14 +0900)]
staging: wilc1000: remove function pointer rx_complete
just call the function linux_wlan_rx_complete directly. No need for a pointer
to the functions. Remove rx_complete, wilc_wlan_net_func_t and net_func which
are not used anymore.
Finally remove static from the function linux_wlan_rx_complete.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 24 Sep 2015 09:14:53 +0000 (18:14 +0900)]
staging: wilc1000: remove function pointer mac_indicate
No need for a pointer to a function. Just call linux_wlan_mac_indicate.
Remove mac_indicate and also wilc_wlan_indicate_func_t since no members in it.
Variable indicate_func is not used so delete it and related codes.
Finally remove static from the function linux_wlan_mac_indicate.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>