aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/most (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-05-14staging: most: video: fix build warningsGreg Kroah-Hartman1-9/+0
Commit 7d7cdb4fa552 ("staging: most: video: remove debugging code") ended up adding a bunch of build warnings about unused variables. Fix that up by removing those variables as we don't need them anymore. Cc: Abdun Nihaal <abdun.nihaal@gmail.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: 7d7cdb4fa552 ("staging: most: video: remove debugging code") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-11staging: most: video: remove debugging codeAbdun Nihaal1-23/+0
This patch removes debugging code in video.c that causes the following checkpatch warning: WARNING: Prefer using '\"%s...\", __func__' to using function's name in a string Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: usb: remove local variableChristian Gromm1-5/+4
This patch removes the local variable dev that is used to store the pointer to the usb_device whenever it is used only once. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: usb: fix usb_disconnect race conditionChristian Gromm1-6/+13
The functions usb_disconnect and usb_sndbulkpipe are racing for the struct usb_device, which might cause a null pointer dereference exception. This patch fixes this race condition by protecting the critical section inside the function hdm_enque with the io_mutex. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: usb: don't set URB_ZERO_PACKET flag for synchronous dataChristian Gromm1-1/+2
This patch avoids setting the URB_ZERO_PACKET transfer flag for synchronous data. This is needed to prevent the host from sending an empty packet when data is aligned to an endpoint packet boundary. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: dim2: use device to allocate coherent memoryChristian Gromm1-2/+7
On several architectures the allocation of coherent memory needs a device that has the dma_ops structure properly initialized. This patch enables the DIM2 platform to be used to allocate this type of memory. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: dim2: read clock speed from the deviceChristian Gromm1-1/+49
This patch implemets reading of the clock speed from DT. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: dim2: use device treeChristian Gromm3-52/+196
This patch removes the dependency to platform specific source files that do platform specific initialization and supply the IRQ number. Instead DT code is added Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: cdev: fix race conditionChristian Gromm1-2/+4
This patch fixes a race condition between the functions disconnect and poll. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: dim2: fix startup sequenceChristian Gromm1-51/+39
Platform specific initialization (data->init) has to be done before calling dim_startup to start the DIM2 IP. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: cdev: fix function return valueChristian Gromm1-1/+1
The function ch_get_mbo declares its return value as type bool, but returns a pointer to mbo. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: usb: add ep number to logChristian Gromm1-3/+6
This patch adds the endpoint number of the USB pipe that reports to be broken into the log message. It is needed to make debugging for applications more comfortable. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: cdev: fix chrdev_region leakChristian Gromm1-2/+4
The function unregister_chrdev_region is called with a different counter as the alloc_chrdev_region. To fix this, this patch introduces the constant CHRDEV_REGION_SIZE that is used in both functions. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: cdev: avoid warning about potentially uninitialized variableChristian Gromm1-1/+1
This patch avoids the warning that the pointer mbo might be used uninitialized that some environmens throw. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: sound: call snd_card_new with struct deviceChristian Gromm3-1/+3
This patch is needed as function snd_card_new needs a valid parent device. Passing a NULL pointer leads to kernel Ooops. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: make interface drivers allocate coherent memoryChristian Gromm4-6/+43
On arm64/aarch64 architectures the allocation of coherent memory needs a device that has the dma_ops properly set. That's why the core module of the MOST driver is no longer able to allocate this type or memory. This patch moves the allocation process down to the interface drivers where the proper devices exist (e.g. platform device or USB system software). Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: reduce parameters inconsistencyChristian Gromm1-21/+12
Currently, there are two module parameters for the i2c driver: - polling_req: boolean irq/polling mode; - scan_rate: polling rate, that is used in the case where the polling mode is active This model is misconfiguration-prone. For example, it is possible to select polling mode with the zero polling rate or configure non-zero polling rate in a combination with the IRQ mode. This patch replaces the 'polling_req' and 'scan_rate' by the 'polling_rate', where the value zero means the interrupt driven mode and other values are used as the polling rate in the polling mode. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: remove redundant list_mutexChristian Gromm1-16/+1
The elements of the dev->rx.list are consumed in the pending_rx_work and populated in the function enqueue() that cancels the pending_rx_work. The function enqueue() and poison_channel() do not race anyway. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: remove redundant is_openChristian Gromm1-9/+1
The variable is_open is checked only in the work function pending_rx_work() that is only active between the calls configure_channel() and poison_channel(). Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: trace real polling rateChristian Gromm1-2/+3
The real polling rate depends on the CONFIG_HZ and may differ from the required polling rate. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: prevent zero delay pollingChristian Gromm1-3/+5
This patch avoids that a configured scan_rate of more than MSEC_PER_SEC might result in a polling delay of zero. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: avoid polling in case of misconfigChristian Gromm1-8/+10
This patch prevents the driver from falling back to polling mode in case of IRQ misconfiguration. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: do not wait in work functionChristian Gromm1-33/+21
This patch removes the function wait_event_interruptible from the work function to avoid waiting. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: shorten lifetime of IRQ handlerChristian Gromm1-19/+21
Currently the IRQ handler used for the rx channel lives between the functions i2c_probe and i2c_remove. This patch shortens the lifetime and keeps the handler alive only between the functions configure_channel and poison_channel. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: aim-sound: add flexible format supportChristian Gromm1-59/+62
Currently, the only supported PCM formats are 1x8", "2x16", "2x24", "2x32" or "6x16". This adds support for the format "Nx{8,16,24,32}" that also includes the exotic PCM formats like "4x16", "5x8", etc. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: add channel property dbr_sizeChristian Gromm4-3/+39
This patch adds the channel property dbr_size to control the corresponding buffer size of the channels of the DIM2 interface. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: remove unnecessary poison_channel callChristian Gromm1-5/+0
This removes call of the poison_channel that is: - not allowed after most_deregister_interface; - is made during the most_deregister_interface call. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: i2c: prevent division by zeroChristian Gromm1-1/+1
This prevents division by zero scan_rate. The zero scan_rate does not need any special action as it actually means "never poll again". Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: dim2: remove clock speed processing from the HDMChristian Gromm2-45/+12
This removes the module parameter clock_speed from the HDM code. Instead, the platform-dependent clock speed must be delivered by the platform driver with the help of the dim2_platform_data.clk_speed. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08staging: most: allocate only all requested memoryChristian Gromm1-15/+16
This prohibits the allocation of the memory for the MBOs if only the part of the MBOs, requested by the application, may be allocated. The function arm_mbo_chain, if cannot allocate all requested MBO, frees all prior allocated memory and returns 0. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23Staging: most: Move comments to the end of lineIan Liu Rodrigues1-42/+42
Signed-off-by: Ian Liu Rodrigues <ian.liu88@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-08staging: most: Remove unnecessary usage of BUG_ON().Quytelda Kahja1-3/+0
There is no need for the calls to BUG_ON() in this driver, which are used to check if mbo or mbo->context are NULL; mbo is never NULL, and if mbo->context is NULL it would have already been dereferenced and oopsed before reaching the BUG_ON(). Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Acked-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: most: Indent function parameter.Quytelda Kahja1-1/+2
Indent the parameters for a function call that extends past 80 characters. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06staging: most: Add a blank line.Quytelda Kahja1-0/+1
Use a blank line after components_show() function declaration. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-01staging: most: Fix missing identifier in function definition argument.Quytelda Kahja1-1/+1
The function pointer 'complete' in 'struct mbo' should use an identifier for its argument. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-01staging: most: Remove unnecessary OOM messages.Quytelda Kahja1-2/+0
It isn't necessary for the driver to log out-of-memory errors, so these have been removed and the functions simply return -ENOMEM. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-11vfs: do bulk POLL* -> EPOLL* replacementLinus Torvalds2-3/+3
This is the mindless scripted replacement of kernel use of POLL* variables as described by Al, done by this script: for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'` for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done done with de-mangling cleanups yet to come. NOTE! On almost all architectures, the EPOLL* constants have the same values as the POLL* constants do. But they keyword here is "almost". For various bad reasons they aren't the same, and epoll() doesn't actually work quite correctly in some cases due to this on Sparc et al. The next patch from Al will sort out the final differences, and we should be all done. Scripted-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-02-01Merge tag 'staging-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds46-2840/+2550
Pull staging/IIO updates from Greg KH: "Here is the big Staging and IIO driver patches for 4.16-rc1. There is the normal amount of new IIO drivers added, like all releases. The networking IPX and the ncpfs filesystem are moved into the staging tree, as they are on their way out of the kernel due to lack of use anymore. The visorbus subsystem finall has started moving out of the staging tree to the "real" part of the kernel, and the most and fsl-mc codebases are almost ready to move out, that will probably happen for 4.17-rc1 if all goes well. Other than that, there is a bunch of license header cleanups in the tree, along with the normal amount of coding style churn that we all know and love for this codebase. I also got frustrated at the Meltdown/Spectre mess and took it out on the dgnc tty driver, deleting huge chunks of it that were never even being used. Full details of everything is in the shortlog. All of these patches have been in linux-next for a while with no reported issues" * tag 'staging-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (627 commits) staging: rtlwifi: remove redundant initialization of 'cfg_cmd' staging: rtl8723bs: remove a couple of redundant initializations staging: comedi: reformat lines to 80 chars or less staging: lustre: separate a connection destroy from free struct kib_conn Staging: rtl8723bs: Use !x instead of NULL comparison Staging: rtl8723bs: Remove dead code Staging: rtl8723bs: Change names to conform to the kernel code staging: ccree: Fix missing blank line after declaration staging: rtl8188eu: remove redundant initialization of 'pwrcfgcmd' staging: rtlwifi: remove unused RTLHALMAC_ST and RTLPHYDM_ST staging: fbtft: remove unused FB_TFT_SSD1325 kconfig staging: comedi: dt2811: remove redundant initialization of 'ns' staging: wilc1000: fix alignments to match open parenthesis staging: wilc1000: removed unnecessary defined enums typedef staging: wilc1000: remove unnecessary use of parentheses staging: rtl8192u: remove redundant initialization of 'timeout' staging: sm750fb: fix CamelCase for dispSet var staging: lustre: lnet/selftest: fix compile error on UP build staging: rtl8723bs: hal_com_phycfg: Remove unneeded semicolons staging: rts5208: Fix "seg_no" calculation in reset_ms_card() ...
2018-01-22staging: most: replace function name to __func__Sidong Yang1-1/+1
Fix checkpatch.pl warning message about logging code. Previous code contains hard coded function name. Fix this code by using __func__ macro. Signed-off-by: Sidong Yang <realwakka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: most: convert macro to static functionGeorge Edward Bulmer1-5/+7
This fixes checkpatch warning: CHECK: Macro argument reuse 'buf' - possible side effects? Signed-off-by: George Edward Bulmer <gebulmer@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: most: Fix identifiers to function parametersRavi Eluri2-4/+4
fixed "function definition argument should have an identifier name", with appropriate identifier names. Pointed out by checkpatch. Signed-off-by: Ravi Eluri <venkataravi.e@techveda.org> Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: most: Avoid trailing semicolon for macrosRavi Eluri1-1/+1
Fixes checkpatch warning: macros should not use a trailing semicolon. Signed-off-by: Ravi Eluri <venkataravi.e@techveda.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: most: core: make functions print_links and most_match staticColin Ian King1-2/+2
The functions print_links and most_match static are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'print_links' was not declared. Should it be static? symbol 'most_match' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28the rest of drivers/*: annotate ->poll() instancesAl Viro2-4/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-11-28staging: most: make DEVICE_ATTR structures staticChristian Gromm2-16/+16
In order to limit the scope of the DEVICE_ATTR structure this patch adds the keywork static. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: most: remove legacy foldersChristian Gromm7-29/+0
This patch removes the legacy folders of the modules. It is needed to clean up the driver's source tree. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: most: fix MakefileChristian Gromm1-7/+7
This patch fixes the names of the CONFIG symbols and the subfolders make is supposed to enter in order to build the selected modules. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: usb: fix show/store function namesChristian Gromm1-17/+17
This patch renames the show/store functions of the USB module. It is needed to make the module meet the established naming convention. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: add ABI documentationChristian Gromm1-0/+313
This patchg adds the sysfs-bus-most.txt file to the source tree. It is needed to have an ABI description of the driver's sysfs interface. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-27staging: most: core: fix list traversingAndrey Shvetsov1-4/+13
This patch fixes the offset and data handling when traversing the list of devices that are attached to the bus. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>