From 2ad076f8a02c8a3165a76dfb093cefd79fdbfc67 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Thu, 17 Oct 2013 15:05:04 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/173746 Reviewed-by: Bill Richardson --- chip/stm32/adc-stm32f.c | 2 +- chip/stm32/adc-stm32l.c | 2 +- chip/stm32/adc_chip.h | 29 +++++++++++++++++++++++++++++ chip/stm32/stm32_adc.h | 29 ----------------------------- 4 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 chip/stm32/adc_chip.h delete mode 100644 chip/stm32/stm32_adc.h (limited to 'chip/stm32') diff --git a/chip/stm32/adc-stm32f.c b/chip/stm32/adc-stm32f.c index 22032cfdb8..22d909a339 100644 --- a/chip/stm32/adc-stm32f.c +++ b/chip/stm32/adc-stm32f.c @@ -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" diff --git a/chip/stm32/adc-stm32l.c b/chip/stm32/adc-stm32l.c index 5b432ab9ae..2b7a789fde 100644 --- a/chip/stm32/adc-stm32l.c +++ b/chip/stm32/adc-stm32l.c @@ -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" diff --git a/chip/stm32/adc_chip.h b/chip/stm32/adc_chip.h new file mode 100644 index 0000000000..98141ea2d2 --- /dev/null +++ b/chip/stm32/adc_chip.h @@ -0,0 +1,29 @@ +/* Copyright (c) 2012 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 ADC module for Chrome EC */ + +#ifndef __CROS_EC_STM32_ADC_H +#define __CROS_EC_STM32_ADC_H + +/* Data structure to define ADC channels. */ +struct adc_t { + const char *name; + int factor_mul; + int factor_div; + int shift; + int channel; +}; + +extern const struct adc_t adc_channels[]; + +/* Minimum and maximum values returned by adc_read_channel(). */ +#define ADC_READ_MIN 0 +#define ADC_READ_MAX 4095 + +/* Just plain id mapping for code readability */ +#define STM32_AIN(x) (x) + +#endif /* __CROS_EC_STM32_ADC_H */ diff --git a/chip/stm32/stm32_adc.h b/chip/stm32/stm32_adc.h deleted file mode 100644 index 98141ea2d2..0000000000 --- a/chip/stm32/stm32_adc.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2012 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 ADC module for Chrome EC */ - -#ifndef __CROS_EC_STM32_ADC_H -#define __CROS_EC_STM32_ADC_H - -/* Data structure to define ADC channels. */ -struct adc_t { - const char *name; - int factor_mul; - int factor_div; - int shift; - int channel; -}; - -extern const struct adc_t adc_channels[]; - -/* Minimum and maximum values returned by adc_read_channel(). */ -#define ADC_READ_MIN 0 -#define ADC_READ_MAX 4095 - -/* Just plain id mapping for code readability */ -#define STM32_AIN(x) (x) - -#endif /* __CROS_EC_STM32_ADC_H */ -- cgit v1.2.1