mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
cleanup: Rename and move header files
Device-specific headers belong in driver/ or chip/. The include/ directory should be for common interfaces. Code should not normally need to include driver-specific headers. If it does, it should use the full relative path from the EC project root (for example, drivers/charger/bq24715.h). Change-Id: Id23db37a431e2d802a74ec601db6f69b613352ba Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/173746 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
8cf03ac056
commit
2ad076f8a0
@@ -25,7 +25,7 @@ CFLAGS_WARN=-Wall -Werror -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
-fno-delete-null-pointer-checks -Wdeclaration-after-statement \
|
||||
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack
|
||||
CFLAGS_DEBUG= -g
|
||||
CFLAGS_INCLUDE=$(foreach i,$(includes),-I$(i) )
|
||||
CFLAGS_INCLUDE=$(foreach i,$(includes),-I$(i) ) -I.
|
||||
CFLAGS_TEST=$(if $(TEST_BUILD),-DTEST_BUILD \
|
||||
-DTEST_TASKFILE=$(PROJECT).tasklist,) \
|
||||
$(if $(EMU_BUILD),-DEMU_BUILD) \
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
/* Stellaris EKB-LM4F-EAC board-specific configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "gpio.h"
|
||||
#include "i2c.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "registers.h"
|
||||
#include "util.h"
|
||||
|
||||
|
||||
@@ -5,20 +5,18 @@
|
||||
/* EC for Bolt board configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "board.h"
|
||||
#include "adc_chip.h"
|
||||
#include "backlight.h"
|
||||
#include "chip_temp_sensor.h"
|
||||
#include "chipset.h"
|
||||
#include "chipset_x86_common.h"
|
||||
#include "common.h"
|
||||
#include "ec_commands.h"
|
||||
#include "driver/temp_sensor/tmp006.h"
|
||||
#include "extpower.h"
|
||||
#include "gpio.h"
|
||||
#include "host_command.h"
|
||||
#include "i2c.h"
|
||||
#include "keyboard_scan.h"
|
||||
#include "lid_switch.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "peci.h"
|
||||
#include "power_button.h"
|
||||
#include "pwm.h"
|
||||
@@ -26,9 +24,9 @@
|
||||
#include "registers.h"
|
||||
#include "switch.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "temp_sensor_chip.h"
|
||||
#include "timer.h"
|
||||
#include "thermal.h"
|
||||
#include "tmp006.h"
|
||||
#include "util.h"
|
||||
|
||||
/* GPIO signal list. Must match order from enum gpio_signal. */
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
/* EC for Falco board configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "backlight.h"
|
||||
#include "board.h"
|
||||
#include "charger_bq24738.h"
|
||||
#include "chip_temp_sensor.h"
|
||||
#include "chipset_x86_common.h"
|
||||
#include "common.h"
|
||||
#include "ec_commands.h"
|
||||
#include "driver/charger/bq24738.h"
|
||||
#include "driver/temp_sensor/g781.h"
|
||||
#include "extpower.h"
|
||||
#include "fan.h"
|
||||
#include "gpio.h"
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "jtag.h"
|
||||
#include "keyboard_scan.h"
|
||||
#include "lid_switch.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "peci.h"
|
||||
#include "power_button.h"
|
||||
#include "pwm.h"
|
||||
@@ -28,7 +27,7 @@
|
||||
#include "registers.h"
|
||||
#include "switch.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "temp_sensor_g781.h"
|
||||
#include "temp_sensor_chip.h"
|
||||
#include "thermal.h"
|
||||
#include "timer.h"
|
||||
#include "uart.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
/* Kirby board-specific configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "common.h"
|
||||
#include "chipset.h"
|
||||
#include "extpower.h"
|
||||
@@ -17,7 +18,6 @@
|
||||
#include "pwm_data.h"
|
||||
#include "registers.h"
|
||||
#include "spi.h"
|
||||
#include "stm32_adc.h"
|
||||
#include "task.h"
|
||||
#include "util.h"
|
||||
|
||||
|
||||
@@ -5,18 +5,17 @@
|
||||
/* EC for Link board configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "backlight.h"
|
||||
#include "chip_temp_sensor.h"
|
||||
#include "chipset.h"
|
||||
#include "chipset_x86_common.h"
|
||||
#include "common.h"
|
||||
#include "ec_commands.h"
|
||||
#include "driver/temp_sensor/tmp006.h"
|
||||
#include "extpower.h"
|
||||
#include "gpio.h"
|
||||
#include "i2c.h"
|
||||
#include "keyboard_scan.h"
|
||||
#include "lid_switch.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "peci.h"
|
||||
#include "power_button.h"
|
||||
#include "pwm.h"
|
||||
@@ -24,9 +23,9 @@
|
||||
#include "registers.h"
|
||||
#include "switch.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "temp_sensor_chip.h"
|
||||
#include "timer.h"
|
||||
#include "thermal.h"
|
||||
#include "tmp006.h"
|
||||
#include "util.h"
|
||||
|
||||
/* GPIO signal list. Must match order from enum gpio_signal. */
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
/* EC for Peppy board configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "backlight.h"
|
||||
#include "chip_temp_sensor.h"
|
||||
#include "chipset.h"
|
||||
#include "chipset_x86_common.h"
|
||||
#include "common.h"
|
||||
#include "ec_commands.h"
|
||||
#include "driver/temp_sensor/g781.h"
|
||||
#include "extpower.h"
|
||||
#include "gpio.h"
|
||||
#include "host_command.h"
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "jtag.h"
|
||||
#include "keyboard_scan.h"
|
||||
#include "lid_switch.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "peci.h"
|
||||
#include "power_button.h"
|
||||
#include "pwm.h"
|
||||
@@ -26,7 +25,7 @@
|
||||
#include "registers.h"
|
||||
#include "switch.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "temp_sensor_g781.h"
|
||||
#include "temp_sensor_chip.h"
|
||||
#include "thermal.h"
|
||||
#include "timer.h"
|
||||
#include "uart.h"
|
||||
|
||||
@@ -5,18 +5,17 @@
|
||||
/* EC for Rambi board configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "backlight.h"
|
||||
#include "chip_temp_sensor.h"
|
||||
#include "chipset_x86_common.h"
|
||||
#include "common.h"
|
||||
#include "ec_commands.h"
|
||||
#include "driver/temp_sensor/g781.h"
|
||||
#include "extpower.h"
|
||||
#include "gpio.h"
|
||||
#include "host_command.h"
|
||||
#include "i2c.h"
|
||||
#include "keyboard_scan.h"
|
||||
#include "lid_switch.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "peci.h"
|
||||
#include "power_button.h"
|
||||
#include "pwm.h"
|
||||
@@ -24,7 +23,7 @@
|
||||
#include "registers.h"
|
||||
#include "switch.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "temp_sensor_g781.h"
|
||||
#include "temp_sensor_chip.h"
|
||||
#include "thermal.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -5,19 +5,17 @@
|
||||
/* EC for Samus board configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "board.h"
|
||||
#include "adc_chip.h"
|
||||
#include "backlight.h"
|
||||
#include "chip_temp_sensor.h"
|
||||
#include "chipset_x86_common.h"
|
||||
#include "common.h"
|
||||
#include "ec_commands.h"
|
||||
#include "driver/temp_sensor/tmp006.h"
|
||||
#include "extpower.h"
|
||||
#include "gpio.h"
|
||||
#include "host_command.h"
|
||||
#include "i2c.h"
|
||||
#include "keyboard_scan.h"
|
||||
#include "lid_switch.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "peci.h"
|
||||
#include "power_button.h"
|
||||
#include "pwm.h"
|
||||
@@ -25,9 +23,9 @@
|
||||
#include "registers.h"
|
||||
#include "switch.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "temp_sensor_chip.h"
|
||||
#include "timer.h"
|
||||
#include "thermal.h"
|
||||
#include "tmp006.h"
|
||||
#include "util.h"
|
||||
|
||||
/* GPIO signal list. Must match order from enum gpio_signal. */
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
/* EC for Slippy board configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "backlight.h"
|
||||
#include "chip_temp_sensor.h"
|
||||
#include "chipset.h"
|
||||
#include "chipset_x86_common.h"
|
||||
#include "common.h"
|
||||
#include "ec_commands.h"
|
||||
#include "driver/temp_sensor/g781.h"
|
||||
#include "extpower.h"
|
||||
#include "gpio.h"
|
||||
#include "host_command.h"
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "jtag.h"
|
||||
#include "keyboard_scan.h"
|
||||
#include "lid_switch.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "peci.h"
|
||||
#include "power_button.h"
|
||||
#include "pwm.h"
|
||||
@@ -26,7 +25,7 @@
|
||||
#include "registers.h"
|
||||
#include "switch.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "temp_sensor_g781.h"
|
||||
#include "temp_sensor_chip.h"
|
||||
#include "thermal.h"
|
||||
#include "timer.h"
|
||||
#include "uart.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
/* Spring board-specific configuration */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "board_config.h"
|
||||
#include "chipset.h"
|
||||
#include "common.h"
|
||||
@@ -20,7 +21,6 @@
|
||||
#include "pwm.h"
|
||||
#include "pwm_data.h"
|
||||
#include "registers.h"
|
||||
#include "stm32_adc.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
#include "battery.h"
|
||||
#include "common.h"
|
||||
#include "driver/led/lp5562.h"
|
||||
#include "extpower.h"
|
||||
#include "hooks.h"
|
||||
#include "host_command.h"
|
||||
#include "lp5562.h"
|
||||
#include "pmu_tpschrome.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
/* LM4-specific ADC module for Chrome EC */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "clock.h"
|
||||
#include "console.h"
|
||||
#include "common.h"
|
||||
#include "gpio.h"
|
||||
#include "hooks.h"
|
||||
#include "lm4_adc.h"
|
||||
#include "registers.h"
|
||||
#include "task.h"
|
||||
#include "timer.h"
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
/* Temperature sensor module for Chrome EC */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "common.h"
|
||||
#include "hooks.h"
|
||||
#include "lm4_adc.h"
|
||||
|
||||
/* Initialize temperature reading to a sane value (27 C) */
|
||||
static int last_val = C_TO_K(27);
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
*/
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
#include "dma.h"
|
||||
#include "hooks.h"
|
||||
#include "registers.h"
|
||||
#include "stm32_adc.h"
|
||||
#include "task.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
*/
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
#include "clock.h"
|
||||
#include "dma.h"
|
||||
#include "hooks.h"
|
||||
#include "registers.h"
|
||||
#include "stm32_adc.h"
|
||||
#include "task.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
#include "battery_smart.h"
|
||||
#include "charge_state.h"
|
||||
#include "charger.h"
|
||||
#include "charger_bq24738.h"
|
||||
#include "chipset.h"
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
#include "driver/charger/bq24738.h"
|
||||
#include "extpower.h"
|
||||
#include "extpower_falco.h"
|
||||
#include "hooks.h"
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
#include "charger.h"
|
||||
#include "chipset.h"
|
||||
#include "console.h"
|
||||
#include "driver/tsu6721.h"
|
||||
#include "extpower.h"
|
||||
#include "gpio.h"
|
||||
#include "hooks.h"
|
||||
#include "task.h"
|
||||
#include "timer.h"
|
||||
#include "tsu6721.h"
|
||||
#include "util.h"
|
||||
|
||||
/* Console output macros */
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
/* USB charging control for spring board */
|
||||
|
||||
#include "adc.h"
|
||||
#include "adc_chip.h"
|
||||
#include "battery.h"
|
||||
#include "chipset.h"
|
||||
#include "clock.h"
|
||||
#include "console.h"
|
||||
#include "driver/tsu6721.h"
|
||||
#include "extpower.h"
|
||||
#include "gpio.h"
|
||||
#include "hooks.h"
|
||||
@@ -17,12 +19,11 @@
|
||||
#include "keyboard_protocol.h"
|
||||
#include "pmu_tpschrome.h"
|
||||
#include "pwm.h"
|
||||
/* TODO(rspangler): files in common should not use chip registers directly */
|
||||
#include "registers.h"
|
||||
#include "stm32_adc.h"
|
||||
#include "system.h"
|
||||
#include "task.h"
|
||||
#include "timer.h"
|
||||
#include "tsu6721.h"
|
||||
#include "util.h"
|
||||
|
||||
#define PWM_FREQUENCY 32000 /* Hz */
|
||||
|
||||
@@ -5,24 +5,15 @@
|
||||
|
||||
/* Temperature sensor module for Chrome EC */
|
||||
|
||||
#include "chip_temp_sensor.h"
|
||||
#include "chipset.h"
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
#include "gpio.h"
|
||||
#include "i2c.h"
|
||||
#include "hooks.h"
|
||||
#include "host_command.h"
|
||||
#include "peci.h"
|
||||
#include "task.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "timer.h"
|
||||
#include "tmp006.h"
|
||||
#include "util.h"
|
||||
|
||||
/* Default temperature to report in mapped memory */
|
||||
#define MAPPED_TEMP_DEFAULT (296 - EC_TEMP_SENSOR_OFFSET)
|
||||
|
||||
int temp_sensor_read(enum temp_sensor_id id, int *temp_ptr)
|
||||
{
|
||||
const struct temp_sensor_t *sensor;
|
||||
@@ -82,10 +73,10 @@ static void temp_sensor_init(void)
|
||||
base_b = host_get_memmap(EC_MEMMAP_TEMP_SENSOR_B);
|
||||
for (i = 0; i < TEMP_SENSOR_COUNT; ++i) {
|
||||
if (i < EC_TEMP_SENSOR_ENTRIES)
|
||||
base[i] = MAPPED_TEMP_DEFAULT;
|
||||
base[i] = EC_TEMP_SENSOR_DEFAULT;
|
||||
else
|
||||
base_b[i - EC_TEMP_SENSOR_ENTRIES] =
|
||||
MAPPED_TEMP_DEFAULT;
|
||||
EC_TEMP_SENSOR_DEFAULT;
|
||||
}
|
||||
|
||||
/* Set the rest of memory region to SENSOR_NOT_PRESENT */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* TI bq24192 battery charger driver.
|
||||
*/
|
||||
|
||||
#include "bq24192.h"
|
||||
#include "charger.h"
|
||||
#include "charger_bq24192.h"
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
#include "gpio.h"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "battery_smart.h"
|
||||
#include "bq24707a.h"
|
||||
#include "charger.h"
|
||||
#include "charger_bq24707a.h"
|
||||
#include "console.h"
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "battery_smart.h"
|
||||
#include "bq24715.h"
|
||||
#include "charger.h"
|
||||
#include "charger_bq24715.h"
|
||||
#include "console.h"
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "battery_smart.h"
|
||||
#include "bq24725.h"
|
||||
#include "charger.h"
|
||||
#include "charger_bq24725.h"
|
||||
#include "console.h"
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "battery_smart.h"
|
||||
#include "bq24738.h"
|
||||
#include "charger.h"
|
||||
#include "charger_bq24738.h"
|
||||
#include "console.h"
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
#include "g781.h"
|
||||
#include "gpio.h"
|
||||
#include "i2c.h"
|
||||
#include "hooks.h"
|
||||
#include "temp_sensor_g781.h"
|
||||
#include "util.h"
|
||||
|
||||
static int g781_temp_val_local;
|
||||
|
||||
@@ -85,6 +85,8 @@
|
||||
* Valid only if EC_MEMMAP_THERMAL_VERSION returns >= 2.
|
||||
*/
|
||||
#define EC_TEMP_SENSOR_B_ENTRIES 8
|
||||
|
||||
/* Special values for mapped temperature sensors */
|
||||
#define EC_TEMP_SENSOR_NOT_PRESENT 0xff
|
||||
#define EC_TEMP_SENSOR_ERROR 0xfe
|
||||
#define EC_TEMP_SENSOR_NOT_POWERED 0xfd
|
||||
@@ -95,6 +97,13 @@
|
||||
*/
|
||||
#define EC_TEMP_SENSOR_OFFSET 200
|
||||
|
||||
/*
|
||||
* The default value a temperature sensor will return when it is present but
|
||||
* has not been read this boot. This is a reasonable number to avoid
|
||||
* triggering alarms on the host.
|
||||
*/
|
||||
#define EC_TEMP_SENSOR_DEFAULT (296 - EC_TEMP_SENSOR_OFFSET)
|
||||
|
||||
#define EC_FAN_SPEED_ENTRIES 4 /* Number of fans at EC_MEMMAP_FAN */
|
||||
#define EC_FAN_SPEED_NOT_PRESENT 0xffff /* Entry not present */
|
||||
#define EC_FAN_SPEED_STALLED 0xfffe /* Fan stalled */
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "battery_smart.h"
|
||||
#include "common.h"
|
||||
#include "console.h"
|
||||
#include "driver/led/lp5562.h"
|
||||
#include "host_command.h"
|
||||
#include "lp5562.h"
|
||||
#include "pmu_tpschrome.h"
|
||||
#include "test_util.h"
|
||||
#include "timer.h"
|
||||
|
||||
Reference in New Issue
Block a user