diff mbox series

[v3,1/2] mtd: spi-nor: export spi_nor_hwcaps_pp2cmd()

Message ID 20220429102018.2361038-1-michael@walle.cc
State Accepted
Delegated to: Pratyush Yadav
Headers show
Series [v3,1/2] mtd: spi-nor: export spi_nor_hwcaps_pp2cmd() | expand

Commit Message

Michael Walle April 29, 2022, 10:20 a.m. UTC
The function will also be used by the debugfs module.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
---
changes since v2:
 - none

changes since rfc (v1):
 - none

 drivers/mtd/spi-nor/core.c | 2 +-
 drivers/mtd/spi-nor/core.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Pratyush Yadav May 10, 2022, 11:19 a.m. UTC | #1
On Fri, 29 Apr 2022 12:20:17 +0200, Michael Walle wrote:
> The function will also be used by the debugfs module.
> 
> 

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-nor/next, thanks!
[1/2] mtd: spi-nor: export spi_nor_hwcaps_pp2cmd()
      https://git.kernel.org/mtd/c/d92e0dbc6a
[2/2] mtd: spi-nor: expose internal parameters via debugfs
      https://git.kernel.org/mtd/c/0257be79fc

--
Regards,
Pratyush Yadav
Texas Instruments Inc.
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index a31d7fd45eb8..6f61e97ecd75 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -1850,7 +1850,7 @@  int spi_nor_hwcaps_read2cmd(u32 hwcaps)
 				  ARRAY_SIZE(hwcaps_read2cmd));
 }
 
-static int spi_nor_hwcaps_pp2cmd(u32 hwcaps)
+int spi_nor_hwcaps_pp2cmd(u32 hwcaps)
 {
 	static const int hwcaps_pp2cmd[][2] = {
 		{ SNOR_HWCAPS_PP,		SNOR_CMD_PP },
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index 4788e628c335..007ea9896a06 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -662,6 +662,7 @@  int spi_nor_otp_lock_sr2(struct spi_nor *nor, unsigned int region);
 int spi_nor_otp_is_locked_sr2(struct spi_nor *nor, unsigned int region);
 
 int spi_nor_hwcaps_read2cmd(u32 hwcaps);
+int spi_nor_hwcaps_pp2cmd(u32 hwcaps);
 u8 spi_nor_convert_3to4_read(u8 opcode);
 void spi_nor_set_read_settings(struct spi_nor_read_command *read,
 			       u8 num_mode_clocks,