summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* staging: most: Switch from strlcpy to strscpyKumar Kartikeya Dwivedi2021-02-042-4/+4
| | | | | | | | | | | | | | strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20210131172838.146706-5-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-dpaa2: Switch from strlcpy to strscpyKumar Kartikeya Dwivedi2021-02-041-3/+3
| | | | | | | | | | | | | | strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20210131172838.146706-4-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: greybus: Switch from strlcpy to strscpyKumar Kartikeya Dwivedi2021-02-045-8/+8
| | | | | | | | | | | | | | strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20210131172838.146706-3-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: Switch from strlcpy to strscpyKumar Kartikeya Dwivedi2021-02-041-2/+2
| | | | | | | | | | | | | | strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20210131172838.146706-2-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Add Edimax EW-7811UN V2 to device tableMartin Kaiser2021-02-041-0/+1
| | | | | | | | | | The Edimax EW-7811UN V2 uses an RTL8188EU chipset and works with this driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210204085217.9743-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8723bs: fix rtw_cfg80211_monitor_if_xmit_entry's return valueMartin Kaiser2021-02-041-1/+1
| | | | | | | | A netdev xmit function should return NETDEV_TX_OK or NETDEV_TX_BUSY. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210131183920.8514-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: fix read of an uninitialized pointerColin Ian King2021-02-041-2/+1
| | | | | | | | | | | | | | Currently the pointer 'reporter' is not being initialized and is being read in a netdev_warn message. The pointer is not used and is redundant, fix this by removing it and replacing the reference to it with priv->reporter instead. Fixes: 1053c27804df ("staging: qlge: coredump via devlink health reporter") Reviewed-by: Coiby Xu <coiby.xu@gmail.com> Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Uninitialized pointer read") Link: https://lore.kernel.org/r/20210203133834.22388-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: sound: use non-safe list iterationChristian Gromm2021-02-041-2/+2
| | | | | | | | | | This patch replaces the safe list iteration function with the non-safe one, as no list element is being deleted. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1612265890-18246-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: most: sound: add sanity check for function argumentChristian Gromm2021-02-041-0/+2
| | | | | | | | | | This patch checks the function parameter 'bytes' before doing the subtraction to prevent memory corruption. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1612282865-21846-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u/ieee80211: fix switch case indentationAnirudh Rayabharam2021-01-311-14/+14
| | | | | | | | | Make switch and case to be at the same indent. This fixes the checkpatch error "switch and case should be at the same indent". Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com> Link: https://lore.kernel.org/r/20210131131226.16917-1-mail@anirudhrb.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: update copyright notesMauro Carvalho Chehab2021-01-312-7/+8
| | | | | | | | | At PMIC subsystem, C89 comments are preferred over C99. While here, also update the copyrights of the header file. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/5a86478c8ccb93d3105485b5f16e20e9c12e2196.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: document registersMauro Carvalho Chehab2021-01-311-7/+32
| | | | | | | | | | Make it clearer about how the IRQ registers are filled by adding a table with them, with two macros used to calculate the mask register. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/10f52ec0a8346fb883245344886c44714c859cd1.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: cleanup IRQ handling codeMauro Carvalho Chehab2021-01-311-39/+29
| | | | | | | | | | | | | | - Use BIT() and GENMASK(); - Remove duplicated mask definitions; - Simplify the code under IRQ handler; - Add a few extra blank lines to make easier to see spin_lock/spin_unlock; - Remove debug code; - Fix a few minor coding style issues. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/f9fcb184e7cbe8701298085df76d5d9fd285b2c5.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: fix IRQ handler codeMauro Carvalho Chehab2021-01-311-1/+1
| | | | | | | | | | The conversion to regmap introduced a regression at the code which reads from the IRQ register. Address that. Fixes: fb02e3ebfb2d ("staging: hikey9xx: spmi driver: convert to regmap") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/2eae710c333a8ee6f9e0a086c84115bc90a782ca.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: cleanup header fileMauro Carvalho Chehab2021-01-312-20/+17
| | | | | | | | | | | | | Remove the IRQ list from the header, as this is used only inside the driver itself. Also, get rid of two unused defines. The net result is that only struct hi6421_spmi_pmic remains on it, as this is used by the regulator driver. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/138c3a11e4de0ebabdf27932957852136c2f7510.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: cleanup probe codeMauro Carvalho Chehab2021-01-311-34/+16
| | | | | | | | | | | | Cleanup the error handling code, making the messages more consistent and removing an uneeded call to free_irq(). While here, also remove debug messages and make the error messages more consistent. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/651b4053599b9f25efecac3b1d4ce6abce0bd097.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: rename some varsMauro Carvalho Chehab2021-01-313-58/+58
| | | | | | | | | | | | - When referring to regmap, rename map to regmap - inside hi6421-spmi-pmic, call private data struct as ddata. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/d23592b11ac606e3b9a3ff95a754cb75921e60aa.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: use some regmap helpersMauro Carvalho Chehab2021-01-311-42/+3
| | | | | | | | | | | Now that the driver was ported to use regmap, let's use some help functions in order to simplify the code a little bit. Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/5bdd7988fb9bf5d3ebee03724cf73cc04d9bc47b.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: spmi driver: convert to regmapMauro Carvalho Chehab2021-01-314-96/+54
| | | | | | | | | Instead of doing its own SPMI I/O implementation, use the already-existing regmap one. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/7084885f3007ca5daf0d5bc85d038e26ee82dc0d.1611949675.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.cIlya Lipnitskiy2021-01-312-2/+2
| | | | | | | | | | | | | | | | | | Also use KBUILD_MODNAME for module name. This driver is only used by RALINK MIPS MT7621 SoCs. Tested by building against that target using OpenWrt with Linux 5.10.10. Fixes the following error: error: the following would cause module name conflict: drivers/dma/mediatek/mtk-hsdma.ko drivers/staging/mt7621-dma/mtk-hsdma.ko Cc: stable@vger.kernel.org Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Link: https://lore.kernel.org/r/20210130034507.2115280-1-ilya.lipnitskiy@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge/qlge_ethtool.c: Switch from strlcpy to strscpyKumar Kartikeya Dwivedi2021-01-311-3/+3
| | | | | | | | | | | | | | strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. This silences the related checkpatch warnings from: 5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20210130044828.121248-1-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:r8188eu: replace enum WIFI_STATUS_CODE with native kernel definitionsIvan Safonov2021-01-312-36/+22
| | | | | | | | | Driver and kernel definitions are equal. Avoid code duplication, improve readability. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20210131080618.25184-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:rtl8712: remove unused enum WIFI_STATUS_CODEIvan Safonov2021-01-311-14/+0
| | | | | | | | Improve readability. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20210131080912.25264-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wimax/i2400m: fix pointer declaration styleAnirudh Rayabharam2021-01-311-2/+2
| | | | | | | | | | Fix a couple of pointer declarations where the pointer qualifier '*' is not attached to the variable name. This fixes the checkpatch error: "foo * bar" should be "foo *bar". Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com> Link: https://lore.kernel.org/r/20210130174454.11810-1-mail@anirudhrb.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: add documentation for debugging qlgeCoiby Xu2021-01-294-0/+143
| | | | | | | | | Instructions and examples on kernel data structures dumping and coredump. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-9-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: clean up debugging code in the QL_ALL_DUMP ifdef landCoiby Xu2021-01-295-782/+1
| | | | | | | | | | | | | | | | | | | | | | The debugging code in the following ifdef land - QL_ALL_DUMP - QL_REG_DUMP - QL_DEV_DUMP - QL_CB_DUMP - QL_IB_DUMP - QL_OB_DUMP becomes unnecessary because, - Device status and general registers can be obtained by ethtool. - Coredump can be done via devlink health reporter. - Structure related to the hardware (struct ql_adapter) can be obtained by crash or drgn. Link: https://lkml.org/lkml/2020/6/30/19 Suggested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-8-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: remove mpi_core_to_log which sends coredump to the kernel ↵Coiby Xu2021-01-296-25/+0
| | | | | | | | | | | ring buffer devlink health could be used to get coredump. No need to send so much data to the kernel ring buffer. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-7-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: support force_coredump option for devlink health dumpCoiby Xu2021-01-291-0/+13
| | | | | | | | | | | | With force_coredump module parameter set, devlink health dump will reset the MPI RISC first which takes 5 secs to be finished. Note that only NIC function that owns the firmware can do the force_dumping. Otherwise devlink will receive an EPERM error. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-6-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: coredump via devlink health reporterCoiby Xu2021-01-291-6/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | $ devlink health dump show DEVICE reporter coredump -p -j { "Core Registers": { "segment": 1, "values": [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ] }, "Test Logic Regs": { "segment": 2, "values": [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ] }, "RMII Registers": { "segment": 3, "values": [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ] }, ... "Sem Registers": { "segment": 50, "values": [ 0,0,0,0 ] } } Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-5-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: re-write qlge_init_deviceCoiby Xu2021-01-291-12/+20
| | | | | | | | | | | | | | Stop calling ql_release_all in qlge_init_device and free things one step at a time. struct qlge_adapter *qdev is now a private structure of struct devlink and memset is not necessary. Link: https://lore.kernel.org/patchwork/patch/1321092/#1516928 Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-4-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: Initialize devlink health dump frameworkCoiby Xu2021-01-297-66/+151
| | | | | | | | | | | | | | | | | Initialize devlink health dump framework for the qlge driver so the coredump could be done via devlink. struct qlge_adapter is now used as the private data structure of struct devlink so it could exist independently of struct net_device and devlink reload could be supported in the future. The private data of PCIe driver now points to qlge_adapter. Since devlink_alloc will zero out struct qlge_adapter, memset in qlge_init_device is not necessary. Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-3-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: qlge: use qlge_* prefix to avoid namespace clashes with other ↵Coiby Xu2021-01-296-1572/+1567
| | | | | | | | | | | | | | | | | | | | | qlogic drivers To avoid namespace clashes with other qlogic drivers and also for the sake of naming consistency, use the "qlge_" prefix as suggested in drivers/staging/qlge/TODO, - For existing ql_ prefix, sed -i "s/ql_/qlge_/g" *.{c,h} - for structs not having a prefix 1. get a list of structs grep "struct.*{" qlge. 2. add qlge_ for each struct, e.g., sed -i "s/ib_ae_iocb_rsp/qlge_ib_ae_iocb_rsp/g" *.{c,h} Link: https://lore.kernel.org/patchwork/patch/1318503/#1516131 Suggested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20210123104613.38359-2-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: vc4_services: bcm2835-audio: Add SNDRV_PCM_INFO_BATCH flagDylan Van Assche2021-01-291-2/+2
| | | | | | | | | | | | | | | | | Playing audio with PulseAudio and the bcm2835-pcm driver results in distorted sound. Timer-based scheduling does not properly work with bcm2835-pcm since configuring PulseAudio with tsched=0 avoids this problem. Setting the SNDRV_PCM_INFO_BATCH flag prevents PulseAudio to use timer-based scheduling by default. Settings this flag makes audio works out of the box. Based on: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7f2430cda819a9ecb1df5a0f3ef4f1c20db3f811 Signed-off-by: Dylan Van Assche <me@dylanvanassche.be> Link: https://lore.kernel.org/r/20210127174348.10192-1-me@dylanvanassche.be Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: net: wimax: i2400m: fw: remove redundant initialization of variable ↵Colin Ian King2021-01-291-1/+1
| | | | | | | | | | | | | result The variable result 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/20210128173703.645328-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: simplify includesMauro Carvalho Chehab2021-01-261-8/+0
| | | | | | | | There are several uneeded includes. Remove them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/50087bb41fc262d6930aeda0583546cf9d597b87.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421-spmi-pmic: update copyrightMauro Carvalho Chehab2021-01-261-17/+7
| | | | | | | | | Remove the GPL boilerplate, as SPDX tag already points to the license terms and add a new copyright for Huawei. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/18b36d01c04519d84912140b6c40c1bd1f75a3a8.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hisilicon, hi6421-spmi-pmic.yaml: cleanup a warningMauro Carvalho Chehab2021-01-261-0/+2
| | | | | | | | | There's no additionalProperties field at the yaml file, causing a warning when checking it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/1920935fc7320f8d03ed3c89625fa865adcf4390.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: fix get_optimum_modeMauro Carvalho Chehab2021-01-261-1/+1
| | | | | | | | | | | | | | | During the driver refactor, a regression broke the logic inside hi6421_spmi_regulator_get_optimum_mode(). Basically, if a LDO has eco_uA == 0, it doesn't support economic mode. So, it should return REGULATOR_MODE_NORMAL. If economic mode is supported, it can return either REGULATOR_MODE_IDLE or REGULATOR_MODE_NORMAL, depending on the load current. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/f087981eb695eaab8c301c42977a4aa884affbbf.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: cleanup commentsMauro Carvalho Chehab2021-01-261-16/+11
| | | | | | | | | | | | | Remove obvious comments and fix the comment for the HI6421V600_LDO() macro. While on it, use kernel-doc notation for HI6421V600_LDO(), as kernel-doc can check if the arguments match its description. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/d5e6dbdee5f7e143300249251ddbe09fdf64e669.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: fix delay logicMauro Carvalho Chehab2021-01-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | The original driver, which can be seen at commit 42f24d9d446a ("staging: regulator: add a regulator driver for HiSilicon 6421v600 SPMI PMIC") had a complex logic to ensure that there won't be multiple power enable/disable commands running at the same time. At the original logic, it were ensured that: - a next power up/down would wait for at least the on/off period; - an extra delay would be granted. It turns that such extra delay has a value of zero, but it was relying on gettimeofday() call, which can take some time. This was later simplified, but there are still some possible issues. In order to avoid that, let's simply add a delay to wait for the power up line to stabilize after powering up a device. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/6733dac9813ba6688def404142cb7b964accf758.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: update copyrightMauro Carvalho Chehab2021-01-261-9/+1
| | | | | | | | | Remove the GPL boilerplate, as SPDX tag already points to the license terms and add a new copyright for Huawei. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/80d2d21c3d327e3acc89d016b20bd2d93e9c6f65.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: do some cleanupsMauro Carvalho Chehab2021-01-261-22/+15
| | | | | | | | | | | | | In preparation for de-staging, do some cleanups: - Return error codes from hi6421_spmi_pmic_rmw(); - Remove a debug message; - Change the module description; - a few minor coding style adjustments. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/0bae0c05d997e4a5a0b3b86a65f3370dafb14596.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: get rid of an static dataMauro Carvalho Chehab2021-01-261-4/+6
| | | | | | | | Move it to be inside the private data struct. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/ff8b6852c788fd476743eb4ce556e4a97f4b928e.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: cleanup debug msgsMauro Carvalho Chehab2021-01-261-43/+4
| | | | | | | | | | While those were useful during port time from downstream version, let's get rid of them for good, as it is possible to get about the same things by enabling regulator debugging code. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/be1b704fcba9f1dd0559174835f1e5390df1cf94.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: move LDO config from DTMauro Carvalho Chehab2021-01-261-227/+152
| | | | | | | | | Instead of storing regulator LDO configuration inside the DT, move it to be part of the driver itself. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/46b16fdf4ad924b5d9a06139cd7ff2dae28d5a6c.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hi6421v600-regulator: do some cleanupsMauro Carvalho Chehab2021-01-261-27/+16
| | | | | | | | | Use C99 comments at the beginning of the file and remove uneeded includes. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/cc0017d65b49ceb7df0357cec3a2dc1c4c2a118d.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hisilicon, hi6421-spmi-pmic.yaml: simplify propsMauro Carvalho Chehab2021-01-261-66/+40
| | | | | | | | | As all regulator-specific properties got moved to be part of the driver, remove them from the DT spec. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/2c2d09e332afa6539e5e80d69b23622941fd3d3e.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: hisilicon, hisi-spmi-controller.yaml fix bindingsMauro Carvalho Chehab2021-01-261-3/+16
| | | | | | | | Fix a few warnings produced by make dt_binding_check. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/fca7260e7c61f073ae376ab23f58856ba5a87a7a.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: phy-hi3670-usb3.yaml: add a blank lineMauro Carvalho Chehab2021-01-261-0/+1
| | | | | | | | Add a blank line after maintainers field. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/2bd13d3e141fd8826a8e791e5c65e877c6233966.1611052729.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: hikey9xx: phy-hi3670-usb3: hi3670_is_abbclk_seleted() returns boolMauro Carvalho Chehab2021-01-261-7/+7
| | | | | | | | | | | | | | | There are a few issues on this function: 1. Instead of using 1/0 for true/false, change the type to boolean; 2. there's a typo there: seleted -> selected 3. It's logic is reversed. Address them. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/a579004cfa0cb3cca55c2124a8574a7aeb4eacc3.1611052729.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>