diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/spi/spi-fsl-lpspi.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/spi/spi-fsl-lpspi.c')
| -rw-r--r-- | drivers/spi/spi-fsl-lpspi.c | 14 | 
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index 34488de55587..4b70038ceb6b 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -425,7 +425,7 @@ static int fsl_lpspi_setup_transfer(struct spi_controller *controller,  	if (fsl_lpspi->is_only_cs1)  		fsl_lpspi->config.chip_select = 1;  	else -		fsl_lpspi->config.chip_select = spi->chip_select; +		fsl_lpspi->config.chip_select = spi_get_chipselect(spi, 0);  	if (!fsl_lpspi->config.speed_hz)  		fsl_lpspi->config.speed_hz = spi->max_speed_hz; @@ -910,9 +910,14 @@ static int fsl_lpspi_probe(struct platform_device *pdev)  	ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);  	if (ret == -EPROBE_DEFER)  		goto out_pm_get; -  	if (ret < 0)  		dev_err(&pdev->dev, "dma setup error %d, use pio\n", ret); +	else +		/* +		 * disable LPSPI module IRQ when enable DMA mode successfully, +		 * to prevent the unexpected LPSPI module IRQ events. +		 */ +		disable_irq(irq);  	ret = devm_spi_register_controller(&pdev->dev, controller);  	if (ret < 0) { @@ -937,7 +942,7 @@ out_controller_put:  	return ret;  } -static int fsl_lpspi_remove(struct platform_device *pdev) +static void fsl_lpspi_remove(struct platform_device *pdev)  {  	struct spi_controller *controller = platform_get_drvdata(pdev);  	struct fsl_lpspi_data *fsl_lpspi = @@ -946,7 +951,6 @@ static int fsl_lpspi_remove(struct platform_device *pdev)  	fsl_lpspi_dma_exit(controller);  	pm_runtime_disable(fsl_lpspi->dev); -	return 0;  }  static int __maybe_unused fsl_lpspi_suspend(struct device *dev) @@ -983,7 +987,7 @@ static struct platform_driver fsl_lpspi_driver = {  		.pm = &fsl_lpspi_pm_ops,  	},  	.probe = fsl_lpspi_probe, -	.remove = fsl_lpspi_remove, +	.remove_new = fsl_lpspi_remove,  };  module_platform_driver(fsl_lpspi_driver);  |