Skip to content

Commit c147be2

Browse files
Josh-Tsaiamstan
authored andcommitted
fwk: dogwood: EC should turn on the PSU power as soon as possible
In the commit 871089f, we should use gpio_pin_set_dt instead of gpio_pin_get_dt if the 5V current alart is asserted. TEST=fwk-dogwood-27111 BUG=code reviewed and found that we used the wrong API TEST=Measure the interval between 5V alert and ps_on. The interval with this change is 26us; Before this change is 1.5ms Signed-off-by: Josh Tsai <Josh_Tsai@compal.com>
1 parent 3d416f2 commit c147be2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

zephyr/program/framework/dogwood/src/power_monitor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void power_monitor_interrupt_idx_1(enum gpio_signal signal)
205205

206206
/* EC needs to turn on the psu power as soon as possible. */
207207
if (has_alert && !psu_has_enabled)
208-
gpio_pin_get_dt(GPIO_DT_FROM_NODELABEL(gpio_ps_on));
208+
gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_ps_on), 1);
209209

210210
/**
211211
* If the power monitor asserts the alert pin to notice there is

0 commit comments

Comments
 (0)