Commit Graph

1013660 Commits

Author SHA1 Message Date
Ashish Vara
08df2c3ba1 staging: qlge: removed unnecessary debug message to fix coding style warning
removed unnecessary out of memory message to fix coding style warning.

Signed-off-by: Ashish Vara <ashishvara89@yahoo.com>
Link: https://lore.kernel.org/r/1997ad6b-ed63-a939-aec8-18636c132f0d@yahoo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 20:05:24 +02:00
Fabio Aiuto
1f5adcfe87 staging: rtl8723bs: remove unneeded comments to silence 'line too long' warning
remove unneeded comments to fix the following post commit hook
checkpatch warnings:

WARNING: line length of 110 exceeds 100 columns
115: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:510:
+					*((__le32 *)crc)
 = ~crc32_le(~0, payload, length);/* modified by Amy*/

WARNING: line length of 110 exceeds 100 columns
124: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:518:
+					*((__le32 *)crc)
 = ~crc32_le(~0, payload, length);/* modified by Amy*/

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/bb479715e3603ab78863576783dbbf49c5f6f703.1620652505.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 20:05:15 +02:00
Fabio Aiuto
b97fad10de staging: rtl8723bs: replace private CRC-32 routines with in-kernel ones
replace private CRC-32 routines with in-kernel ones.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/cdd9bc521b7119a9c2787b46109eb76f94bd295a.1620652505.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-13 20:05:15 +02:00
Ojaswin Mujoo
f6d5d11846 staging: rtl8192e: Fix whitespace around conditional statement
This patch fixes the following checkpatch.pl warnings:

- WARNING: suspect code indent for conditional statements (8, 17)
  FILE: ./rtl8192e/rtl8192e/rtl_dm.c:1735:

- WARNING: Statements should start on a tabstop
  FILE: ./rtl8192e/rtl8192e/rtl_dm.c:1736:

Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com>
Link: https://lore.kernel.org/r/b25f07b14c7e1f0d70d54b8723f786e33ffeb77a.1620642396.git.ojaswin98@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:37:04 +02:00
Ojaswin Mujoo
d0cf4e2bd4 staging: rtl8192e: Add identifier name to function definition
The patch fixes the following checkpatch.pl warnings:

- WARNING: function definition argument 'struct net_device *' should also
    have an identifier name
  FILE: ./rtl8192e/rtl8192e/rtl_core.h:572:

- WARNING: function definition argument 'struct net_device *' should also
    have an identifier name
  FILE: ./rtl8192e/rtl8192e/rtl_core.h:573:

Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com>
Link: https://lore.kernel.org/r/d856d9f22777524f5c10bddb7f7930d97e58c20b.1620642396.git.ojaswin98@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:37:04 +02:00
Ojaswin Mujoo
1ba6d8dc50 staging: rtl8192e: Avoid multiple line dereference
Avoid multiple line dereference to make the code more readable, as
suggested by checkpatch.pl

This patch fixes the following checkpatch.pl warning:

- WARNING: Avoid multiple line dereference
    prefer 'priv->rtllib->swcamtable[4].key_buf[0]'
  FILE: ./rtl8192e/rtl8192e/rtl_cam.c:189

- WARNING: Avoid multiple line dereference
    prefer 'priv->rtllib->swcamtable[4].key_buf[0]'
  FILE: ./rtl8192e/rtl8192e/rtl_cam.c:195

- WARNING: Avoid multiple line dereference
    prefer 'priv->rtllib->swcamtable[4].key_buf[0]'
  FILE: ./rtl8192e/rtl8192e/rtl_cam.c:204

- WARNING: Avoid multiple line dereference
    prefer 'priv->rtllib->swcamtable[4].key_buf[0]'
  FILE: ./rtl8192e/rtl8192e/rtl_cam.c:209

- WARNING: Avoid multiple line dereference
    prefer 'info_element->data[info_element->len]'
  FILE: ./rtl8192e/rtllib_rx.c:2287

Signed-off-by: Ojaswin Mujoo <ojaswin98@gmail.com>
Link: https://lore.kernel.org/r/435b60bd8874f8105b4af6e7eb9ee5bdbfe3112f.1620642396.git.ojaswin98@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:37:04 +02:00
Zhen Lei
1cd3acd4e9 staging: rtl8723bs: Delete two redundant condition branches
The statement of the "if (check_fwstate(pmlmepriv, WIFI_AP_STATE))" branch
is the same as the "else" branch. Delete it to simplify code.

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210510084901.3421-1-thunder.leizhen@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:35 +02:00
Fabio Aiuto
1b11e893ed staging: rtl8723bs: replace private arc4 encryption with in-kernel one
replace private arc4 encryption with in-kernel one.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/af960dc728f039d64f4fb28fcece3ca92d24fbe4.1620372584.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:00 +02:00
Fabio Aiuto
8adffa4bf1 staging: rtl8723bs: remove unused symbolic constant _AES_IV_LEN_
remove unused symbolic constant _AES_IV_LEN_

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ac3f5a400dcb61f46db259cca6979ec41f98feae.1620372584.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:00 +02:00
Fabio Aiuto
6d0753d26e staging: rtl8723bs: remove more unused encryption macros
remove more unused logical macros used in removed
private aes encryption.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c65d2b2dd06c52c3e0418d8a927521d05109849c.1620372584.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:00 +02:00
Fabio Aiuto
0c7ac91087 staging: rtl8723bs: remove unused macros, arrays and an inline function def
remove unused macros, arrays and a function definition.
Many of these facilities were used in removed private
aes encryption.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ada64bfc622dbfe6d4ff03c46dff48b25ebc641e.1620372584.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:36:00 +02:00
Saurav Girepunje
aaa27b88a5 staging: rtl8192e: Remove duplicate declartion
Remove dupilcate declartion of function rtllib_stop_send_beaconsi()
notify_wx_assoc_event() in rtl8192e/rtllib.h file.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/20210509171427.GA9937@user
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:35:28 +02:00
Sergio Paracuellos
321f1fb48c staging: mt7621-dts: add missing device_type in pcie root ports
According to the YAML schema 'pci-bus.yaml' the 'device_type'
property is mandatory for all pcie root ports. Hence add it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210506170742.28196-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:34:59 +02:00
Sergio Paracuellos
7114e7a298 staging: mt7621-dts: remove 'bug-range' property
Property 'bus-range' when values are the default are
not necessary to be defined. Hence, remove all of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210506170742.28196-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:34:59 +02:00
Martin Kaiser
edee771a45 staging: rtl8188eu: remove nic_hdl from struct mlme_priv
struct mlme_priv is an element of struct adapter. Use container_of
to get a pointer to the enclosing struct.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210506121410.17613-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 14:34:44 +02:00
Martin Kaiser
706321a538 staging: rtl8188eu: remove padapter from struct mlme_ext_priv
struct mlme_ext_priv is an element of struct adapter. Use container_of
to get a pointer to the enclosing struct.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210505202622.11087-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Martin Kaiser
24aa9caccb staging: rtl8188eu: remove padapter from struct cmd_priv
struct cmd_priv is an element of struct adapter. Use container_of
to get a pointer to the enclosing struct.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210505202622.11087-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Martin Kaiser
286d600339 staging: rtl8188eu: don't block until cmdthread runs
rtw_start_drv_threads starts a cmdthread that runs in a loop. It
reads a command from a queue and processes it. There's no need for
any synchronization when this thread is started.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210505202622.11087-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Martin Kaiser
13d68881bf staging: rtl8188eu: rtw_init_cmd_priv never fails
Change the return type to void. Remove unnecessary error handling.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210505202622.11087-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Martin Kaiser
2752fc4182 staging: rtl8188eu: make rtw_android_cmdstr_to_num static
This function is used only in rtw_android.c.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210505202622.11087-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Sergio Paracuellos
0e7babd3c6 staging: mt7621-dts: use standard 'syscon' string
Both 'memc' and 'sysc' nodes are not using 'syscon'
as a node string which is the standard one to be used.
Update both of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505132154.8263-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Sergio Paracuellos
b619c32202 staging: mt7621-dts: remove ethsys node
DT 'ethsys' node is being configured as a syscon
to get access to reset and other registers in the
'mediateķ,mt7621-eth' driver. Since the 'sysc' is also
a syscon, provides the clock and also is virtually
mapped from the same physical address 0x1e000000 we
can just use 'sysc' as the phandle for the syscon in
the ethernet node. Compatible string 'mediatek,mt7621-ethsys'
of the node is not being used anywhere inside the kernel
so, this node can be safely removed.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505132154.8263-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Uwe Kleine-König
a3417158b9 staging: fieldbus: anybus: Refuse registering drivers without .probe()
A driver without .probe() callback could never bind to a device because
anybus_bus_probe() returned an error for such a driver. So refuse to
register such a useless driver.

Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210505202923.198607-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Uwe Kleine-König
32dcd07242 staging: fieldbus: anybus: Make remove callback return void
The driver core ignores the return value of struct bus_type::remove()
because there is only little that can be done. To simplify the quest to
make this function return void, let struct
anybuss_client_driver::remove() return void, too. All users already
unconditionally return 0, this commit makes it obvious that returning an
error code is a bad idea.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210505202923.198607-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:41 +02:00
Sergio Paracuellos
cc1966a7e0 staging: mt7621-dts: properly organize pcie node
Device tree pcie node for this SoC is using different
styles in its different properties. Hence properly
unify them to be able to write a a proper yaml schema
documentation.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-11-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
706737d298 staging: mt7621-dts: use 'interrupt-map' and 'interrupt-map-mask'
Custom function for 'map_irq' was introduced in
commit fab6710e4c ("staging: mt7621-pci: fix PCIe interrupt mapping")

This is not really necessary and code has been fixed to avoid
custom configuration of the virtual bridges and make possible
to properly map the root ports interrupts using this standard
properties. Hence properly update device tree accordly.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-10-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
7fa708e061 staging: mt7621-pci: remove two blank lines
There are useless two blank lines in code that can
be removed. Hence, remove them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-9-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
b99cc3a2b6 staging: mt7621-pci: avoid custom 'map_irq' function
Custom function for 'map_irq' was introduced in
commit fab6710e4c ("staging: mt7621-pci: fix PCIe interrupt mapping")

After some testing in an adquired device with a similar
pci layout that those that was having problems, I got
into a better way to solve the issue just using device tree
'interrupt-map' and 'interrupt-map-mask' properties. For
this to be possible we must avoid custom configuration of
the virtual bridges registers from driver code. Doing in
this way buses are not reconfigured so we can properly
use bus related bits and mask in device tree to map
correctly the interrupts. Hence remove custom configuration
of the bridges as well as custom 'map_irq' related stuff.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-8-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
35d96b88e7 staging: mt7621-pci: directly return 'mt7621_pcie_register_host'
Return code after call function 'mt7621_pcie_register_host' is
being checked to give an error message. This function internally
is calling 'pci_host_probe' which if something fails will complain
already. Hence, directly return result of this call making decrease
a bit LOC.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-7-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
4ab4ca2015 staging: mt7621-pci: replace mdelay with msleep
There are two mdelay calls in driver code located in
'mt7621_pcie_reset_assert' and 'mt7621_pcie_reset_rc_deassert'
functions. Both of them are not called in an interrupt handler
nor holding any spinlock. Hence, the function mdelay in them
can be replaced with msleep, to reduce busy wait.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-6-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
726eb31628 staging: mt7621-pci: group io resource assignments all together
To improve a bit readabily group all the IO resource related
assignments together.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-5-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
c92454a42b staging: mt7621-pci: remove some not needed includes
Some includes used here are not really necessary for
the code to compile properly. Hence remove them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-4-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
96c310c1a2 staging: mt7621-pci: avoid to set gpio mode in driver
Gpio mode for the pcie pins must be request from device
tree using pinctrl driver. Pinctrl driver is already setting
this pcie pins as GPIO if it is requested. Hence, remove it
from here.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Sergio Paracuellos
cc4e864a5c staging: mt7621-pci: make use of kernel clock apis
MT7621 SoC clock driver has already mainlined in
'commit 48df7a26f4 ("clk: ralink: add clock driver for mt7621 SoC")'
Hence, we can make use of kernel clock apis and avoid to
directly set bits in clock gate related registers for pci.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210505121736.6459-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:40 +02:00
Fabio Aiuto
3d3a170f6d staging: rtl8723bs: use in-kernel aes encryption
replace private aes encryption subroutines with
public in-kernel ones in data frame encryption.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/bd1f47994d3a1d0f434de5b2095c327f5a25f6ef.1620139727.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
7d40753d88 staging: rtl8723bs: use in-kernel aes encryption in OMAC1 routines
replace private aes encryption subroutines with
public in-kernel ones in OMAC1 computation routines.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/11ac26487aab92ded28747c1f0cb42a94183130d.1620139727.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
41c014b865 staging: rtl8723bs: align argument position in a new line
align function arguments position on a new line to
open parentheses.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/f195bc7d72c122e5e16b3857cf99ae1f84734915.1620139727.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Andy Shevchenko
801deaf91a staging: fbtft: Update TODO
Now, after a few fixes we may consider the conversion to
the GPIO descriptor API is done.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210503172114.27891-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Andy Shevchenko
982192e2a1 staging: fbtft: Replace custom ->reset() with generic one
The custom ->reset() repeats the generic one, replace it.

Note, in newer kernels the context of the function is a sleeping one,
it's fine to switch over to the sleeping functions. Keeping the reset
line asserted longer than 20 microseconds is also okay, it's an idling
state of the hardware.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210503172114.27891-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Andy Shevchenko
fd4c5961d8 staging: fbtft: Add support for orientation on Himax HX8347d
Himax HX8347d has non-standard register to control orientation.
Add support for different orientation values.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210503172114.27891-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Andy Shevchenko
37667f6e57 staging: fbtft: Don't spam logs when probe is deferred
When requesting GPIO line the probe can be deferred.
In such case don't spam logs with an error message.
This can be achieved by switching to dev_err_probe().

Fixes: c440eee1a7 ("Staging: fbtft: Switch to the gpio descriptor interface")
Cc: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210503172114.27891-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Andy Shevchenko
ec03c21043 staging: fbtft: Rectify GPIO handling
The infamous commit c440eee1a7 ("Staging: staging: fbtft: Switch to
the GPIO descriptor interface") broke GPIO handling completely.
It has already four commits to rectify and it seems not enough.
In order to fix the mess here we:

  1) Set default to "inactive" for all requested pins

  2) Fix CS#, RD#, and WR# pins polarity since it's active low
     and GPIO descriptor interface takes it into consideration
     from the Device Tree or ACPI

  3) Consolidate chip activation (CS# assertion) under default
     ->reset() callback

To summarize the expectations about polarity for GPIOs:

   RD#			Low
   WR#			Low
   CS#			Low
   RESET#		Low
   DC or RS		High
   RW			High
   Data	0 .. 15		High

See also Adafruit learning course [1] for the example of the schematics.

While at it, drop unneeded NULL checks, since GPIO API is tolerant to that.

[1]: https://learn.adafruit.com/adafruit-2-8-and-3-2-color-tft-touchscreen-breakout-v2/downloads

Fixes: 92e3e88488 ("Staging: fbtft: Fix GPIO handling")
Fixes: b918d1c270 ("Staging: fbtft: Fix reset assertion when using gpio descriptor")
Fixes: dbc4f989c8 ("Staging: fbtft: Fix probing of gpio descriptor")
Fixes: c440eee1a7 ("Staging: fbtft: Switch to the gpio descriptor interface")
Cc: Jan Sebastian Götte <linux@jaseg.net>
Cc: Nishad Kamdar <nishadkamdar@gmail.com>
Reviewed-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210503172114.27891-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
0d59ca5a7e staging: rtl8723bs: remove odm_debug.h header file
remove obsolete odm_debug.h header file.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/58f3ed0c7706fdb33614d3e38ed802d56d77f0ec.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
1cad68fc83 staging: rtl8723bs: remove DebugLevel member in dm_odm_t struct
remove DebugLevel in dm_odm_t struct,
remove private debug level tracing.

remove unused variable as well to suppress compiler warning.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ac4afb00f904511e0cbb23136f8e7a3e204ad7ed.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
ae75f93465 staging: rtl8723bs: remove member in dm_odm_t struct
remove DebugComponent in dm_odm_t struct,
remove private debug component tracing.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/313d08514d2105c826ef3c92555fa557def2b9c2.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:39 +02:00
Fabio Aiuto
83147d899e staging: rtl8723bs: remove empty hal/odm_debug.c file
remove file left empty after function deletion.
remove related target in Makefile.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0bd6ce2da09a5e2a671dc4a53f1c2e7ba1a64066.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
4f7cffcfe4 staging: rtl8723bs: remove ODM_InitDebugSetting() function
remove ODM_InitDebugSetting() function. It was
intended to initialize removed private debug
system. So remove it.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/6a8524b780674d05f33977eb86878d95c7338a1a.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
603693d1cf staging: rtl8723bs: remove RT_DISP macro definition
remove unused RT_DISP macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8983c3077979830aec02427ed895507213b38f95.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
3a96d356b9 staging: rtl8723bs: remove commented out *RT_DISP logs
remove commented out ODM_RT_DISP and RT_DISP logs.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/23b7764fc40e1b201952be79e94e0782cf33d546.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00
Fabio Aiuto
367fce0d9e staging: rtl8723bs: remove unused DbgPrint macro
remove unused DbgPrint macro definition.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/00e9b407fa1a7c911295b2fec215d82f5da058f8.1619794331.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10 11:19:38 +02:00