Skip to content

Commit

Permalink
Merge tag 'spi-fix-v6.12-rc5' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A small collection of driver specific fixes for SPI, there's nothing
  particularly remarkable about any of them"

* tag 'spi-fix-v6.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-fsl-dspi: Fix crash when not using GPIO chip select
  spi: geni-qcom: Fix boot warning related to pm_runtime and devres
  spi: mtk-snfi: fix kerneldoc for mtk_snand_is_page_ops()
  spi: stm32: fix missing device mode capability in stm32mp25
  • Loading branch information
Linus Torvalds committed Oct 28, 2024
2 parents 8198375 + 25f00a1 commit e42b1a9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 5 additions & 1 deletion drivers/spi/spi-fsl-dspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ static int dspi_setup(struct spi_device *spi)
u32 cs_sck_delay = 0, sck_cs_delay = 0;
struct fsl_dspi_platform_data *pdata;
unsigned char pasc = 0, asc = 0;
struct gpio_desc *gpio_cs;
struct chip_data *chip;
unsigned long clkrate;
bool cs = true;
Expand Down Expand Up @@ -1077,7 +1078,10 @@ static int dspi_setup(struct spi_device *spi)
chip->ctar_val |= SPI_CTAR_LSBFE;
}

gpiod_direction_output(spi_get_csgpiod(spi, 0), false);
gpio_cs = spi_get_csgpiod(spi, 0);
if (gpio_cs)
gpiod_direction_output(gpio_cs, false);

dspi_deassert_cs(spi, &cs);

spi_set_ctldata(spi, chip);
Expand Down
8 changes: 5 additions & 3 deletions drivers/spi/spi-geni-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,11 @@ static int spi_geni_probe(struct platform_device *pdev)
init_completion(&mas->tx_reset_done);
init_completion(&mas->rx_reset_done);
spin_lock_init(&mas->lock);

ret = geni_icc_get(&mas->se, NULL);
if (ret)
return ret;

pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, 250);
ret = devm_pm_runtime_enable(dev);
Expand All @@ -1125,9 +1130,6 @@ static int spi_geni_probe(struct platform_device *pdev)
if (device_property_read_bool(&pdev->dev, "spi-slave"))
spi->target = true;

ret = geni_icc_get(&mas->se, NULL);
if (ret)
return ret;
/* Set the bus quota to a reasonable value for register access */
mas->se.icc_paths[GENI_TO_CORE].avg_bw = Bps_to_icc(CORE_2X_50_MHZ);
mas->se.icc_paths[CPU_TO_GENI].avg_bw = GENI_DEFAULT_BW;
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi-mtk-snfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ static int mtk_snand_write_page_cache(struct mtk_snand *snf,

/**
* mtk_snand_is_page_ops() - check if the op is a controller supported page op.
* @op spi-mem op to check
* @op: spi-mem op to check
*
* Check whether op can be executed with read_from_cache or program_load
* mode in the controller.
Expand Down
1 change: 1 addition & 0 deletions drivers/spi/spi-stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2044,6 +2044,7 @@ static const struct stm32_spi_cfg stm32mp25_spi_cfg = {
.baud_rate_div_max = STM32H7_SPI_MBR_DIV_MAX,
.has_fifo = true,
.prevent_dma_burst = true,
.has_device_mode = true,
};

static const struct of_device_id stm32_spi_of_match[] = {
Expand Down

0 comments on commit e42b1a9

Please sign in to comment.