From: Jisheng Zhang <jszhang@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] spi: dw: Make dw_spi_update_config()
Date: Sat, 10 Oct 2026 23:14:59 +0800 [thread overview]
Message-ID: <20261010151459.30560-1-jszhang@kernel.org> (raw)
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
next reply other threads:[~2026-10-10 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 15:14 Jisheng Zhang [this message]
2026-10-12 22:27 ` [PATCH] spi: dw: Make dw_spi_update_config() Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261010151459.30560-1-jszhang@kernel.org \
--to=jszhang@kernel.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.