summaryrefslogtreecommitdiff
path: root/board/plankton/usb_pd_policy.c
diff options
context:
space:
mode:
authorJohny Lin <johnylin@google.com>2014-11-12 19:21:13 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-13 05:32:08 +0000
commitf2aeae1efdd82439154d2d811d4e5e47a258c2b8 (patch)
tree84c65498b5b4a9c8ecc5a9c2a245d0172add4f0c /board/plankton/usb_pd_policy.c
parent208f28fac1c24ed9c673ebfe29f1190edece57c9 (diff)
downloadchrome-ec-f2aeae1efdd82439154d2d811d4e5e47a258c2b8.tar.gz
plankton: modify request_voltage after redundant 5V-PDO removal
After removing redundant 5V source PDO for plankton, the index of request_voltage need to minus 1. BUG=chrome-os-partner:33737 BRANCH=samus TEST=make BOARD=plankton, and test 5V/12V/20V buttons on plankton board Change-Id: I82f3f8ef72ce54221fb31027b10ff428f2440c9f Reviewed-on: https://chromium-review.googlesource.com/229255 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Vic Yang <victoryang@chromium.org> Commit-Queue: Pin-chih Lin <johnylin@chromium.org> Tested-by: Pin-chih Lin <johnylin@chromium.org>
Diffstat (limited to 'board/plankton/usb_pd_policy.c')
-rw-r--r--board/plankton/usb_pd_policy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/board/plankton/usb_pd_policy.c b/board/plankton/usb_pd_policy.c
index 25e9099ac0..6ae87f4850 100644
--- a/board/plankton/usb_pd_policy.c
+++ b/board/plankton/usb_pd_policy.c
@@ -33,9 +33,9 @@ const uint32_t pd_src_pdo[] = {
PDO_FIXED(20000, 3000, PDO_FIXED_EXTERNAL|PDO_FIXED_DUAL_ROLE),
};
static const int pd_src_pdo_cnts[3] = {
- [SRC_CAP_5V] = 2,
- [SRC_CAP_12V] = 3,
- [SRC_CAP_20V] = 4,
+ [SRC_CAP_5V] = 1,
+ [SRC_CAP_12V] = 2,
+ [SRC_CAP_20V] = 3,
};
static int pd_src_pdo_idx;
@@ -147,8 +147,8 @@ int pd_set_power_supply_ready(int port)
{
/* Output the correct voltage */
gpio_set_level(GPIO_VBUS_CHARGER_EN, 1);
- gpio_set_level(GPIO_USBC_VSEL_0, requested_voltage_idx >= 3);
- gpio_set_level(GPIO_USBC_VSEL_1, requested_voltage_idx >= 4);
+ gpio_set_level(GPIO_USBC_VSEL_0, requested_voltage_idx >= 2);
+ gpio_set_level(GPIO_USBC_VSEL_1, requested_voltage_idx >= 3);
return EC_SUCCESS;
}