summaryrefslogtreecommitdiff
path: root/drivers/spi
AgeCommit message (Collapse)AuthorFilesLines
2023-11-04Merge tag 'usb-6.7-rc1' of ↵Linus Torvalds3-0/+309
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/Thunderbolt updates from Greg KH: "Here is the "big" set of USB and Thunderbolt changes for 6.7-rc1. Nothing really major in here, just lots of constant development for new hardware. Included in here are: - Thunderbolt (i.e. USB4) fixes for reported issues and support for new hardware types and devices - USB typec additions of new drivers and cleanups for some existing ones - xhci cleanups and expanded tracing support and some platform specific updates - USB "La Jolla Cove Adapter (LJCA)" support added, and the gpio, spi, and i2c drivers for that type of device (all acked by the respective subsystem maintainers.) - lots of USB gadget driver updates and cleanups - new USB dwc3 platforms supported, as well as other dwc3 fixes and cleanups - USB chipidea driver updates - other smaller driver cleanups and additions, full details in the shortlog All of these have been in the linux-next tree for a while with no reported problems" * tag 'usb-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (167 commits) usb: gadget: uvc: Add missing initialization of ssp config descriptor usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility usb: raw-gadget: report suspend, resume, reset, and disconnect events usb: raw-gadget: don't disable device if usb_ep_queue fails usb: raw-gadget: properly handle interrupted requests usb:cdnsp: remove TRB_FLUSH_ENDPOINT command usb: gadget: aspeed_udc: Convert to platform remove callback returning void dt-bindings: usb: fsa4480: Add compatible for OCP96011 usb: typec: fsa4480: Add support to swap SBU orientation dt-bindings: usb: fsa4480: Add data-lanes property to endpoint usb: typec: tcpm: Fix NULL pointer dereference in tcpm_pd_svdm() Revert "dt-bindings: usb: Add bindings for multiport properties on DWC3 controller" Revert "dt-bindings: usb: qcom,dwc3: Add bindings for SC8280 Multiport" thunderbolt: Fix one kernel-doc comment usb: gadget: f_ncm: Always set current gadget in ncm_bind() usb: core: Remove duplicated check in usb_hub_create_port_device usb: typec: tcpm: Add additional checks for contaminant arm64: dts: rockchip: rk3588s: Add USB3 host controller usb: dwc3: add optional PHY interface clocks dt-bindings: usb: add rk3588 compatible to rockchip,dwc3 ...
2023-10-30spi: Merge up fixMark Brown8-10/+30
One small fix that didn't seem worth sending before the merge window.
2023-10-23spi: omap2-mcspi: Add FIFO support without DMAVaishnav Achath1-8/+129
Currently, the built-in 64-byte FIFO on the MCSPI controller is not enabled in PIO mode and is used only when DMA is enabled. Enable the FIFO in PIO mode by default for transactions larger than the FIFO depth and fallback only if FIFO is not available. When DMA is not enabled, it is efficient to enable the RX FIFO almost full and TX FIFO almost empty events after each FIFO fill instead of each word. Update omap2_mcspi_set_fifo() to enable the events accordingly and also rely on OMAP2_MCSPI_CHSTAT_RXS for the last transfer instead of the FIFO events to handle the case when the transfer size is not a multiple of FIFO depth. See J721E Technical Reference Manual (SPRUI1C), section 12.1.5 for further details: http://www.ti.com/lit/pdf/spruil1 Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Link: https://lore.kernel.org/r/20231013092629.19005-1-vaishnav.a@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-17spi: stm32: Explicitly include correct DT includesRob Herring1-1/+2
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231017203352.2698326-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-16spi: Export acpi_spi_find_controller_by_adev()Hans de Goede1-3/+2
Export acpi_spi_find_controller_by_adev() so that ACPI glue code which wants to dynamically create a spi_device using acpi_spi_device_alloc() or spi_new_device() on a controller, to which the code does not already have a reference, can find the controller. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231014205314.59333-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-16spi: nxp-fspi: use the correct ioremap functionHan Xu1-1/+1
AHB memory as MMIO should be mapped with ioremap rather than ioremap_wc, which should have been used initially just to handle unaligned access as a workaround. Fixes: d166a73503ef ("spi: fspi: dynamically alloc AHB memory") Signed-off-by: Han Xu <han.xu@nxp.com> Link: https://lore.kernel.org/r/20231010201524.2021340-1-han.xu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-11spi: Add support for Intel LJCA USB SPI driverWentong Wu3-0/+309
Implements the SPI function of Intel USB-I2C/GPIO/SPI adapter device named "La Jolla Cove Adapter" (LJCA). It communicate with LJCA SPI module with specific protocol through interfaces exported by LJCA USB driver. Signed-off-by: Wentong Wu <wentong.wu@intel.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/1696833205-16716-4-git-send-email-wentong.wu@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-10spi: Add RZ/V2M CSI target supportMark Brown2-45/+85
Merge series from Fabrizio Castro <fabrizio.castro.jz@renesas.com>: The CSI IP found inside the Renesas RZ/V2M SoC supports both SPI host and target. This series extends the CSI dt-bindings and driver to add SPI target support.
2023-10-10spi: bcm2835: add a sentinel at the end of the lookup arrayBartosz Golaszewski1-1/+1
GPIOLIB expects the array of lookup entries to be terminated with an empty member. We need to increase the size of the variable length array in the lookup table by 1. Fixes: 21f252cd29f0 ("spi: bcm2835: reduce the abuse of the GPIO API") Reported-by: Hans de Goede <hdegoede@redhat.com> Closes: https://lore.kernel.org/lkml/29764d46-8d3d-9794-bbde-d7928a91cbb5@redhat.com/ Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231004183906.97845-1-brgl@bgdev.pl Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09spi: spi-geni-qcom: Rename the label unmap_if_dmaVijaya Krishna Nivarthi1-3/+3
The code at unmap_if_dma label doesn't contain unmapping dma anymore but has only fsm reset. Rename it to reset_if_dma accordingly. No functional change. Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/1696614170-18969-1-git-send-email-quic_vnivarth@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09spi: rzv2m-csi: Add target mode supportFabrizio Castro2-45/+85
The CSI IP found inside the Renesas RZ/V2M SoC supports both SPI host and SPI target roles. When working in target mode, the CSI IP has the option of using its Slave Selection (SS) pin to enable TX and RX operations. Since the SPI target cannot control the clock, when working as target it's best not to stop operations during a transfer, as by doing so the IP will not send or receive data, regardless of clock and active level on pin SS. A side effect from not stopping operations is that the RX FIFO needs to be flushed, word by word, when RX data needs to be discarded. Finally, when in target mode timings are tighter, as missing a deadline translates to errors being thrown, resulting in aborting the transfer. In order to speed things up, we can avoid waiting for the TX FIFO to be empty, we can just wait for the RX FIFO to contain at least the number of words that we expect. Add target support to the currently existing CSI driver. Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com> Link: https://lore.kernel.org/r/20230927162508.328736-3-fabrizio.castro.jz@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06spi: spidev: make spidev_class constantGreg Kroah-Hartman1-8/+10
Now that the driver core allows for struct class to be in read-only memory, we should make all 'class' structures declared at build time placing them into read-only memory, instead of having to be dynamically allocated at runtime. Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/2023100639-celtic-herbs-66be@gregkh Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-06spi: mpc52xx-psc: Make mpc52xx_psc_spi_transfer_one_message() staticGeert Uytterhoeven1-2/+2
With W=1: drivers/spi/spi-mpc52xx-psc.c:178:5: warning: no previous prototype for ‘mpc52xx_psc_spi_transfer_one_message’ [-Wmissing-prototypes] 178 | int mpc52xx_psc_spi_transfer_one_message(struct spi_controller *ctlr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mpc52xx_psc_spi_transfer_one_message() is only used inside the file that defines it. Hence fix this by making it static. Fixes: 145cfc3840e5931a ("spi: mpc52xx-psc: Switch to using core message queue") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202310061815.7Rtyi4hs-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20231006112945.1491265-1-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-02spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0William A. Kennington III1-2/+3
We don't want to use the value of ilog2(0) as dummy.buswidth is 0 when dummy.nbytes is 0. Since we have no dummy bytes, we don't need to configure the dummy byte bits per clock register value anyway. Signed-off-by: "William A. Kennington III" <william@wkennington.com> Link: https://lore.kernel.org/r/20230922182812.2728066-1-william@wkennington.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-27spi: spi-gxp: BUG: Correct spi write return valueCharles Kearney1-1/+1
Bug fix to correct return value of gxp_spi_write function to zero. Completion of succesful operation should return zero. Fixes: 730bc8ba5e9e spi: spi-gxp: Add support for HPE GXP SoCs Signed-off-by: Charles Kearney <charles.kearney@hpe.com> Link: https://lore.kernel.org/r/20230920215339.4125856-2-charles.kearney@hpe.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-26spi: spi-cadence-quadspi: Fix missing unwind goto warningsDhruva Gole1-2/+5
The following smatch warnings [0] were recently introduced: drivers/spi/spi-cadence-quadspi.c:1882 cqspi_probe() warn: missing unwind goto? Fix these warnings by releasing dma channel and adding a goto fail probe. [0] https://lore.kernel.org/all/5e21c351-cd08-443e-8509-aecf242a4da9@kadam.mountain/ Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202309140543.03dMbMM5-lkp@intel.com/ Signed-off-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20230919074658.41666-1-d-gole@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-26spi: omap2-mcspi: Fix hardcoded reference clockVaishnav Achath1-11/+20
A hardcoded reference clock of 48 MHz is used to calculate the clock divisor values, but the reference clock frequency can be different across devices and can be configured which can cause a mismatch between the reported frequency and actual SPI clock frequency observed. Fix this by fetching the clock rate from the clock provider and falling back to hardcoded reference only if the clock is not supplied. Fixes: 2cd7d393f461 ("arm64: dts: ti: k3-am654: Add McSPI DT nodes") Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20230926113812.30692-1-vaishnav.a@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-26spi: qup: Allow scaling power domains andMark Brown1-1/+49
Merge series from Stephan Gerhold <stephan.gerhold@kernkonzept.com>: Make it possible to scale performance states of the power domain and interconnect of the SPI QUP controller in relation to the selected SPI speed / core clock. This is done separately by: - Parsing the OPP table from the device tree for performance state votes of the power domain - Voting for the necessary bandwidth on the interconnect path to DRAM
2023-09-25spi: at91-usart: Remove some dead codeChristophe JAILLET1-18/+4
dma_request_chan() does not return NULL. It returns a valid pointer or an error pointer. So, some dead code can be removed. The IS_ERR_OR_NULL() in the error handling path are still needed, because the error handling path is common to the whole function and the ctlr->dma_xx are NULL when at91_usart_spi_configure_dma() is called. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/84eb08daf85d203b34af9d8d08abf86804211413.1694961365.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-25spi: qup: Vote for interconnect bandwidth to DRAMStephan Gerhold1-0/+38
When the SPI QUP controller is used together with a DMA engine it needs to vote for the interconnect path to the DRAM. Otherwise it may be unable to access the memory quickly enough. The requested peak bandwidth is dependent on the SPI core/bus clock so that the bandwidth scales together with the selected SPI speed. To avoid sending votes too often the bandwidth is always requested when a DMA transfer starts, but dropped only on runtime suspend. Runtime suspend should only happen if no transfer is active. After resumption we can defer the next vote until the first DMA transfer actually happens. Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> Link: https://lore.kernel.org/r/20230919-spi-qup-dvfs-v2-4-1bac2e9ab8db@kernkonzept.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-25spi: qup: Parse OPP table for DVFS supportStephan Gerhold1-1/+11
Parse the OPP table from the device tree and use dev_pm_opp_set_rate() instead of clk_set_rate() to allow making performance state for power domains specified in the OPP table. This is needed to guarantee correct behavior of the clock, especially with the higher clock/SPI bus frequencies. Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> Link: https://lore.kernel.org/r/20230919-spi-qup-dvfs-v2-2-1bac2e9ab8db@kernkonzept.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-22spi: mchp-pci1xxxx: Annotate struct pci1xxxx_spi with __counted_byKees Cook1-1/+1
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct pci1xxxx_spi. [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci Cc: Mark Brown <broonie@kernel.org> Cc: linux-spi@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20230922175322.work.170-kees@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-22spi: cs42l43: Remove spurious pm_runtime_disableCharles Keepax1-1/+0
A pm_runtime_disable was left in when the driver was ported to use devm_pm_runtime_enable, remove it. Fixes: ef75e767167a ("spi: cs42l43: Add SPI controller support") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230922090829.1467594-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-19spi: Merge up old fixMark Brown1-4/+8
This fix was originally queued at the end of the 6.4 cycle but as it was minor it never actually got sent.
2023-09-18spi: bcm2835: reduce the abuse of the GPIO APIBartosz Golaszewski1-24/+34
Currently the bcm2835 SPI driver uses functions that are available exclusively to GPIO providers as a way to handle a platform quirk. Let's use a slightly better alternative that avoids poking around in GPIOLIB's internals and use GPIO lookup tables. Link: https://www.spinics.net/lists/linux-gpio/msg36218.html Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230911161553.24313-1-brgl@bgdev.pl Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-18spi: Drop warning from spi_stop_queue()Uwe Kleine-König1-4/+0
Both callers of spi_stop_queue() (i.e. spi_destroy_queue() and spi_controller_suspend()) already emit an error message if spi_stop_queue() fails. Another warning in this case isn't helpful, so drop it. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230916161235.1050176-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-18spi: imx: Take in account bits per word instead of assuming 8-bitsStefan Moring1-1/+1
The IMX spi driver has a hardcoded 8, breaking the driver for word lengths other than 8. Signed-off-by: Stefan Moring <stefanmoring@gmail.com> Reported-by: Sebastian Reichel <sre@kernel.org> Fixes: 15a6af94a277 ("spi: Increase imx51 ecspi burst length based on transfer length") Tested-by: Sebastian Reichel <sre@kernel.org> Link: https://lore.kernel.org/r/20230917164037.29284-1-stefanmoring@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-12spi: Use devm_clk_get_*() helper function toMark Brown25-413/+88
Merge series from Li Zetao <lizetao1@huawei.com>: Commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks") provides a new helper function for prepared and enabled clocks when a driver keeps a clock prepared (or enabled) during the whole lifetime of the driver. So where drivers get clocks and enable them immediately, it can be combined into a single function devm_clk_get_*(). Moreover, the unprepare and disable function has been registered to devm_clk_state, and before devm_clk_state is released, the clocks will be unprepareed and disable, so it is unnecessary to unprepare and disable clocks explicitly when remove drivers or in the error handling path.
2023-09-11spi: switch to use modern name (part3)Mark Brown21-628/+628
Merge series from Yang Yingliang <yangyingliang@huawei.com>: I'm trying to rename the legacy name to modern name used in SPI drivers, this is part3 patchset. After introducing devm_spi_alloc_host/spi_alloc_host(), the legacy named function devm_spi_alloc_master/spi_alloc_master() can be replaced. And also change other legacy name master/slave to modern name host/target or controller. Each patch compile test passed.
2023-09-11spi: intel-pci: Add support for Granite Rapids SPI serial flashMika Westerberg1-0/+1
Intel Granite Rapids has a flash controller that is compatible with the other Cannon Lake derivatives. Add Granite Rapids PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Link: https://lore.kernel.org/r/20230911074616.3473347-1-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spidev: A few cleanupsMark Brown1-15/+9
Merge series from Andy Shevchenko <andriy.shevchenko@linux.intel.com>: A few cleanups to the spidev.c to utilize existing APIs and make it use less amount of Lines of Code. No functional change intended.
2023-09-11spi: spi-cadence-quadspi: add runtime pm supportDhruva Gole1-9/+33
Add runtime pm support to cadence-qspi driver, this allows the driver to suspend whenever it's is not actively being used thus reducing active power consumed by the system. Also, with the use of devm_pm_runtime_enable we no longer need the fallback probe_pm_failed that used to pm_runtime_disable Co-developed-by: Apurva Nandan <a-nandan@ti.com> Signed-off-by: Apurva Nandan <a-nandan@ti.com> Signed-off-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20230829062706.786637-1-d-gole@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: tegra: Fix missing IRQ check in tegra_slink_probe()Zhang Shurong1-0/+2
This func misses checking for platform_get_irq()'s call and may passes the negative error codes to request_irq(), which takes unsigned IRQ #, causing it to fail with -EINVAL, overriding an original error code. Fix this by stop calling request_irq() with invalid IRQ #s. Fixes: dc4dc3605639 ("spi: tegra: add spi driver for SLINK controller") Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com> Reviewed-by: Helen Koike <helen.koike@collabora.com> Link: https://lore.kernel.org/r/tencent_73FCC06A3D1C14EE5175253C6FB46A07B709@qq.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: rockchip: Use helper function devm_clk_get_enabled()Li Zetao1-25/+5
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-26-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: spl022: Use helper function devm_clk_get_enabled()Li Zetao1-10/+1
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Moreover, the label "err_no_clk_en" is no used, drop it for clean code. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-25-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: pic32: Use helper function devm_clk_get_enabled()Li Zetao1-7/+1
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-24-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: pic32-sqi: Use helper function devm_clk_get_enabled()Li Zetao1-24/+3
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-23-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: orion: Use helper function devm_clk_get_enabled()Li Zetao1-9/+2
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-22-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: npcm-fiu: Use helper function devm_clk_get_enabled()Li Zetao1-11/+3
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-21-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: mtk-snfi: Use helper function devm_clk_get_enabled()Li Zetao1-52/+9
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Also, devm_clk_get_optional() and clk_prepare_enable() can now be replaced by devm_clk_get_optional_enabled().Moreover, the two functions mtk_snand_enable_clk() and mtk_snand_disable_clk() no longer are used, drop them for clean code. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-20-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: microchip-core: Use helper function devm_clk_get_enabled()Li Zetao1-8/+1
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-19-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: microchip-core-qspi: Use helper function devm_clk_get_enabled()Li Zetao1-22/+7
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-18-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: spi-meson-spifc: Use helper function devm_clk_get_enabled()Li Zetao1-14/+3
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Moreover, the lable "out_clk" no longer makes sense, rename it to "out_pm". Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-17-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: meson-spicc: Use helper function devm_clk_get_enabled()Li Zetao1-27/+6
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-16-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: lantiq-ssc: Use helper function devm_clk_get_enabled()Li Zetao1-8/+2
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-15-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: spi-fsl-dspi: Use helper function devm_clk_get_enabled()Li Zetao1-9/+3
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-14-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: dw-mmio: Use helper function devm_clk_get_*()Li Zetao1-22/+9
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Also, devm_clk_get_optional() and clk_prepare_enable() can now be replaced by devm_clk_get_optional_enabled(). Moreover, the lable "out_clk" no longer makes sense, rename it to "out_reset". Signed-off-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Serge Semin <fancer.lancer@gmail.com> Link: https://lore.kernel.org/r/20230823133938.1359106-13-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: dw-bt1: Use helper function devm_clk_get_enabled()Li Zetao1-18/+5
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-12-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: davinci: Use helper function devm_clk_get_enabled()Li Zetao1-9/+2
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-11-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11spi: spi-cavium-thunderx: Use helper function devm_clk_get_enabled()Li Zetao1-7/+1
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables (and possibly prepares) the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20230823133938.1359106-10-lizetao1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>