Skip to contentSkip to conversation

GPIO: pca953x: Rework to not include commands in SPL

PATCH In review Tom Rini 2 participants 3 messages Jan 3, 2018 – Jan 19, 2018 GPIO

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 GPIO: pca953x: Rework to not include commands in SPL

The command portion of the GPIO driver can only be used in full SPL so re-work to guard the command related portions and mark it as static.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Cc Philipp Tomsich <[email protected]>
---
 drivers/gpio/pca953x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/pca953x.c +3 -3
index d1c1ae141125..10a105df94ab 100644
@@ -142,7 +142,7 @@ int pca953x_get_val(uint8_t chip)
 	return (int)val;
 }
 
-#ifdef CONFIG_CMD_PCA953X
+#if defined(CONFIG_CMD_PCA953X) && !defined(CONFIG_SPL_BUILD)
 /*
  * Display pca953x information
  */
@@ -193,7 +193,7 @@ static int pca953x_info(uint8_t chip)
 	return 0;
 }
 
-cmd_tbl_t cmd_pca953x[] = {
+static cmd_tbl_t cmd_pca953x[] = {
 	U_BOOT_CMD_MKENT(device, 3, 0, (void *)PCA953X_CMD_DEVICE, "", ""),
 	U_BOOT_CMD_MKENT(output, 4, 0, (void *)PCA953X_CMD_OUTPUT, "", ""),
 	U_BOOT_CMD_MKENT(input, 3, 0, (void *)PCA953X_CMD_INPUT, "", ""),
@@ -201,7 +201,7 @@ cmd_tbl_t cmd_pca953x[] = {
 	U_BOOT_CMD_MKENT(info, 2, 0, (void *)PCA953X_CMD_INFO, "", ""),
 };
 
-int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	static uint8_t chip = CONFIG_SYS_I2C_PCA953X_ADDR;
 	int ret = CMD_RET_USAGE, val;
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 GPIO: pca953x: Rework to not include commands in SPL

Quoted 10 lines · Tom Rini

The command portion of the GPIO driver can only be used in full SPL so re-work to guard the command related portions and mark it as static.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Cc Philipp Tomsich <[email protected]>
---
 drivers/gpio/pca953x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
author
#2 lore raw
In reply to Tom Rini
Quoted 8 lines · Tom Rini

The command portion of the GPIO driver can only be used in full SPL so re-work to guard the command related portions and mark it as static.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Cc Philipp Tomsich <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180119/0ebbc46f/attachment.sig>