aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2021-06-14staging: rtl8188eu: convert DBG_88E calls in core/rtw_sta_mgt.cPhillip Potter1-2/+5
Convert both calls to the DBG_88E macro in core/rtw_sta_mgt.c into netdev_dbg calls. The DBG_88E macro is unnecessary, as visibility of debug messages can be controlled more precisely by just using debugfs. It is important to keep these messages still, as they are displayable via a kernel module parameter when using DBG_88E. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210613102454.7480-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14staging: rtl8188eu: remove HW_DEF_ODM_DBG_FLAG enum valuePhillip Potter2-3/+0
Remove HW_DEF_ODM_DBG_FLAG definition from the hal_def_variable enum in include/hal_intf.h, and remove its usage from the switch statement in rtw_hal_get_def_var inside hal/usb_halinit.c - this is dead code and no longer used, now that ODM_RT_TRACE and include/odm_debug.h have been removed. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210612181942.33817-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14staging: gdm724x: check for overflow in gdm_lte_netif_rx()Dan Carpenter1-4/+6
This code assumes that "len" is at least 62 bytes, but we need a check to prevent a read overflow. Fixes: 61e121047645 ("staging: gdm7240: adding LTE USB driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YMcoTPsCYlhh2TQo@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt()Dan Carpenter1-1/+9
There needs to be a check to verify that we don't read beyond the end of "buf". This function is called from do_rx(). The "buf" is the USB transfer_buffer and "len" is "urb->actual_length". Fixes: 61e121047645 ("staging: gdm7240: adding LTE USB driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YMcnl4zCwGWGDVMG@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14Merge tag 'v5.13-rc6' into tty-nextGreg Kroah-Hartman2-3/+1
We want the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14Merge tag 'v5.13-rc6' into staging-nextGreg Kroah-Hartman2-3/+1
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-12staging: rtl8188eu: remove ODM_RT_TRACE calls from hal/phy.cPhillip Potter9-399/+14
Remove all ODM_RT_TRACE calls from hal/phy.c, as this debug code is not optimal and doesn't follow best practices. This in concert with other removals allows for the removal of include/odm_debug.h in its entirety. Tested-by: Martin Kaiser <martin@kaiser.cx> Reviewed-by: Martin Kaiser <martin@kaiser.cx> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210611002504.166405-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-12staging: drop kpc2000 driverGreg Kroah-Hartman20-3714/+0
It seems that the old developer is no longer with the company producing this device, and the company has no plans on getting this out of the staging directory at all, so let's drop the driver for now as it's pretty much abandonded. If someone want to support this and get it out of staging, we can easily revert this change and bring it back. Cc: Matt Sickler <matt.sickler@msk4.com> Link: https://lore.kernel.org/r/20210610183153.2397760-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-12staging: rtl8723bs: core: add blank line after variable declarationPhilippe Dixon1-16/+20
This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Philippe Dixon <philippesdixon@gmail.com> Link: https://lore.kernel.org/r/c5eedc7a5298b05beb576b7b9e108794ca7bb58c.1623339773.git.philippesdixon@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-12staging: rtl8712: Replace printk() with netdev_dbg()Fabio M. De Francesco1-1/+1
Replaced printk() with netdev_dbg() because the latter is preferred in network devices drivers. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210609135659.4054-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-12staging: rtl8723bs: os_dep: Remove conditions with no effectsFabio M. De Francesco1-10/+2
Removed conditions with no effects. Detected by Coccinelle. Deleted a variable that is no longer used because of the above-mentioned removals. Reviewed-by: Fabio Aiuto <fabioaiuto83@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210609132346.15403-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-10staging: octeon-hcd: Directly include linux/of.hMarc Zyngier1-0/+2
This drivers currently obtains linux/of.h by luck and a chain of bizarre inclusions, which we're about to fix. Let's include the required file directly. Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-06-09staging: gdm724x: emove redundant initialization of variable hci_lenColin Ian King1-1/+0
The variable hci_len is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210609120617.185975-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: delete some dead codeDan Carpenter1-4/+1
Calling rtw_free_xmitframe() with a NULL "pxmitframe" parameter is a no-op. It appears that originally this code was part of a loop but it was already dead code by the time that the driver was merged into the kernel. Fixes: 7bc88639ad36 ("staging: r8188eu: Add files for new driver - part 17") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5jFF9ldj0W9P1f@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in rtl8188eu_xmitframe_complete()Dan Carpenter1-5/+3
This loop calls rtw_free_xmitframe(pxmitpriv, pxmitframe) which removes "pxmitframe" (our list iterator) from the list. So to prevent a forever loop we need to use a safe list iterator. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5i8W7BNla2DlrW@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in xmit_delivery_enabled_frames()Dan Carpenter1-6/+3
This loop calls list_del_init(&pxmitframe->list) and "pxmitframe" is the list iterator so it leads to a forever loop. We need to use a _safe() iterator to fix this. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5i5aVMQ3CZ5wuQ@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in wakeup_sta_to_xmit()Dan Carpenter1-10/+4
These two loops call list_del_init() on the list iterator so they need to use the _safe() iterator to prevent a forever loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5i1ZAAAB4vSWef@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in dequeue_xmitframes_to_sleeping_queue()Dan Carpenter1-5/+3
On some code paths the xmitframe_enqueue_for_sleeping_sta() function can call list_del_init(&pxmitframe->list) which would lead to a forever loop because "pxmitframe" is the list iterator. Use the _safe version of the iterator to prevent this. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5ixzKaYKkpHhky@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in tx_beacon_hdl()Dan Carpenter1-7/+4
This loop calls list_del_init() on the list iterator so it has to use the _safe() iterator or it leads to an endless loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5iunD5ilf+mKPR@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use safe iterator in stop_ap_mode()Dan Carpenter1-6/+2
This loop calls list_del_init() on the list iterator so it can result in a forever loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YL5ip4yz9NEB9RZO@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8723bs: use list_for_each_safe in loops deleting iterated itemsFabio Aiuto7-28/+28
Fix some beautified loops over linked lists. Use list_for_each_safe on loops which could delete objects in the list. Fixes: b3cd518c5abd ("staging: rtl8723bs: Use list iterators and helpers") Suggested-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Fabio Aiuto <fabioaiuto83@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/20210607134618.11237-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: Use eth_broadcast_addr() to assign broadcast addressLiu Shixin1-5/+3
Simplify the code by using eth_broadcast_addr() to assign broadcast address and removing the unnecessary variable bc_addr. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20210609085650.1269008-2-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: Use is_{zero/broadcast}_ether_addr() instead of memcmp()Liu Shixin4-13/+14
Simplify the code by using is_{zero/broadcast}_ether_addr() instead of directly using memcmp() to determine if the ethernet address is all zeros or broadcast address. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20210609085650.1269008-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: fpgaboot: change FPGA indirect article to anTom Rix1-1/+1
Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20210608212350.3029742-13-trix@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8723bs: hal: Delete tests with no effectsFabio M. De Francesco1-10/+2
Deleted tests with no effects. Detected by Coccinelle. It seems that these tests have been inadvertently left while removing BTC_PRINT logs in commit 8e30fb99d729. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210608112118.1213-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: remove unused function parameterMartin Kaiser1-2/+2
The loadparam function does not need a struct net_device. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use standard kthread handlingMartin Kaiser3-18/+14
The driver defines its own completion to wait until the command thread is stopped. Use kthread_stop instead and check kthread_should_stop in the thread's main loop. (For now, we keep the driver's "emergency exit" via bDriverStopped/bSurpriseRemoved.) To check if the command thread is running, the driver stores the thread's task_struct and a boolean status variable. Remove this status and check the task_struct directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: use existing define for ethernet header lenMartin Kaiser1-2/+2
Replace the driver's internal define with ETH_HLEN. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: remove RT_TRACE and DBG_88E prints from usb_ops_linux.cMartin Kaiser1-122/+8
As said elsewhere, these prints are disabled by default. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: simplify rtw_get_wireless_statsMartin Kaiser1-11/+4
Remove unnecessary temporary variables. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: make rtw_free_recvframe return voidMartin Kaiser2-7/+4
None of the callers checks the return value of rtw_free_recvframe. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: refactor rtw_lps_ctrl_wk_cmdMartin Kaiser1-27/+16
Allocate memory only if we're asked to enqueue the command for later processing. Handle memory allocation failures in one place. There's no need to "goto exit" if we're not doing any cleanup there. kzalloc already set all of pdrvextra_cmd_parm to 0. We don't have to set pdrvextra_cmd_parm->pbuf = NULL manually. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: remove RT_TRACE and DBG_88E prints from rtw_cmd.cMartin Kaiser1-73/+4
The rtl8188eu driver implements driver-specific debug prints which use their own definitions for debug levels. By default, these prints are disabled. You'd have to modify the code or set a module parameter to enable them. The rtl8723bs staging driver has already removed those prints. We should do the same. Let's start with removing RT_TRACE and DBG_88E prints from rtw_cmd.c. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8188eu: remove unused RT_PRINT_DATA macroMartin Kaiser1-18/+0
The RT_PRINT_DATA macro is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: make use of 'pcie_port_write'Sergio Paracuellos1-8/+4
Function 'mt7621_pcie_enable_port' is calculating an offset to write some port related registers. Instead of doing that just make use of already existent 'pcie_write_port' function and use virtualy mapped base address with registers. This increase readability and allow us to remove also two defitions not used else where. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-7-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: parse some dt properties from root port child nodesSergio Paracuellos1-11/+38
Properties 'clocks', 'resets' and 'phys' have been moved from parent node to the root port children. Hence we have to adapt the way device tree is parsed in driver code to properly align things and make all the stuff work. Note that we moved from using 'devm_reset_control_get_exclusive() to 'of_reset_control_get_exclusive()' so we need to properly call the 'reset_control_put()' function manually in error and remove paths. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-6-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-dts: move some properties into root port child nodesSergio Paracuellos1-9/+12
After a review of the bindings 'clocks', 'resets' and 'phys' must be moved into root port child nodes. Hence, move all of them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-5-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: use {readl|writel}_relaxed instead of readl/writelSergio Paracuellos1-7/+7
The driver does not perform DMA, so it's safe to use the relaxed version for both readl and writel operations. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-4-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: remove 'RALINK_PCI_BAR0SETUP_ADDR' definitionSergio Paracuellos1-2/+1
Instead of define RALINK_PCI_BAR0SETUP_ADDR just use standard pci defnition for this which is 'PCI_BASE_ADDRESS_0'. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: mt7621-pci: make cleaner 'mt7621_pcie_enable_ports'Sergio Paracuellos1-16/+8
Function 'mt7621_pcie_enable_ports' call 'mt7621_pcie_enable_port' for each available pcie port. Instead of having two for loops there just move needed initialization. There is one setting that can be removed which is the set for 'PCI_COMMAND_MASTER' bit. Pci drivers are in charge of set that bit if is really needed and should be not a mission of the controller to do that. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210607120153.24989-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09Merge tag 'iio-for-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman4-97/+57
Jonathan writes: 1st set of new IIO/counter device support, features and cleanup for 5.14 There are a couple of large cleanup sets in here alongside a number of new drivers. Note an immutable branch merged to add a stub for i2c_verify_client() as needed to avoid a build issue in the fxls8962af driver as a result of a workaround for a device errata that only applies when i2c interface is used. Counters ======== New device support * intel,quadrature encoder peripheral found on Elkhart Lake platforms. - New driver. IIO === New device support * amstaos,tsl2591 ambient light sensor. - New driver + bindings - Follow up fix to ensure some local variables are suitable for error handling. * fsl,fxls8962af + fsl,fxls8964af accelerometers - New driver + bindings - Includes an errata work around that cause a build bot failure fixed by adding a stub to i2c. * kionix,kxcjk-1013 - Add support for KX023-1025 device. Mostly a different register map that needed to be supported. * murata,sca3300 accelerometer - New driver + bindings * st,lsm9ds0 IMU - Rework of st,sensors driver to cleanly support this new glue driver that enables the two parts of the LSM9DS0. * ti,tsc2046 touchscreen controller ADC. - New driver. Intent here is to use this with existing IIO consumer drivers such as resistive-adc-touch. - Follow up fix to avoid an issue with unsigned subtraction in error check. * ti,tmp117 digital temperature sensor - New driver + bindings Features * adi,ad5755 - Add missing dt-binding doc * adi,ad7298 - Add ACPI ID used on Intel Galileo Gen 1 boards. - Add missing dt-binding doc * adi,ad7476 - Add missing dt-binding doc * adi,ad7746 - Add missing dt-binding doc for this driver that will hopefully move out of staging shortly. Update staging driver to use the binding instead of platform data. * adi,adis16201 + adis16209 - Add missing dt-binding doc * adi,adis16480 - Support burst mode for adis16495 and adis16497 parts. * bosch,bma220 - Add missing dt-binding doc * fsl,mma7455 - Add missing dt-binding doc * iio-rescale - Support handling of processed channels from provider. Some ADCs require (typically non linear) calibration functions to be applied, and so provide only IIO_CHAN_INFO_PROCESSED read back. They can be used as providers to the iio-rescale driver which needs to handle them somewhat differently from IIO_CHAN_INFO_RAW * sensiron,sps30 - Support the serial interface. Note this required significant refactoring of existing driver. * st,st-sensors - Add mount matrix support for normal dt-binding whilst continuing to support the odd ACPI approach for accelerometers. * ti,dac082s085 + similar - Add missing dt-binding doc * trivial-devices - add entries for - memsic,mx4005, memsic,mx6255 and memsic,mxc6655 - sensortek,stk8312 and sensortek,stk8ba50 Cleanup / minor fixes * core - Use devm_add_action_or_reset() to replace boilerplate in several driver and core IIO devm_* functions. - Fix an error path issue introduced by above, that could return an error pointer rather than the expected null from dev_iio_device_alloc() - Move more IIO internals related fields from struct iio_dev to struct iio_dev_opaque. - Drop unused final update of in_loc in demux setup. * Docs - Move some docs from driver specific to core dos to avoid replication of names which the documentation builder does not allow. Note this means adding a few device specific notes to the general docs to cover the more unusual uses of the ABI. - ABI: Move old buffer/* and scan_elements/* docs to obsolete as now we have the bufferX/* variant. Not we are not getting rid of these interfaces, just encouraging new code to use the new interface. * IIO wide: - Tidy up new cases of dev.parent etc being set in drivers as the core now does it. - Fix more cases of possible miss-aligned buffers when passed to iio_push_to_buffers_with_timestamp(). Note we only have one known instance of anyone seeing this bug actually happening, so this has been a low priority cleanup effort for several cycles. - sysfs_emit() used in more drivers. - Runtime pm tidy up and use of pm_runtime_resume_and_get() - Buffer alignment fixes as iio_push_to_buffers_with_timestamp requires that the timestamp when inserted by naturally aligned + consumers can assume that all fields are naturally aligned. Part of a long running effort, with at least 2 more series to come tackling additional variants. - Stop specifying "mount-matrix" property name in every lookup of the mount matrix from firmware by hard coding it in the core. * adi,ad7476 - Handle the variety of different regulators used by the parts supported by this driver (came up in dt-binding review) * adi,ad7746 - Trivial drop of if (ret) return ret; return 0; pattern - Tidy up comments - Pull capdac setup out to own function. * adi,ad7766 - Trivial drop of if (ret) return ret; return 0; pattern * adi,adis - Avoid returning error codes in interrupt handlers. - Handle a failure in spi_write in the trigger handler. - Rework to add updating of device page after changing it. - Don't push data to IIO buffers when read failed. - Add configuration of burst max speed to core avoid handling this in each driver. - Use the adis_dev_lock() helper in adis16260 and adis16136 drivers. - Excessive includes cleanup via include-what-you-use static checker after zero day highlighted that these needed updating. * afe - Amend binding to add #io-channel-cells, thus allowing this IIO consumer to also be an IIO provider. * aosong,am2315 - Drop ACPI id. Unlikely this one is in the wild and it isn't valid ACPI naming. * bosch,bma180 - Adding missing bandwidth settings (500, 1000 Hz) * bosch,bme680 - Drop ACPI id. Unlikely this one is in the wild and it isn't valid ACPI naming. * ep93xx_adc, - Drop a redundant error print. * maxim,max118 - Convert remainder of probe() to devm_ managed functions. - Avoid some repeated jumping back and forth between iio_dev and spi structures. * maxim,max11100 - Use get_unaligned_be16() instead of open coding. - Convert remainder of probe() to devm_ managed functions. * samsung,exynos_adc - Unused error value dropped. * sensiron,sgp30 - Drop use of %hx in favor of %x and letting the normal type conversion work. * sensortek,stk8312 - Add lowercase device id and note uppercase version deprecated. - Drop ACPI id. Unlikely this one is in the wild and it isn't valid ACPI naming. * sprx,sc72xx_adc - add MODULE_DEVICE_TABLE * st,lsm6dsx - Fix docs of valid ODRs * st,sensors - dt-binding rework. Two efforts on this crossed in a previous cycle so this update cherry picks the best of the two yaml conversions. - Don't copy the channel spec array as now ext_info is no longer modified. * st,stm32-adc - tidy up some docs that were marked as kernel-doc but aren't. * ti,adc081c, ti,adc0832, ti,adc108s102 and ti,adc161s626 - Convert remainder of probe() functions to devm_ managed functions to simplify error handing and remove paths. * tag 'iio-for-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (171 commits) i2c: core: Add stub for i2c_verify_client() if !CONFIG_I2C iio: adis: Cleanout unused headers iio: accel: bma180: Add missing 500 Hz / 1000 Hz bandwidth counter: Add support for Intel Quadrature Encoder Peripheral staging: iio: cdc: ad7746: extract capac setup to own function staging: iio: cdc: ad7746: clean up probe return staging: iio: cdc: ad7746: remove ordinary comments iio: adc: ti-adc161s626: Use devm managed functions for all of probe. iio: adc: ti-adc108s102: Use devm managed functions for all of probe() iio: adc: ti-adc0832: Use devm managed functions for all of probe() iio: adc: ti-adc081c: Use devm managed functions for all of probe() iio: adc: max1118: Avoid jumping back and forth between spi and iio structures iio: adc: max1118: Use devm_ managed functions for all of probe iio: adc: max11100: Use devm_ functions for rest of probe() iio: adc: max11100: Use get_unaligned_be16() rather than opencoding. iio: chemical: sgp30: Drop use of %hx in format string. iio: gyro: st_gyro: Support mount matrix iio: magnetometer: st_magn: Support mount matrix iio: accel: st_sensors: Stop copying channels iio: accel: st_sensors: Support generic mounting matrix ...
2021-06-09staging: rtl8712: Remove unnecessary alias of printk()Fabio M. De Francesco2-24/+1
This module defines four alias for printk(). Removed them all, because they are not used anywhere else in the driver. Converted the only exception to the explicit use of printk(). Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210606034038.9657-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: ralink-gdma: Remove incorrect author informationLars-Peter Clausen1-2/+0
Lars did not write the ralink-gdma driver. Looks like his name just got copy&pasted from another similar DMA driver. Remove his name from the copyright and MODULE_AUTHOR. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210607100119.26983-1-lars@metafoo.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09staging: rtl8723bs: Fix uninitialized variablesWenli Looi1-1/+1
The sinfo.pertid and sinfo.generation variables are not initialized and it causes a crash when we use this as a wireless access point. [ 456.873025] ------------[ cut here ]------------ [ 456.878198] kernel BUG at mm/slub.c:3968! [ 456.882680] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM [ snip ] [ 457.271004] Backtrace: [ 457.273733] [<c02b7ee4>] (kfree) from [<c0e2a470>] (nl80211_send_station+0x954/0xfc4) [ 457.282481] r9:eccca0c0 r8:e8edfec0 r7:00000000 r6:00000011 r5:e80a9480 r4:e8edfe00 [ 457.291132] [<c0e29b1c>] (nl80211_send_station) from [<c0e2b18c>] (cfg80211_new_sta+0x90/0x1cc) [ 457.300850] r10:e80a9480 r9:e8edfe00 r8:ea678cca r7:00000a20 r6:00000000 r5:ec46d000 [ 457.309586] r4:ec46d9e0 [ 457.312433] [<c0e2b0fc>] (cfg80211_new_sta) from [<bf086684>] (rtw_cfg80211_indicate_sta_assoc+0x80/0x9c [r8723bs]) [ 457.324095] r10:00009930 r9:e85b9d80 r8:bf091050 r7:00000000 r6:00000000 r5:0000001c [ 457.332831] r4:c1606788 [ 457.335692] [<bf086604>] (rtw_cfg80211_indicate_sta_assoc [r8723bs]) from [<bf03df38>] (rtw_stassoc_event_callback+0x1c8/0x1d4 [r8723bs]) [ 457.349489] r7:ea678cc0 r6:000000a1 r5:f1225f84 r4:f086b000 [ 457.355845] [<bf03dd70>] (rtw_stassoc_event_callback [r8723bs]) from [<bf048e4c>] (mlme_evt_hdl+0x8c/0xb4 [r8723bs]) [ 457.367601] r7:c1604900 r6:f086c4b8 r5:00000000 r4:f086c000 [ 457.373959] [<bf048dc0>] (mlme_evt_hdl [r8723bs]) from [<bf03693c>] (rtw_cmd_thread+0x198/0x3d8 [r8723bs]) [ 457.384744] r5:f086e000 r4:f086c000 [ 457.388754] [<bf0367a4>] (rtw_cmd_thread [r8723bs]) from [<c014a214>] (kthread+0x170/0x174) [ 457.398083] r10:ed7a57e8 r9:bf0367a4 r8:f086b000 r7:e8ede000 r6:00000000 r5:e9975200 [ 457.406828] r4:e8369900 [ 457.409653] [<c014a0a4>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 457.417718] Exception stack(0xe8edffb0 to 0xe8edfff8) [ 457.423356] ffa0: 00000000 00000000 00000000 00000000 [ 457.432492] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 457.441618] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 457.449006] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c014a0a4 [ 457.457750] r4:e9975200 [ 457.460574] Code: 1a000003 e5953004 e3130001 1a000000 (e7f001f2) [ 457.467381] ---[ end trace 4acbc8c15e9e6aa7 ]--- Link: https://forum.armbian.com/topic/14727-wifi-ap-kernel-bug-in-kernel-5444/ Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info") Fixes: f5ea9120be2e ("nl80211: add generation number to all dumps") Signed-off-by: Wenli Looi <wlooi@ucalgary.ca> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210608064620.74059-1-wlooi@ucalgary.ca Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-08clkdev: remove CONFIG_CLKDEV_LOOKUPArnd Bergmann1-1/+1
This option is now synonymous with CONFIG_HAVE_CLK, so use the latter globally. Any out-of-tree platform ports that still use a private clk_get()/clk_put() implementation should move to CONFIG_COMMON_CLK. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-06-08media: hantro: IMX8M: add variant for G2/HEVC codecBenjamin Gaignard3-2/+96
Add variant to IMX8M to enable G2/HEVC codec. Define the capabilities for the hardware up to 3840x2160. G2 doesn't have a postprocessor, uses the same clocks and has it own interrupt. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-08media: hantro: Introduce G2/HEVC decoderBenjamin Gaignard7-0/+1208
Implement all the logic to get G2 hardware decoding HEVC frames. It supports up level 5.1 HEVC stream. It doesn't support yet 10 bits formats or the scaling feature. Add HANTRO HEVC dedicated control to skip some bits at the beginning of the slice header. That is very specific to this hardware so can't go into uapi structures. Computing the needed value is complex and requires information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Co-developed-by: Adrian Ratiu <adrian.ratiu@collabora.com> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> Co-developed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-08media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE controlBenjamin Gaignard1-0/+1
Make sure that V4L2_PIX_FMT_HEVC_SLICE is correctly handled by the driver. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-08media: hantro: Only use postproc when post processed formats are definedBenjamin Gaignard3-7/+19
If the variant doesn't support postprocessed formats make sure it will be ok. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-08media: hantro: Define HEVC codec profiles and supported featuresBenjamin Gaignard2-0/+61
Define which HEVC profiles (up to level 5.1) and features (no scaling, no 10 bits) are supported by the driver. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>