* [PATCH] spi: dw: Make dw_spi_update_config()
@ 2026-10-10 15:14 Jisheng Zhang
0 siblings, 0 replies; only message in thread
From: Jisheng Zhang @ 2026-10-10 15:14 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-kernel
After commit da0a672268b3 ("spi: dw: Remove not-going-to-be-supported
code for Baikal SoC"), no users of dw_spi_update_config() any more.
Unexport it and make it static. We can also move two structure
definitions to spi-dw-core.c at the same time.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/spi/spi-dw-core.c | 21 ++++++++++++++++++---
drivers/spi/spi-dw.h | 18 ------------------
2 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c
index 1f0e93800908..2d671e31413e 100644
--- a/drivers/spi/spi-dw-core.c
+++ b/drivers/spi/spi-dw-core.c
@@ -32,6 +32,22 @@ struct dw_spi_chip_data {
u32 rx_sample_dly; /* RX sample delay */
};
+/* Slave spi_transfer/spi_mem_op related */
+struct dw_spi_cfg {
+ u8 tmode;
+ u8 dfs;
+ u32 ndf;
+ u32 freq;
+ u8 spi_frf;
+};
+
+struct dw_spi_enh_cfg {
+ u8 wait_c;
+ u8 inst_l;
+ u8 addr_l;
+ u8 trans_t;
+};
+
#ifdef CONFIG_DEBUG_FS
#define DW_SPI_DBGFS_REG(_name, _off) \
@@ -342,8 +358,8 @@ static u32 dw_spi_prepare_cr0(struct dw_spi *dws, struct spi_device *spi)
return cr0;
}
-void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
- struct dw_spi_cfg *cfg, struct dw_spi_enh_cfg *enh_cfg)
+static void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
+ struct dw_spi_cfg *cfg, struct dw_spi_enh_cfg *enh_cfg)
{
struct dw_spi_chip_data *chip = spi_get_ctldata(spi);
u32 cr0 = chip->cr0;
@@ -406,7 +422,6 @@ void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
dw_writel(dws, DW_SPI_SPI_CTRLR0, cr0);
}
}
-EXPORT_SYMBOL_NS_GPL(dw_spi_update_config, "SPI_DW_CORE");
static void dw_spi_irq_setup(struct dw_spi *dws)
{
diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
index bfdf371bcacb..c16225c5c887 100644
--- a/drivers/spi/spi-dw.h
+++ b/drivers/spi/spi-dw.h
@@ -158,22 +158,6 @@
#define DW_SPI_GET_BYTE(_val, _idx) \
((_val) >> (BITS_PER_BYTE * (_idx)) & 0xff)
-/* Slave spi_transfer/spi_mem_op related */
-struct dw_spi_cfg {
- u8 tmode;
- u8 dfs;
- u32 ndf;
- u32 freq;
- u8 spi_frf;
-};
-
-struct dw_spi_enh_cfg {
- u8 wait_c;
- u8 inst_l;
- u8 addr_l;
- u8 trans_t;
-};
-
struct dw_spi;
struct dw_spi_dma_ops {
int (*dma_init)(struct device *dev, struct dw_spi *dws);
@@ -345,8 +329,6 @@ static inline void dw_spi_shutdown_chip(struct dw_spi *dws)
}
extern void dw_spi_set_cs(struct spi_device *spi, bool enable);
-extern void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
- struct dw_spi_cfg *cfg, struct dw_spi_enh_cfg *enh_cfg);
extern int dw_spi_check_status(struct dw_spi *dws, bool raw);
extern int dw_spi_add_controller(struct device *dev, struct dw_spi *dws);
extern void dw_spi_remove_controller(struct dw_spi *dws);
--
2.53.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-10 15:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-10 15:14 [PATCH] spi: dw: Make dw_spi_update_config() Jisheng Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®