Skip to content

Commit e42b1a9

Browse files
committed
Merge tag 'spi-fix-v6.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents 8198375 + 25f00a1 commit e42b1a9

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

drivers/spi/spi-fsl-dspi.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,7 @@ static int dspi_setup(struct spi_device *spi)
10031003
u32 cs_sck_delay = 0, sck_cs_delay = 0;
10041004
struct fsl_dspi_platform_data *pdata;
10051005
unsigned char pasc = 0, asc = 0;
1006+
struct gpio_desc *gpio_cs;
10061007
struct chip_data *chip;
10071008
unsigned long clkrate;
10081009
bool cs = true;
@@ -1077,7 +1078,10 @@ static int dspi_setup(struct spi_device *spi)
10771078
chip->ctar_val |= SPI_CTAR_LSBFE;
10781079
}
10791080

1080-
gpiod_direction_output(spi_get_csgpiod(spi, 0), false);
1081+
gpio_cs = spi_get_csgpiod(spi, 0);
1082+
if (gpio_cs)
1083+
gpiod_direction_output(gpio_cs, false);
1084+
10811085
dspi_deassert_cs(spi, &cs);
10821086

10831087
spi_set_ctldata(spi, chip);

drivers/spi/spi-geni-qcom.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,11 @@ static int spi_geni_probe(struct platform_device *pdev)
11161116
init_completion(&mas->tx_reset_done);
11171117
init_completion(&mas->rx_reset_done);
11181118
spin_lock_init(&mas->lock);
1119+
1120+
ret = geni_icc_get(&mas->se, NULL);
1121+
if (ret)
1122+
return ret;
1123+
11191124
pm_runtime_use_autosuspend(&pdev->dev);
11201125
pm_runtime_set_autosuspend_delay(&pdev->dev, 250);
11211126
ret = devm_pm_runtime_enable(dev);
@@ -1125,9 +1130,6 @@ static int spi_geni_probe(struct platform_device *pdev)
11251130
if (device_property_read_bool(&pdev->dev, "spi-slave"))
11261131
spi->target = true;
11271132

1128-
ret = geni_icc_get(&mas->se, NULL);
1129-
if (ret)
1130-
return ret;
11311133
/* Set the bus quota to a reasonable value for register access */
11321134
mas->se.icc_paths[GENI_TO_CORE].avg_bw = Bps_to_icc(CORE_2X_50_MHZ);
11331135
mas->se.icc_paths[CPU_TO_GENI].avg_bw = GENI_DEFAULT_BW;

drivers/spi/spi-mtk-snfi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ static int mtk_snand_write_page_cache(struct mtk_snand *snf,
11871187

11881188
/**
11891189
* mtk_snand_is_page_ops() - check if the op is a controller supported page op.
1190-
* @op spi-mem op to check
1190+
* @op: spi-mem op to check
11911191
*
11921192
* Check whether op can be executed with read_from_cache or program_load
11931193
* mode in the controller.

drivers/spi/spi-stm32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,6 +2044,7 @@ static const struct stm32_spi_cfg stm32mp25_spi_cfg = {
20442044
.baud_rate_div_max = STM32H7_SPI_MBR_DIV_MAX,
20452045
.has_fifo = true,
20462046
.prevent_dma_burst = true,
2047+
.has_device_mode = true,
20472048
};
20482049

20492050
static const struct of_device_id stm32_spi_of_match[] = {

0 commit comments

Comments
 (0)