Skip to content

Commit 83a5bad

Browse files
committed
Fix compiling with USBPD=none
Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent 94b0eb6 commit 83a5bad

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/board/system76/common/include/board/usbpd.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#ifndef _BOARD_USBPD_H
44
#define _BOARD_USBPD_H
55

6+
#include <stdbool.h>
7+
#include <stdint.h>
8+
69
void usbpd_init(void);
710
void usbpd_event(void);
811
void usbpd_disable_charging(void);

src/board/system76/common/usbpd/none.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-3.0-only
22

33
#include <board/usbpd.h>
4+
#include <common/macro.h>
45

56
void usbpd_init(void) {}
67

@@ -11,5 +12,8 @@ void usbpd_disable_charging(void) {}
1112
void usbpd_enable_charging(void) {}
1213

1314
bool usbc_mux_info(uint8_t port, uint16_t *info) {
15+
MAYBE_UNUSED(port);
16+
MAYBE_UNUSED(info);
17+
1418
return false;
1519
}

src/board/system76/common/usbpd/tps65987.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// USB-PD driver for TPS65987 and the mostly compatible TPS65993 and TPS65994.
44
// I2C register reference: https://www.ti.com/lit/ug/slvubh2b/slvubh2b.pdf
55

6+
#include <board/usbpd.h>
67
#include <board/battery.h>
78
#include <board/gpio.h>
89
#include <board/power.h>
9-
#include <board/usbpd.h>
1010
#include <common/command.h>
1111
#include <common/debug.h>
1212
#include <ec/i2c.h>

0 commit comments

Comments
 (0)