qcom-vadc-common module will be used by ADC thermal monitoring driver, so move it to global include dir. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> --- drivers/iio/adc/qcom-pm8xxx-xoadc.c | 3 +-- drivers/iio/adc/qcom-spmi-adc5.c | 2 +- drivers/iio/adc/qcom-spmi-vadc.c | 3 +-- drivers/iio/adc/qcom-vadc-common.c | 3 +-- {drivers => include/linux}/iio/adc/qcom-vadc-common.h | 2 ++ 5 files changed, 6 insertions(+), 7 deletions(-) rename {drivers => include/linux}/iio/adc/qcom-vadc-common.h (99%) diff --git a/drivers/iio/adc/qcom-pm8xxx-xoadc.c b/drivers/iio/adc/qcom-pm8xxx-xoadc.c index 7e108da7d255..0610bf254771 100644 --- a/drivers/iio/adc/qcom-pm8xxx-xoadc.c +++ b/drivers/iio/adc/qcom-pm8xxx-xoadc.c @@ -10,6 +10,7 @@ * Author: Linus Walleij <linus.walleij@xxxxxxxxxx> */ +#include <linux/iio/adc/qcom-vadc-common.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> #include <linux/module.h> @@ -21,8 +22,6 @@ #include <linux/interrupt.h> #include <linux/regulator/consumer.h> -#include "qcom-vadc-common.h" - /* * Definitions for the "user processor" registers lifted from the v3.4 * Qualcomm tree. Their kernel has two out-of-tree drivers for the ADC: diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index c2da8f068b87..b10a0fcf09dc 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -7,6 +7,7 @@ #include <linux/completion.h> #include <linux/delay.h> #include <linux/err.h> +#include <linux/iio/adc/qcom-vadc-common.h> #include <linux/iio/iio.h> #include <linux/interrupt.h> #include <linux/kernel.h> @@ -19,7 +20,6 @@ #include <linux/slab.h> #include <dt-bindings/iio/qcom,spmi-vadc.h> -#include "qcom-vadc-common.h" #define ADC5_USR_REVISION1 0x0 #define ADC5_USR_STATUS1 0x8 diff --git a/drivers/iio/adc/qcom-spmi-vadc.c b/drivers/iio/adc/qcom-spmi-vadc.c index b0388f8a69f4..05ff948372b3 100644 --- a/drivers/iio/adc/qcom-spmi-vadc.c +++ b/drivers/iio/adc/qcom-spmi-vadc.c @@ -7,6 +7,7 @@ #include <linux/completion.h> #include <linux/delay.h> #include <linux/err.h> +#include <linux/iio/adc/qcom-vadc-common.h> #include <linux/iio/iio.h> #include <linux/interrupt.h> #include <linux/kernel.h> @@ -20,8 +21,6 @@ #include <dt-bindings/iio/qcom,spmi-vadc.h> -#include "qcom-vadc-common.h" - /* VADC register and bit definitions */ #define VADC_REVISION2 0x1 #define VADC_REVISION2_SUPPORTED_VADC 1 diff --git a/drivers/iio/adc/qcom-vadc-common.c b/drivers/iio/adc/qcom-vadc-common.c index 40d77b3af1bb..ee94774b72e6 100644 --- a/drivers/iio/adc/qcom-vadc-common.c +++ b/drivers/iio/adc/qcom-vadc-common.c @@ -3,14 +3,13 @@ #include <linux/kernel.h> #include <linux/bitops.h> #include <linux/fixp-arith.h> +#include <linux/iio/adc/qcom-vadc-common.h> #include <linux/math64.h> #include <linux/log2.h> #include <linux/err.h> #include <linux/module.h> #include <linux/units.h> -#include "qcom-vadc-common.h" - /* Voltage to temperature */ static const struct vadc_map_pt adcmap_100k_104ef_104fb[] = { {1758, -40}, diff --git a/drivers/iio/adc/qcom-vadc-common.h b/include/linux/iio/adc/qcom-vadc-common.h similarity index 99% rename from drivers/iio/adc/qcom-vadc-common.h rename to include/linux/iio/adc/qcom-vadc-common.h index 7e5f6428e311..03a9119edc71 100644 --- a/drivers/iio/adc/qcom-vadc-common.h +++ b/include/linux/iio/adc/qcom-vadc-common.h @@ -6,6 +6,8 @@ #ifndef QCOM_VADC_COMMON_H #define QCOM_VADC_COMMON_H +#include <linux/types.h> + #define VADC_CONV_TIME_MIN_US 2000 #define VADC_CONV_TIME_MAX_US 2100 -- 2.28.0