Commit bb2277b3ee163de41f3e6f41bec24624f7f41f80

Authored by Tom Rini
1 parent 0d097b774d

GPIO: tca642x: 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: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

drivers/gpio/tca642x.c
... ... @@ -163,7 +163,7 @@
163 163 return ret;
164 164 }
165 165  
166   -#ifdef CONFIG_CMD_TCA642X
  166 +#if defined(CONFIG_CMD_TCA642X) && !defined(CONFIG_SPL_BUILD)
167 167 /*
168 168 * Display tca642x information
169 169 */
... ... @@ -212,7 +212,7 @@
212 212 return 0;
213 213 }
214 214  
215   -cmd_tbl_t cmd_tca642x[] = {
  215 +static cmd_tbl_t cmd_tca642x[] = {
216 216 U_BOOT_CMD_MKENT(device, 3, 0, (void *)TCA642X_CMD_DEVICE, "", ""),
217 217 U_BOOT_CMD_MKENT(output, 4, 0, (void *)TCA642X_CMD_OUTPUT, "", ""),
218 218 U_BOOT_CMD_MKENT(input, 3, 0, (void *)TCA642X_CMD_INPUT, "", ""),
... ... @@ -220,7 +220,7 @@
220 220 U_BOOT_CMD_MKENT(info, 2, 0, (void *)TCA642X_CMD_INFO, "", ""),
221 221 };
222 222  
223   -int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  223 +static int do_tca642x(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
224 224 {
225 225 static uchar chip = CONFIG_SYS_I2C_TCA642X_ADDR;
226 226 int ret = CMD_RET_USAGE, val;