diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2012-07-12 12:40:03 +0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-12 09:46:52 -0700 |
commit | ffb9233a90fe8f29bb80292a75aed04778b0cda5 (patch) | |
tree | ea31d483932957b2c4ebdbfba8a5139927536633 /host | |
parent | 7ec9f717173ae08571c457bd39a067dd0ce2c471 (diff) | |
download | vboot-ffb9233a90fe8f29bb80292a75aed04778b0cda5.tar.gz |
crossystem: Let kernel worry about active_low stuff
As kernel has adjusted the value of /sys/class/gpio/gpio${PORT}/ with
active_low stuff before returning it to user, crossystem should not do
another adjustment.
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
BUG=chrome-os-partner:11297
TEST=On Snow, run crossystem and see wpsw_boot equals to wpsw_cur.
Then invert /sys/class/gpio/gpio${PORT}/active_low value, and
see wpsw_boot does not equal to wpsw_cur.
Change-Id: I09fec89788bc4393775d5cf9763b8cebeb645ad4
Reviewed-on: https://gerrit.chromium.org/gerrit/27252
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'host')
-rw-r--r-- | host/arch/arm/lib/crossystem_arch.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/host/arch/arm/lib/crossystem_arch.c b/host/arch/arm/lib/crossystem_arch.c index 1e5ecbad..76be1588 100644 --- a/host/arch/arm/lib/crossystem_arch.c +++ b/host/arch/arm/lib/crossystem_arch.c @@ -217,7 +217,7 @@ static int VbGetGpioStatus(unsigned gpio_number) { } static int VbGetVarGpio(const char* name) { - int polarity, gpio_num; + int gpio_num; void *pp = NULL; int *prop; size_t proplen = 0; @@ -236,7 +236,6 @@ static int VbGetVarGpio(const char* name) { } prop = pp; gpio_num = ntohl(prop[1]); - polarity = ntohl(prop[2]); /* * TODO(chrome-os-partner:11296): Use gpio_num == 0 to denote non-exist @@ -245,7 +244,7 @@ static int VbGetVarGpio(const char* name) { * properly. */ if (gpio_num) - ret = VbGetGpioStatus(gpio_num) ^ polarity ^ 1; + ret = VbGetGpioStatus(gpio_num); else ret = -1; out: |