Skip to content

Commit 09b7776

Browse files
committed
[modify] add condition for all use battery is present way
Signed-off-by: Leo_Tsai <[email protected]>
1 parent 0d824ae commit 09b7776

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

board/hx20/cypress5525.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ void cypd_response_get_battery_capability(int controller, int port,
668668
/* Set PID */
669669
msg[1] = PRODUCT_ID;
670670

671-
if (battery_is_present()) {
671+
if (battery_is_present() == BP_YES) {
672672
/*
673673
* We only have one fixed battery,
674674
* so make sure batt cap ref is 0.
@@ -733,7 +733,7 @@ int cypd_response_get_battery_status(int controller, int port, uint32_t pd_heade
733733
uint32_t header = PD_DATA_BATTERY_STATUS + PD_HEADER_SOP(sop_type);
734734
int port_idx = (controller << 1) + port;
735735

736-
if (battery_is_present()) {
736+
if (battery_is_present() == BP_YES) {
737737
/*
738738
* We only have one fixed battery,
739739
* so make sure batt cap ref is 0.

0 commit comments

Comments
 (0)