summaryrefslogtreecommitdiff
path: root/board/hoho
diff options
context:
space:
mode:
Diffstat (limited to 'board/hoho')
-rw-r--r--board/hoho/board.h1
-rw-r--r--board/hoho/usb_pd_policy.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/board/hoho/board.h b/board/hoho/board.h
index c341b479fe..d98ba5b135 100644
--- a/board/hoho/board.h
+++ b/board/hoho/board.h
@@ -29,6 +29,7 @@
#define CONFIG_SPI_CS_GPIO GPIO_PD_MCDP_SPI_CS_L
#define CONFIG_USB
#define CONFIG_USB_BOS
+#define CONFIG_USB_INHIBIT
#define CONFIG_USB_POWER_DELIVERY
#define CONFIG_USB_PD_ALT_MODE
#define CONFIG_USB_PD_DUAL_ROLE
diff --git a/board/hoho/usb_pd_policy.c b/board/hoho/usb_pd_policy.c
index 4eff69b49e..3da52023c3 100644
--- a/board/hoho/usb_pd_policy.c
+++ b/board/hoho/usb_pd_policy.c
@@ -12,6 +12,7 @@
#include "registers.h"
#include "task.h"
#include "timer.h"
+#include "usb.h"
#include "usb_pd.h"
#include "util.h"
#include "version.h"
@@ -145,10 +146,8 @@ const uint32_t vdo_dp_mode[MODE_CNT] = {
static int svdm_response_modes(int port, uint32_t *payload)
{
- if (PD_VDO_VID(payload[0]) != USB_SID_DISPLAYPORT) {
- /* TODO(tbroch) USB billboard enabled here then */
- return 1; /* will generate a NAK */
- }
+ if (PD_VDO_VID(payload[0]) != USB_SID_DISPLAYPORT)
+ return 0; /* nak */
memcpy(payload + 1, vdo_dp_mode, sizeof(vdo_dp_mode));
return MODE_CNT + 1;
@@ -186,11 +185,12 @@ static int svdm_enter_mode(int port, uint32_t *payload)
(PD_VDO_OPOS(payload[0]) != OPOS))
return 0; /* will generate a NAK */
+ /* TODO(tbroch) Enumerate USB BB here with updated mode choice */
alt_mode = OPOS;
return 1;
}
-int pd_alt_mode(int port)
+int pd_alt_mode(void)
{
return alt_mode;
}