diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-01 06:40:35 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-01 06:40:35 +0300 |
commit | 34aac0a33de21ec6e03b689342c0933a4989fbc2 (patch) | |
tree | 8e7e2470dfcf7d705cc084a38a48bd62f5a90147 /drivers/spi/spi-pic32-sqi.c | |
parent | 9d6c80f8054f75326939b947185ec47ba3755d42 (diff) | |
parent | 1b2e883e1af895b62808b044ac96b77e7c9017b1 (diff) | |
download | linux-34aac0a33de21ec6e03b689342c0933a4989fbc2.tar.xz |
Merge tag 'spi-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown:
"This is a very quiet release for SPI, we've got cleanups and minor
fixes but only a few new driver specific features. The bulk of the
changes in terms of diffstat are the cleanups, plus one bit of
performance work for McSPI.
- Conversions to use devm_clk_get_enabled() and to remove outdated
terms for controller and device
- Device mode support for the Renesas CSI
- Cleanups and improvements to the device tree bindings aimed at
making validation better
- PIO FIFO usage for the OMAP2 McSPI, improving performance"
* tag 'spi-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (75 commits)
spi: omap2-mcspi: Add FIFO support without DMA
spi: stm32: Explicitly include correct DT includes
spi: Export acpi_spi_find_controller_by_adev()
spi: nxp-fspi: use the correct ioremap function
spi: Don't use flexible array in struct spi_message definition
spi: bcm2835: add a sentinel at the end of the lookup array
spi: spi-geni-qcom: Rename the label unmap_if_dma
spi: rzv2m-csi: Add target mode support
spi: renesas,rzv2m-csi: Add CSI (SPI) target related property
spi: spidev: make spidev_class constant
spi: mpc52xx-psc: Make mpc52xx_psc_spi_transfer_one_message() static
spi: spi-cadence-quadspi: Fix missing unwind goto warnings
spi: omap2-mcspi: Fix hardcoded reference clock
spi: dt-bindings: Make "additionalProperties: true" explicit
spi: at91-usart: Remove some dead code
spi: dt-bindings: st,stm32-spi: Move "st,spi-midi-ns" to spi-peripheral-props.yaml
spi: qup: Vote for interconnect bandwidth to DRAM
spi: dt-bindings: qup: Document interconnects
spi: qup: Parse OPP table for DVFS support
spi: dt-bindings: qup: Document power-domains and OPP
...
Diffstat (limited to 'drivers/spi/spi-pic32-sqi.c')
-rw-r--r-- | drivers/spi/spi-pic32-sqi.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/drivers/spi/spi-pic32-sqi.c b/drivers/spi/spi-pic32-sqi.c index 883354d0ff52..3f1e5b27776b 100644 --- a/drivers/spi/spi-pic32-sqi.c +++ b/drivers/spi/spi-pic32-sqi.c @@ -593,33 +593,20 @@ static int pic32_sqi_probe(struct platform_device *pdev) } /* clocks */ - sqi->sys_clk = devm_clk_get(&pdev->dev, "reg_ck"); + sqi->sys_clk = devm_clk_get_enabled(&pdev->dev, "reg_ck"); if (IS_ERR(sqi->sys_clk)) { ret = PTR_ERR(sqi->sys_clk); dev_err(&pdev->dev, "no sys_clk ?\n"); goto err_free_host; } - sqi->base_clk = devm_clk_get(&pdev->dev, "spi_ck"); + sqi->base_clk = devm_clk_get_enabled(&pdev->dev, "spi_ck"); if (IS_ERR(sqi->base_clk)) { ret = PTR_ERR(sqi->base_clk); dev_err(&pdev->dev, "no base clk ?\n"); goto err_free_host; } - ret = clk_prepare_enable(sqi->sys_clk); - if (ret) { - dev_err(&pdev->dev, "sys clk enable failed\n"); - goto err_free_host; - } - - ret = clk_prepare_enable(sqi->base_clk); - if (ret) { - dev_err(&pdev->dev, "base clk enable failed\n"); - clk_disable_unprepare(sqi->sys_clk); - goto err_free_host; - } - init_completion(&sqi->xfer_done); /* initialize hardware */ @@ -629,7 +616,7 @@ static int pic32_sqi_probe(struct platform_device *pdev) ret = ring_desc_ring_alloc(sqi); if (ret) { dev_err(&pdev->dev, "ring alloc failed\n"); - goto err_disable_clk; + goto err_free_host; } /* install irq handlers */ @@ -669,10 +656,6 @@ static int pic32_sqi_probe(struct platform_device *pdev) err_free_ring: ring_desc_ring_free(sqi); -err_disable_clk: - clk_disable_unprepare(sqi->base_clk); - clk_disable_unprepare(sqi->sys_clk); - err_free_host: spi_controller_put(host); return ret; @@ -685,10 +668,6 @@ static void pic32_sqi_remove(struct platform_device *pdev) /* release resources */ free_irq(sqi->irq, sqi); ring_desc_ring_free(sqi); - - /* disable clk */ - clk_disable_unprepare(sqi->base_clk); - clk_disable_unprepare(sqi->sys_clk); } static const struct of_device_id pic32_sqi_of_ids[] = { |