diff options
author | Denis Brockus <dbrockus@google.com> | 2020-04-20 09:22:32 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-21 01:11:58 +0000 |
commit | e3532f14ef2cc68416fd1ec7bec1248b71b1eec1 (patch) | |
tree | f3abc7611d7e49aa70dd9b9ee8f898ccde04d863 /common/ioexpander.c | |
parent | 3db4f2299dddc6ec3ff3116f64704cb5f9b63c38 (diff) | |
download | chrome-ec-e3532f14ef2cc68416fd1ec7bec1248b71b1eec1.tar.gz |
common ioex: don't init ioex levels on SysJump
BUG=b:154174083
BRANCH=none
TEST=sysjump RW should leave USB-A connected as USB3
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I706b2d1593e399c5610156205f4a7dc9dc12dc14
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2157571
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'common/ioexpander.c')
-rw-r--r-- | common/ioexpander.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/common/ioexpander.c b/common/ioexpander.c index f8c5f81360..9839671a51 100644 --- a/common/ioexpander.c +++ b/common/ioexpander.c @@ -9,6 +9,7 @@ #include "gpio.h" #include "hooks.h" #include "ioexpander.h" +#include "system.h" #include "util.h" #define CPRINTF(format, args...) cprintf(CC_GPIO, format, ## args) @@ -171,9 +172,15 @@ int ioex_init(int ioex) * in gpio.inc */ for (i = 0; i < IOEX_COUNT; i++, g++) { - if (g->ioex == ioex && g->mask && !(g->flags & GPIO_DEFAULT)) { + int flags = g->flags; + + if (g->ioex == ioex && g->mask && !(flags & GPIO_DEFAULT)) { + /* SysJump should not set the output levels */ + if (system_jumped_to_this_image()) + flags &= ~(GPIO_LOW | GPIO_HIGH); + drv->set_flags_by_mask(g->ioex, g->port, - g->mask, g->flags); + g->mask, flags); } } |