Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/board/system76/addw1/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct Gpio __code WLAN_EN = GPIO(J, 2);
struct Gpio __code WLAN_PWR_EN = GPIO(B, 0);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;

Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/addw2/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(J, 7);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Enable SMBus channel 4
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/addw3/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(D, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Disable UARTs
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/bonw14/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4); // renamed to EN_3V
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Enable SMBus channel 4
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/bonw15/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(B, 5);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Disable UARTs
Expand Down
6 changes: 3 additions & 3 deletions src/board/system76/common/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const uint32_t OPTIONS_ADDR = 0x1F800;
// Signature is the size of the config
const uint16_t OPTIONS_SIGNATURE = sizeof(OPTIONS);

void options_reset() {
void options_reset(void) {
for (uint8_t opt = 0; opt < NUM_OPTIONS; opt++) {
OPTIONS[opt] = DEFAULT_OPTIONS[opt];
}
}

static bool options_load_config() {
static bool options_load_config(void) {
// Check signature
if (flash_read_u16(OPTIONS_ADDR) != OPTIONS_SIGNATURE)
return false;
Expand All @@ -55,7 +55,7 @@ void options_init(void) {
}
}

static bool options_changed() {
static bool options_changed(void) {
uint8_t current[NUM_OPTIONS];
// Check if anything changed
if (flash_read_u16(OPTIONS_ADDR) != OPTIONS_SIGNATURE) {
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/common/pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void pnp_write(uint8_t reg, uint8_t data) {
ec2i_write(0x2F, data);
}

void pnp_enable() {
void pnp_enable(void) {
DEBUG("Enable PNP devices\n");

// Enable PMC1
Expand Down
4 changes: 2 additions & 2 deletions src/board/system76/common/usbpd/tps65987.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static void usbpd_set_multiport_policy(void) {
DEBUG("USBPD multiport policy set RES = %ld\n", res);
}

static void usbpd_clear_event() {
static void usbpd_clear_event(void) {
int16_t res;
uint8_t reg[12] = { 0 };

Expand All @@ -234,7 +234,7 @@ static void usbpd_clear_event() {

// Check the operational mode of the PDC and kick it if it has been in a bad
// mode for over 1 second.
static void usbpd_check_mode() {
static void usbpd_check_mode(void) {
static uint32_t time_start = 0;

if (power_state != POWER_STATE_G3 && usbpd_get_mode() == USBPD_MODE_UNKNOWN && !time_start)
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/darp5/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct Gpio __code WLAN_EN = GPIO(H, 5);
struct Gpio __code WLAN_PWR_EN = GPIO(J, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;

Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/darp7/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/galp3-c/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct Gpio __code WLAN_EN = GPIO(H, 5);
struct Gpio __code WLAN_PWR_EN = GPIO(J, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;

Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/galp5/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// PWRSW WDT 2 Enable 2
GCR9 = BIT(5);
// PWRSW WDT 2 Enable 1
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/gaze15/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Enable SMBus channel 4
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/gaze16-3050/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Disable UARTs
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/gaze16-3060/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Disable UARTs
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/gaze17-3050/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Disable UARTs
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/gaze17-3060/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(D, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Disable UARTs
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/gaze18/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Not documented
//GCR22 = BIT(7);
GCR10 = 0x02;
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/lemp10/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Enable SMBus channel 4
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/lemp9/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Enable SMBus channel 4
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/oryp11/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(D, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Disable UARTs
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/oryp6/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Enable SMBus channel 4
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/oryp7/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(H, 4);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Enable SMBus channel 4
Expand Down
2 changes: 1 addition & 1 deletion src/board/system76/oryp8/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct Gpio __code WLAN_PWR_EN = GPIO(H, 4);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clang-format on

void gpio_init() {
void gpio_init(void) {
// Enable LPC reset on GPD2
GCR = 0x04;
// Disable UARTs
Expand Down
4 changes: 2 additions & 2 deletions src/common/include/common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef _COMMON_VERSION_H
#define _COMMON_VERSION_H

const char *board();
const char *version();
const char *board(void);
const char *version(void);

#endif // _COMMON_VERSION_H
4 changes: 2 additions & 2 deletions src/common/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ static const char __code VERSION[] =
xstr(__FIRMWARE_VERSION__);
// clang-format on

const char *board() {
const char *board(void) {
return &BOARD[11];
}

const char *version() {
const char *version(void) {
return &VERSION[13];
}