Format with uncrustify
Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Tim Crawford
parent
d3894392d5
commit
1e02be1cbe
@ -46,7 +46,8 @@ void flash_write_enable(void);
|
||||
* NOTE: __critical to ensure interrupts are disabled. This does mean that interrupt
|
||||
* such as the timer will be block until flash acccess is complete
|
||||
*/
|
||||
void flash_entry(uint32_t addr, uint8_t *data, uint32_t length, uint8_t command) __reentrant __critical {
|
||||
void flash_entry(uint32_t addr, uint8_t *data, uint32_t length,
|
||||
uint8_t command) __reentrant __critical {
|
||||
// Only allow access from 64KB to 128KB.
|
||||
if ((addr < 0x10000) || (length > 0x10000) || ((addr + length) > 0x20000))
|
||||
return;
|
||||
|
@ -31,26 +31,26 @@ void kbled_reset(void) {
|
||||
|
||||
// Keep the following functions for compatibility - they are set via USB HID
|
||||
uint8_t kbled_get(void) {
|
||||
/* Always off */
|
||||
// Always off
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t kbled_max(void) {
|
||||
/* Always off */
|
||||
// Always off
|
||||
return 0;
|
||||
}
|
||||
|
||||
void kbled_set(uint8_t level) {
|
||||
/* Fix unused variable */
|
||||
// Fix unused variable
|
||||
level = level;
|
||||
}
|
||||
|
||||
uint32_t kbled_get_color(void) {
|
||||
/* Always black */
|
||||
// Always black
|
||||
return 0;
|
||||
}
|
||||
|
||||
void kbled_set_color(uint32_t color) {
|
||||
/* Fix unused variable */
|
||||
// Fix unused variable
|
||||
color = color;
|
||||
}
|
||||
|
@ -35,11 +35,11 @@ void kbled_set(uint8_t level) {
|
||||
}
|
||||
|
||||
uint32_t kbled_get_color(void) {
|
||||
/* Always white */
|
||||
// Always white
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
void kbled_set_color(uint32_t color) {
|
||||
/* Fix unused variable */
|
||||
// Fix unused variable
|
||||
color = color;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ bool peci_available(void) {
|
||||
|
||||
// If VW_HOST_C10 virtual wire is VWS_HIGH, PECI will wake the CPU
|
||||
//TODO: wake CPU every 8 seconds following Intel recommendation?
|
||||
return (vw_get(&VW_HOST_C10) != VWS_HIGH);
|
||||
return vw_get(&VW_HOST_C10) != VWS_HIGH;
|
||||
#else
|
||||
// PECI is available if PLTRST# is high
|
||||
return gpio_get(&BUF_PLT_RST_N);
|
||||
@ -415,7 +415,8 @@ int16_t peci_wr_pkg_config(uint8_t index, uint16_t param, uint32_t data) {
|
||||
|
||||
#endif // CONFIG_PECI_OVER_ESPI
|
||||
|
||||
// PECI information can be found here: https://www.intel.com/content/dam/www/public/us/en/documents/design-guides/core-i7-lga-2011-guide.pdf
|
||||
// PECI information can be found here:
|
||||
// https://www.intel.com/content/dam/www/public/us/en/documents/design-guides/core-i7-lga-2011-guide.pdf
|
||||
uint8_t peci_get_fan_duty(void) {
|
||||
uint8_t duty;
|
||||
|
||||
|
@ -69,7 +69,7 @@ static int16_t usbpd_current_limit(void) {
|
||||
}
|
||||
|
||||
static void usbpd_dump(void) {
|
||||
/* Dump all registers for debugging */
|
||||
// Dump all registers for debugging
|
||||
for (uint8_t reg = 0x00; reg < 0x40; reg += 1) {
|
||||
uint8_t value[65] = { 0 };
|
||||
int16_t res = i2c_get(&I2C_USBPD, USBPD_ADDRESS, reg, value, sizeof(value));
|
||||
|
@ -19,7 +19,7 @@ void board_init(void) {
|
||||
}
|
||||
|
||||
void board_on_ac(bool ac) {
|
||||
/* Fix unused variable */
|
||||
// Fix unused variable
|
||||
ac = ac;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
#include <common/i2c.h>
|
||||
|
||||
int16_t i2c_recv(struct I2C *const i2c, uint8_t addr, uint8_t *const data, uint16_t length) __reentrant {
|
||||
int16_t i2c_recv(struct I2C *const i2c, uint8_t addr, uint8_t *const data,
|
||||
uint16_t length) __reentrant {
|
||||
int16_t res = 0;
|
||||
|
||||
res = i2c_start(i2c, addr, true);
|
||||
@ -18,7 +19,8 @@ int16_t i2c_recv(struct I2C *const i2c, uint8_t addr, uint8_t *const data, uint1
|
||||
return res;
|
||||
}
|
||||
|
||||
int16_t i2c_send(struct I2C *const i2c, uint8_t addr, uint8_t *const data, uint16_t length) __reentrant {
|
||||
int16_t i2c_send(struct I2C *const i2c, uint8_t addr, uint8_t *const data,
|
||||
uint16_t length) __reentrant {
|
||||
int16_t res = 0;
|
||||
|
||||
res = i2c_start(i2c, addr, false);
|
||||
|
Reference in New Issue
Block a user