All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] GPIO: pca953x: Rework to not include commands in SPL
@ 2018-01-03 14:23 Tom Rini
  2018-01-08  4:50 ` Simon Glass
  2018-01-19 21:13 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Rini @ 2018-01-03 14:23 UTC (permalink / raw)
  To: u-boot

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 <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 drivers/gpio/pca953x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index d1c1ae141125..10a105df94ab 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] GPIO: pca953x: Rework to not include commands in SPL
  2018-01-03 14:23 [U-Boot] [PATCH] GPIO: pca953x: Rework to not include commands in SPL Tom Rini
@ 2018-01-08  4:50 ` Simon Glass
  2018-01-19 21:13 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2018-01-08  4:50 UTC (permalink / raw)
  To: u-boot

On 3 January 2018 at 07:23, Tom Rini <trini@konsulko.com> wrote:
> 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 <bmeng.cn@gmail.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  drivers/gpio/pca953x.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] GPIO: pca953x: Rework to not include commands in SPL
  2018-01-03 14:23 [U-Boot] [PATCH] GPIO: pca953x: Rework to not include commands in SPL Tom Rini
  2018-01-08  4:50 ` Simon Glass
@ 2018-01-19 21:13 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2018-01-19 21:13 UTC (permalink / raw)
  To: u-boot

On Wed, Jan 03, 2018 at 09:23:14AM -0500, Tom Rini wrote:

> 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 <bmeng.cn@gmail.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-19 21:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-03 14:23 [U-Boot] [PATCH] GPIO: pca953x: Rework to not include commands in SPL Tom Rini
2018-01-08  4:50 ` Simon Glass
2018-01-19 21:13 ` [U-Boot] " Tom Rini

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.