From f20ed63c17fe0af9acee3ce774b73d70545e5ea3 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 28 Oct 2013 12:48:26 -0700 Subject: Rename pwm_data.h to pwm_chip.h To conform to our mutating naming conventions, let's rename the chip-specific PWM header file to have the string "_chip" in it. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms; pass unit tests Change-Id: I6584be8e54fd24c8638559817e150c707bc0edb5 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/174884 Reviewed-by: Randall Spangler --- board/bolt/board.c | 2 +- board/falco/board.c | 2 +- board/kirby/board.c | 2 +- board/link/board.c | 2 +- board/nyan/board.c | 2 +- board/peppy/board.c | 2 +- board/pit/board.c | 2 +- board/puppy/board.c | 2 +- board/rambi/board.c | 2 +- board/samus/board.c | 2 +- board/slippy/board.c | 2 +- board/snow/board.c | 2 +- board/spring/board.c | 2 +- chip/lm4/pwm.c | 2 +- chip/lm4/pwm_chip.h | 21 +++++++++++++++++++++ chip/lm4/pwm_data.h | 21 --------------------- chip/stm32/power_led.c | 2 +- chip/stm32/pwm.c | 2 +- chip/stm32/pwm_chip.h | 37 +++++++++++++++++++++++++++++++++++++ chip/stm32/pwm_data.h | 37 ------------------------------------- 20 files changed, 74 insertions(+), 74 deletions(-) create mode 100644 chip/lm4/pwm_chip.h delete mode 100644 chip/lm4/pwm_data.h create mode 100644 chip/stm32/pwm_chip.h delete mode 100644 chip/stm32/pwm_data.h diff --git a/board/bolt/board.c b/board/bolt/board.c index 297a067e5a..42df5f86da 100644 --- a/board/bolt/board.c +++ b/board/bolt/board.c @@ -20,7 +20,7 @@ #include "peci.h" #include "power_button.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "switch.h" #include "temp_sensor.h" diff --git a/board/falco/board.c b/board/falco/board.c index 7a079a2190..23da16230d 100644 --- a/board/falco/board.c +++ b/board/falco/board.c @@ -23,7 +23,7 @@ #include "peci.h" #include "power_button.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "switch.h" #include "temp_sensor.h" diff --git a/board/kirby/board.c b/board/kirby/board.c index bfad9648e9..9413e74ce6 100644 --- a/board/kirby/board.c +++ b/board/kirby/board.c @@ -15,7 +15,7 @@ #include "keyboard_raw.h" #include "lid_switch.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "spi.h" #include "task.h" diff --git a/board/link/board.c b/board/link/board.c index 98724fe7b7..0a43498c1c 100644 --- a/board/link/board.c +++ b/board/link/board.c @@ -19,7 +19,7 @@ #include "peci.h" #include "power_button.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "switch.h" #include "temp_sensor.h" diff --git a/board/nyan/board.c b/board/nyan/board.c index b158460a07..0ea3c5020a 100644 --- a/board/nyan/board.c +++ b/board/nyan/board.c @@ -14,7 +14,7 @@ #include "lid_switch.h" #include "pmu_tpschrome.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "spi.h" #include "task.h" diff --git a/board/peppy/board.c b/board/peppy/board.c index 6907906a55..6e3db562a6 100644 --- a/board/peppy/board.c +++ b/board/peppy/board.c @@ -21,7 +21,7 @@ #include "peci.h" #include "power_button.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "switch.h" #include "temp_sensor.h" diff --git a/board/pit/board.c b/board/pit/board.c index a54bfac6ba..c548ee4040 100644 --- a/board/pit/board.c +++ b/board/pit/board.c @@ -15,7 +15,7 @@ #include "lid_switch.h" #include "pmu_tpschrome.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "spi.h" #include "timer.h" diff --git a/board/puppy/board.c b/board/puppy/board.c index 0e9e62b429..634dae0ccb 100644 --- a/board/puppy/board.c +++ b/board/puppy/board.c @@ -14,7 +14,7 @@ #include "lid_switch.h" #include "pmu_tpschrome.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "spi.h" #include "task.h" diff --git a/board/rambi/board.c b/board/rambi/board.c index 36e01e94b6..1a91f47a47 100644 --- a/board/rambi/board.c +++ b/board/rambi/board.c @@ -19,7 +19,7 @@ #include "peci.h" #include "power_button.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "switch.h" #include "temp_sensor.h" diff --git a/board/samus/board.c b/board/samus/board.c index a68c26246f..c9aed7b46a 100644 --- a/board/samus/board.c +++ b/board/samus/board.c @@ -19,7 +19,7 @@ #include "peci.h" #include "power_button.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "switch.h" #include "temp_sensor.h" diff --git a/board/slippy/board.c b/board/slippy/board.c index 464d567b6d..9ef0fc02b1 100644 --- a/board/slippy/board.c +++ b/board/slippy/board.c @@ -21,7 +21,7 @@ #include "peci.h" #include "power_button.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "switch.h" #include "temp_sensor.h" diff --git a/board/snow/board.c b/board/snow/board.c index 1ae884830b..9b7a0fcd56 100644 --- a/board/snow/board.c +++ b/board/snow/board.c @@ -17,7 +17,7 @@ #include "pmu_tpschrome.h" #include "power_led.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "spi.h" #include "task.h" diff --git a/board/spring/board.c b/board/spring/board.c index 13cbeee1f3..29505bb4aa 100644 --- a/board/spring/board.c +++ b/board/spring/board.c @@ -19,7 +19,7 @@ #include "lid_switch.h" #include "pmu_tpschrome.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "timer.h" #include "util.h" diff --git a/chip/lm4/pwm.c b/chip/lm4/pwm.c index c9d1dbe4a4..6e52ebb369 100644 --- a/chip/lm4/pwm.c +++ b/chip/lm4/pwm.c @@ -9,7 +9,7 @@ #include "gpio.h" #include "hooks.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "util.h" diff --git a/chip/lm4/pwm_chip.h b/chip/lm4/pwm_chip.h new file mode 100644 index 0000000000..ac83fcf7da --- /dev/null +++ b/chip/lm4/pwm_chip.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* LM4-specific PWM module for Chrome EC */ + +#ifndef __CROS_EC_LM4_PWM_H +#define __CROS_EC_LM4_PWM_H + +/* Data structure to define PWM channels. */ +struct pwm_t { + /* PWM channel ID */ + int channel; + /* PWM channel flags. See include/pwm.h */ + uint32_t flags; +}; + +extern const struct pwm_t pwm_channels[]; + +#endif /* __CROS_EC_LM4_PWM_H */ diff --git a/chip/lm4/pwm_data.h b/chip/lm4/pwm_data.h deleted file mode 100644 index ac83fcf7da..0000000000 --- a/chip/lm4/pwm_data.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* LM4-specific PWM module for Chrome EC */ - -#ifndef __CROS_EC_LM4_PWM_H -#define __CROS_EC_LM4_PWM_H - -/* Data structure to define PWM channels. */ -struct pwm_t { - /* PWM channel ID */ - int channel; - /* PWM channel flags. See include/pwm.h */ - uint32_t flags; -}; - -extern const struct pwm_t pwm_channels[]; - -#endif /* __CROS_EC_LM4_PWM_H */ diff --git a/chip/stm32/power_led.c b/chip/stm32/power_led.c index cdfb8a4ff5..976ab0208f 100644 --- a/chip/stm32/power_led.c +++ b/chip/stm32/power_led.c @@ -22,7 +22,7 @@ #include "hwtimer.h" #include "power_led.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "task.h" #include "timer.h" diff --git a/chip/stm32/pwm.c b/chip/stm32/pwm.c index f9b1aeec10..b8683ed9f4 100644 --- a/chip/stm32/pwm.c +++ b/chip/stm32/pwm.c @@ -10,7 +10,7 @@ #include "hooks.h" #include "hwtimer.h" #include "pwm.h" -#include "pwm_data.h" +#include "pwm_chip.h" #include "registers.h" #include "util.h" diff --git a/chip/stm32/pwm_chip.h b/chip/stm32/pwm_chip.h new file mode 100644 index 0000000000..d588dabeaa --- /dev/null +++ b/chip/stm32/pwm_chip.h @@ -0,0 +1,37 @@ +/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* STM32-specific PWM module for Chrome EC */ + +#ifndef __CROS_EC_STM32_PWM_H +#define __CROS_EC_STM32_PWM_H + +/* Data structure to define PWM channels. */ +struct pwm_t { + /* + * Timer powering the PWM channel. Must use STM32_TIM(x) to + * initialize + */ + struct { + int id; + uintptr_t base; + } tim; + /* Channel ID within the timer */ + int channel; + /* PWM channel flags. See include/pwm.h */ + uint32_t flags; + /* GPIO pin corresponding to the PWM channel */ + enum gpio_signal pin; +}; + +extern const struct pwm_t pwm_channels[]; + +/* Macro to fill in both timer ID and register base */ +#define STM32_TIM(x) {x, STM32_TIM_BASE(x)} + +/* Plain ID mapping for readability */ +#define STM32_TIM_CH(x) (x) + +#endif /* __CROS_EC_STM32_PWM_H */ diff --git a/chip/stm32/pwm_data.h b/chip/stm32/pwm_data.h deleted file mode 100644 index d588dabeaa..0000000000 --- a/chip/stm32/pwm_data.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* STM32-specific PWM module for Chrome EC */ - -#ifndef __CROS_EC_STM32_PWM_H -#define __CROS_EC_STM32_PWM_H - -/* Data structure to define PWM channels. */ -struct pwm_t { - /* - * Timer powering the PWM channel. Must use STM32_TIM(x) to - * initialize - */ - struct { - int id; - uintptr_t base; - } tim; - /* Channel ID within the timer */ - int channel; - /* PWM channel flags. See include/pwm.h */ - uint32_t flags; - /* GPIO pin corresponding to the PWM channel */ - enum gpio_signal pin; -}; - -extern const struct pwm_t pwm_channels[]; - -/* Macro to fill in both timer ID and register base */ -#define STM32_TIM(x) {x, STM32_TIM_BASE(x)} - -/* Plain ID mapping for readability */ -#define STM32_TIM_CH(x) (x) - -#endif /* __CROS_EC_STM32_PWM_H */ -- cgit v1.2.1