From e6ad2a6ab5c545c0cf9ec2b1f4d59765a5eeeb69 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Wed, 3 Jul 2013 11:52:21 -0700 Subject: [PATCH] Rename files in common/ to be more consistent This gets rid of mystery files like "ir357x" and "lp5562". All chip names are now prefixed with their module type (e.g. "chipset_", "led_driver_", etc.) No functional changes; renaming files and CONFIG constants only. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms Change-Id: I3227fb0f6b0243bb08a13577cdb0f6def0e15d54 Signed-off-by: Randall Spangler Reviewed-on: https://gerrit.chromium.org/gerrit/60922 --- board/falco/board.h | 2 +- board/link/board.c | 6 ------ board/link/board.h | 4 ++-- board/peppy/board.h | 2 +- board/slippy/board.h | 2 +- board/spring/board.h | 4 ++-- common/build.mk | 14 +++++++------- common/{gaia_power.c => chipset_gaia.c} | 0 common/{x86_power_haswell.c => chipset_haswell.c} | 0 .../{x86_power_ivybridge.c => chipset_ivybridge.c} | 0 common/{lp5562.c => led_driver_lp5562.c} | 0 common/{lp5562_battery_led.c => led_lp5562.c} | 0 common/{ir357x.c => regulator_ir357x.c} | 0 common/{tmp006.c => temp_sensor_tmp006.c} | 0 common/{tsu6721.c => usb_switch_tsu6721.c} | 0 15 files changed, 14 insertions(+), 20 deletions(-) rename common/{gaia_power.c => chipset_gaia.c} (100%) rename common/{x86_power_haswell.c => chipset_haswell.c} (100%) rename common/{x86_power_ivybridge.c => chipset_ivybridge.c} (100%) rename common/{lp5562.c => led_driver_lp5562.c} (100%) rename common/{lp5562_battery_led.c => led_lp5562.c} (100%) rename common/{ir357x.c => regulator_ir357x.c} (100%) rename common/{tmp006.c => temp_sensor_tmp006.c} (100%) rename common/{tsu6721.c => usb_switch_tsu6721.c} (100%) diff --git a/board/falco/board.h b/board/falco/board.h index 8498cc0468..58828c0e7c 100644 --- a/board/falco/board.h +++ b/board/falco/board.h @@ -20,7 +20,7 @@ #define CONFIG_CHARGER #define CONFIG_CHARGER_BQ24738 #ifdef HAS_TASK_CHIPSET -#define CONFIG_CHIPSET_X86_HASWELL +#define CONFIG_CHIPSET_HASWELL #endif #define CONFIG_CUSTOM_KEYSCAN #define CONFIG_EXTPOWER_GPIO diff --git a/board/link/board.c b/board/link/board.c index 1fa2bdfed2..29cefeea4f 100644 --- a/board/link/board.c +++ b/board/link/board.c @@ -158,7 +158,6 @@ const struct i2c_port_t i2c_ports[I2C_PORTS_USED] = { /* Temperature sensors data; must be in same order as enum temp_sensor_id. */ const struct temp_sensor_t temp_sensors[TEMP_SENSOR_COUNT] = { -#ifdef CONFIG_TMP006 {"I2C-USB C-Die", TEMP_SENSOR_TYPE_IGNORED, tmp006_get_val, 0, 7}, {"I2C-USB C-Object", TEMP_SENSOR_TYPE_IGNORED, tmp006_get_val, 1, 7}, {"I2C-PCH D-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 2, 7}, @@ -167,13 +166,8 @@ const struct temp_sensor_t temp_sensors[TEMP_SENSOR_COUNT] = { {"I2C-Hinge C-Object", TEMP_SENSOR_TYPE_IGNORED, tmp006_get_val, 5, 7}, {"I2C-Charger D-Die", TEMP_SENSOR_TYPE_BOARD, tmp006_get_val, 6, 7}, {"I2C-Charger D-Object", TEMP_SENSOR_TYPE_CASE, tmp006_get_val, 7, 7}, -#endif -#ifdef CONFIG_ADC {"ECInternal", TEMP_SENSOR_TYPE_BOARD, chip_temp_sensor_get_val, 0, 4}, -#endif -#ifdef CONFIG_PECI {"PECI", TEMP_SENSOR_TYPE_CPU, peci_temp_sensor_get_val, 0, 2}, -#endif }; const struct tmp006_t tmp006_sensors[TMP006_COUNT] = { diff --git a/board/link/board.h b/board/link/board.h index 7d5e406134..6da09f61e5 100644 --- a/board/link/board.h +++ b/board/link/board.h @@ -20,7 +20,7 @@ #define CONFIG_CHARGER #define CONFIG_CHARGER_BQ24725 #ifdef HAS_TASK_CHIPSET -#define CONFIG_CHIPSET_X86_IVYBRIDGE +#define CONFIG_CHIPSET_IVYBRIDGE #endif #define CONFIG_CUSTOM_KEYSCAN #define CONFIG_EXTPOWER_GPIO @@ -39,7 +39,7 @@ #define CONFIG_PWM_FAN #define CONFIG_PWM_KBLIGHT #define CONFIG_TEMP_SENSOR -#define CONFIG_TMP006 +#define CONFIG_TEMP_SENSOR_TMP006 #define CONFIG_USB_PORT_POWER_SMART #define CONFIG_WP_ACTIVE_HIGH diff --git a/board/peppy/board.h b/board/peppy/board.h index 4d3af9837b..f69effda35 100644 --- a/board/peppy/board.h +++ b/board/peppy/board.h @@ -20,7 +20,7 @@ #define CONFIG_CHARGER #define CONFIG_CHARGER_BQ24707A #ifdef HAS_TASK_CHIPSET -#define CONFIG_CHIPSET_X86_HASWELL +#define CONFIG_CHIPSET_HASWELL #endif #define CONFIG_CUSTOM_KEYSCAN #define CONFIG_EXTPOWER_GPIO diff --git a/board/slippy/board.h b/board/slippy/board.h index 6b87496bdf..89b69ca2e1 100644 --- a/board/slippy/board.h +++ b/board/slippy/board.h @@ -20,7 +20,7 @@ #define CONFIG_CHARGER #define CONFIG_CHARGER_BQ24707A #ifdef HAS_TASK_CHIPSET -#define CONFIG_CHIPSET_X86_HASWELL +#define CONFIG_CHIPSET_HASWELL #endif #define CONFIG_CUSTOM_KEYSCAN #define CONFIG_EXTPOWER_GPIO diff --git a/board/spring/board.h b/board/spring/board.h index 4938c90a72..7c2693adf2 100644 --- a/board/spring/board.h +++ b/board/spring/board.h @@ -38,13 +38,13 @@ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_LID_SWITCH #define CONFIG_LOW_POWER_IDLE /* Use STOP mode when we have nothing to do */ -#define CONFIG_LP5562 +#define CONFIG_LED_DRIVER_LP5562 #define CONFIG_PMU_BOARD_INIT #define CONFIG_PMU_FORCE_FET /* Always enable 3G modem power rail */ #define CONFIG_PMU_HARD_RESET #define CONFIG_PMU_TPS65090 #define CONFIG_SMART_BATTERY -#define CONFIG_TSU6721 +#define CONFIG_USB_SWITCH_TSU6721 #ifndef __ASSEMBLER__ diff --git a/common/build.mk b/common/build.mk index e989e11141..4d0d473554 100644 --- a/common/build.mk +++ b/common/build.mk @@ -21,9 +21,9 @@ common-$(CONFIG_CHARGER_BQ24725)+=charger_bq24725.o common-$(CONFIG_CHARGER_BQ24707A)+=charger_bq24707a.o common-$(CONFIG_CHARGER_BQ24738)+=charger_bq24738.o common-$(CONFIG_CHARGER_TPS65090)+=pmu_tps65090_charger.o -common-$(CONFIG_CHIPSET_GAIA)+=gaia_power.o -common-$(CONFIG_CHIPSET_X86_IVYBRIDGE)+=x86_power_ivybridge.o -common-$(CONFIG_CHIPSET_X86_HASWELL)+=x86_power_haswell.o +common-$(CONFIG_CHIPSET_GAIA)+=chipset_gaia.o +common-$(CONFIG_CHIPSET_HASWELL)+=chipset_haswell.o +common-$(CONFIG_CHIPSET_IVYBRIDGE)+=chipset_ivybridge.o common-$(CONFIG_PMU_TPS65090)+=pmu_tps65090.o common-$(CONFIG_EOPTION)+=eoption.o common-$(CONFIG_EXTPOWER_GPIO)+=extpower_gpio.o @@ -33,18 +33,18 @@ common-$(CONFIG_FLASH)+=flash_common.o common-$(CONFIG_FMAP)+=fmap.o common-$(CONFIG_I2C)+=i2c_common.o common-$(CONFIG_I2C_ARBITRATION)+=i2c_arbitration.o -common-$(CONFIG_IR357x)+=ir357x.o common-$(CONFIG_KEYBOARD_PROTOCOL_8042)+=keyboard_8042.o common-$(CONFIG_KEYBOARD_PROTOCOL_MKBP)+=keyboard_mkbp.o common-$(CONFIG_KEYBOARD_TEST)+=keyboard_test.o +common-$(CONFIG_LED_DRIVER_LP5562)+=led_driver_lp5562.o led_lp5562.o common-$(CONFIG_LED_FALCO)+=led_falco.o common-$(CONFIG_LED_PEPPY)+=led_peppy.o common-$(CONFIG_LID_SWITCH)+=lid_switch.o -common-$(CONFIG_LP5562)+=lp5562.o lp5562_battery_led.o common-$(CONFIG_LPC)+=port80.o common-$(CONFIG_ONEWIRE_LED)+=onewire_led.o common-$(CONFIG_POWER_BUTTON)+=power_button.o common-$(CONFIG_PSTORE)+=pstore_commands.o +common-$(CONFIG_REGULATOR_IR357X)+=regulator_ir357x.o common-$(CONFIG_SMART_BATTERY)+=smart_battery.o smart_battery_stub.o common-$(HAS_TASK_CHIPSET)+=chipset.o common-$(HAS_TASK_CONSOLE)+=console.o @@ -54,8 +54,8 @@ common-$(HAS_TASK_LIGHTBAR)+=lightbar.o common-$(HAS_TASK_THERMAL)+=thermal.o common-$(HAS_TASK_VBOOTHASH)+=sha256.o vboot_hash.o common-$(CONFIG_TEMP_SENSOR)+=temp_sensor.o -common-$(CONFIG_TMP006)+=tmp006.o -common-$(CONFIG_TSU6721)+=tsu6721.o +common-$(CONFIG_TEMP_SENSOR_TMP006)+=temp_sensor_tmp006.o common-$(CONFIG_USB_PORT_POWER_SMART)+=usb_port_power_smart.o common-$(CONFIG_USB_PORT_POWER_DUMB)+=usb_port_power_dumb.o +common-$(CONFIG_USB_SWITCH_TSU6721)+=usb_switch_tsu6721.o common-$(TEST_BUILD)+=test_util.o diff --git a/common/gaia_power.c b/common/chipset_gaia.c similarity index 100% rename from common/gaia_power.c rename to common/chipset_gaia.c diff --git a/common/x86_power_haswell.c b/common/chipset_haswell.c similarity index 100% rename from common/x86_power_haswell.c rename to common/chipset_haswell.c diff --git a/common/x86_power_ivybridge.c b/common/chipset_ivybridge.c similarity index 100% rename from common/x86_power_ivybridge.c rename to common/chipset_ivybridge.c diff --git a/common/lp5562.c b/common/led_driver_lp5562.c similarity index 100% rename from common/lp5562.c rename to common/led_driver_lp5562.c diff --git a/common/lp5562_battery_led.c b/common/led_lp5562.c similarity index 100% rename from common/lp5562_battery_led.c rename to common/led_lp5562.c diff --git a/common/ir357x.c b/common/regulator_ir357x.c similarity index 100% rename from common/ir357x.c rename to common/regulator_ir357x.c diff --git a/common/tmp006.c b/common/temp_sensor_tmp006.c similarity index 100% rename from common/tmp006.c rename to common/temp_sensor_tmp006.c diff --git a/common/tsu6721.c b/common/usb_switch_tsu6721.c similarity index 100% rename from common/tsu6721.c rename to common/usb_switch_tsu6721.c