System76 common board directory (#53)
* Move configuration for battery into board.mk * lemp9: remove tcpm code * Move touchpad to its own module * Add kbled_reset to all platforms, move items to run on CPU reset to a function * Add defines for battery and charger address * Add I2C_0 export to it5570e * Move common system76 board functions into src/board/system76/common
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#ifndef _BOARD_ACPI_H
|
||||
#define _BOARD_ACPI_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
uint8_t acpi_read(uint8_t addr);
|
||||
void acpi_write(uint8_t addr, uint8_t data);
|
||||
|
||||
#endif // _BOARD_ACPI_H
|
@@ -1,21 +0,0 @@
|
||||
#ifndef _BOARD_BATTERY_H
|
||||
#define _BOARD_BATTERY_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern uint16_t battery_temp;
|
||||
extern uint16_t battery_voltage;
|
||||
extern uint16_t battery_current;
|
||||
extern uint16_t battery_charge;
|
||||
extern uint16_t battery_remaining_capacity;
|
||||
extern uint16_t battery_full_capacity;
|
||||
extern uint16_t battery_status;
|
||||
extern uint16_t battery_design_capacity;
|
||||
extern uint16_t battery_design_voltage;
|
||||
|
||||
int battery_charger_disable(void);
|
||||
int battery_charger_enable(void);
|
||||
void battery_event(void);
|
||||
void battery_debug(void);
|
||||
|
||||
#endif // _BOARD_BATTERY_H
|
@@ -1,6 +0,0 @@
|
||||
#ifndef _BOARD_CPU_H
|
||||
#define _BOARD_CPU_H
|
||||
|
||||
#define F_CPU 9200000ULL
|
||||
|
||||
#endif // _BOARD_CPU_H
|
@@ -1,8 +0,0 @@
|
||||
#ifndef _BOARD_ECPM_H
|
||||
#define _BOARD_ECPM_H
|
||||
|
||||
#include <ec/ecpm.h>
|
||||
|
||||
void ecpm_init(void);
|
||||
|
||||
#endif // _BOARD_ECPM_H
|
@@ -1,8 +0,0 @@
|
||||
#ifndef _BOARD_GCTRL_H
|
||||
#define _BOARD_GCTRL_H
|
||||
|
||||
#include <ec/gctrl.h>
|
||||
|
||||
void gctrl_init(void);
|
||||
|
||||
#endif // _BOARD_GCTRL_H
|
@@ -1,15 +0,0 @@
|
||||
#ifndef _BOARD_KBC_H
|
||||
#define _BOARD_KBC_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <ec/kbc.h>
|
||||
|
||||
extern bool kbc_first;
|
||||
extern bool kbc_second;
|
||||
|
||||
void kbc_init(void);
|
||||
bool kbc_scancode(struct Kbc * kbc, uint16_t key, bool pressed);
|
||||
void kbc_event(struct Kbc * kbc);
|
||||
|
||||
#endif // _BOARD_KBC_H
|
@@ -4,6 +4,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
void kbled_init(void);
|
||||
void kbled_reset(void);
|
||||
uint8_t kbled_get(void);
|
||||
void kbled_set(uint8_t level);
|
||||
|
||||
|
@@ -1,18 +0,0 @@
|
||||
#ifndef _BOARD_KBSCAN_H
|
||||
#define _BOARD_KBSCAN_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <ec/kbscan.h>
|
||||
|
||||
extern bool kbscan_enabled;
|
||||
|
||||
// ms between repeating key
|
||||
extern uint16_t kbscan_repeat_period;
|
||||
// ms between pressing key and repeating
|
||||
extern uint16_t kbscan_repeat_delay;
|
||||
|
||||
void kbscan_init(void);
|
||||
void kbscan_event(void);
|
||||
|
||||
#endif // _BOARD_KBSCAN_H
|
@@ -1,11 +0,0 @@
|
||||
#ifndef _BOARD_LID_H
|
||||
#define _BOARD_LID_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
extern bool lid_state;
|
||||
extern bool lid_wake;
|
||||
|
||||
void lid_event(void);
|
||||
|
||||
#endif // _BOARD_LID_H
|
@@ -1,15 +0,0 @@
|
||||
#ifndef _BOARD_PECI_H
|
||||
#define _BOARD_PECI_H
|
||||
|
||||
#include <ec/peci.h>
|
||||
|
||||
extern int16_t peci_offset;
|
||||
extern int16_t peci_temp;
|
||||
extern uint8_t peci_duty;
|
||||
extern uint8_t peci_tcontrol;
|
||||
extern uint8_t peci_tjmax;
|
||||
|
||||
void peci_init(void);
|
||||
void peci_event(void);
|
||||
|
||||
#endif // _BOARD_PECI_H
|
@@ -1,10 +0,0 @@
|
||||
#ifndef _BOARD_PMC_H
|
||||
#define _BOARD_PMC_H
|
||||
|
||||
#include <ec/pmc.h>
|
||||
|
||||
void pmc_init(void);
|
||||
bool pmc_sci(struct Pmc * pmc, uint8_t sci);
|
||||
void pmc_event(struct Pmc * pmc);
|
||||
|
||||
#endif // _BOARD_PMC_H
|
@@ -1,6 +0,0 @@
|
||||
#ifndef _BOARD_PNP_H
|
||||
#define _BOARD_PNP_H
|
||||
|
||||
void pnp_enable(void);
|
||||
|
||||
#endif // _BOARD_PNP_H
|
@@ -1,17 +0,0 @@
|
||||
#ifndef _BOARD_POWER_H
|
||||
#define _BOARD_POWER_H
|
||||
|
||||
enum PowerState {
|
||||
POWER_STATE_DEFAULT,
|
||||
POWER_STATE_DS5,
|
||||
POWER_STATE_S5,
|
||||
POWER_STATE_DS3,
|
||||
POWER_STATE_S3,
|
||||
POWER_STATE_S0,
|
||||
};
|
||||
|
||||
extern enum PowerState power_state;
|
||||
|
||||
void power_event(void);
|
||||
|
||||
#endif // _BOARD_POWER_H
|
@@ -1,8 +0,0 @@
|
||||
#ifndef _BOARD_PS2_H
|
||||
#define _BOARD_PS2_H
|
||||
|
||||
#include <ec/ps2.h>
|
||||
|
||||
void ps2_init(void);
|
||||
|
||||
#endif // _BOARD_PS2_H
|
@@ -1,8 +0,0 @@
|
||||
#ifndef _BOARD_PWM_H
|
||||
#define _BOARD_PWM_H
|
||||
|
||||
#include <ec/pwm.h>
|
||||
|
||||
void pwm_init(void);
|
||||
|
||||
#endif // _BOARD_PWM_H
|
@@ -1,6 +0,0 @@
|
||||
#ifndef _BOARD_SCRATCH_H
|
||||
#define _BOARD_SCRATCH_H
|
||||
|
||||
void scratch_trampoline(void);
|
||||
|
||||
#endif // _BOARD_SCRATCH_H
|
@@ -1,10 +0,0 @@
|
||||
#ifndef _BOARD_SMBUS_H
|
||||
#define _BOARD_SMBUS_H
|
||||
|
||||
#include <ec/smbus.h>
|
||||
|
||||
void smbus_init(void);
|
||||
int smbus_read(uint8_t address, uint8_t command, uint16_t * data);
|
||||
int smbus_write(uint8_t address, uint8_t command, uint16_t data);
|
||||
|
||||
#endif // _BOARD_SMBUS_H
|
@@ -1,9 +0,0 @@
|
||||
#ifndef _BOARD_SMFI_H
|
||||
#define _BOARD_SMFI_H
|
||||
|
||||
void smfi_init(void);
|
||||
void smfi_watchdog(void);
|
||||
void smfi_event(void);
|
||||
void smfi_debug(unsigned char byte);
|
||||
|
||||
#endif // _BOARD_SMFI_H
|
@@ -1,11 +0,0 @@
|
||||
#ifndef _BOARD_TCPM_H
|
||||
#define _BOARD_TCPM_H
|
||||
|
||||
#include <ec/smbus.h>
|
||||
|
||||
void tcpm_init(void);
|
||||
int tcpm_read(uint8_t address, uint8_t command, uint16_t * data);
|
||||
int tcpm_write(uint8_t address, uint8_t command, uint16_t data);
|
||||
void tcpm_event(void);
|
||||
|
||||
#endif // _BOARD_TCPM_H
|
Reference in New Issue
Block a user