summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2018-09-27 15:27:40 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-02 05:19:05 -0700
commit878eb16571ac410257cdbeef5a93354b53e03d7f (patch)
tree4263d9eff34b1d0b5857415ba24f7f100728e423
parent3b7ac6bedfa39ee10e000c705a400e2ede8fa4e5 (diff)
downloadchrome-ec-878eb16571ac410257cdbeef5a93354b53e03d7f.tar.gz
bc12: max14637: Remove PP5000_EN assumption
Some boards need to turn on the PP5000 power rail before starting BC 1.2 detection, but others (such as DragonEgg) don't need PP5000 rail control tied to BC 1.2 detection. Previously, either CONFIG_POWER_PP5000_CONTROL had to be defined, or GPIO_PP5000_EN needed to exist in gpio.inc for this driver. This CL removes the PP5000_EN assumption. If PP5000 rail control is required for BC 1.2 detection, then CONFIG_POWER_PP5000_CONTROL must be defined. BUG=b:113267982 BRANCH=none TEST=make -j buildall Change-Id: I65d8d1b1a6f6caf6862d3ff4a3f5469bc827b2c8 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1250032 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--driver/bc12/max14637.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/driver/bc12/max14637.c b/driver/bc12/max14637.c
index 4085ae4fe5..1990ad268f 100644
--- a/driver/bc12/max14637.c
+++ b/driver/bc12/max14637.c
@@ -131,20 +131,16 @@ static void detect_or_power_down_ic(const int port)
#endif /* !defined(CONFIG_USB_PD_VBUS_DETECT_TCPC) */
if (vbus_present) {
- /* Turn on the 5V rail to allow the chip to be powered. */
#if defined(CONFIG_POWER_PP5000_CONTROL) && defined(HAS_TASK_CHIPSET)
+ /* Turn on the 5V rail to allow the chip to be powered. */
power_5v_enable(task_get_current(), 1);
-#else
- gpio_set_level(GPIO_EN_PP5000, 1);
#endif
bc12_detect(port);
} else {
power_down_ic(port);
- /* Issue a request to turn off the rail. */
#if defined(CONFIG_POWER_PP5000_CONTROL) && defined(HAS_TASK_CHIPSET)
+ /* Issue a request to turn off the rail. */
power_5v_enable(task_get_current(), 0);
-#else
- gpio_set_level(GPIO_EN_PP5000, 0);
#endif
}
}