All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Amit Kucheria <amitk@kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-iio@vger.kernel.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Jishnu Prakash <jprakash@qti.qualcomm.com>
Subject: [PATCH v10 05/15] iio: adc: move qcom-vadc-common.h to include dir
Date: Fri,  4 Dec 2020 05:54:59 +0300	[thread overview]
Message-ID: <20201204025509.1075506-6-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20201204025509.1075506-1-dmitry.baryshkov@linaro.org>

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@linaro.org>
---
 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@linaro.org>
  */
 
+#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.29.2


  parent reply	other threads:[~2020-12-04  2:57 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  2:54 [PATCH v10 00/15] qcom: pm8150: add support for thermal monitoring Dmitry Baryshkov
2020-12-04  2:54 ` [PATCH v10 01/15] dt-bindings: thermal: qcom: add adc-thermal monitor bindings Dmitry Baryshkov
2020-12-04  2:54 ` [PATCH v10 02/15] fixp-arith: add a linear interpolation function Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Craig Tatlor
2020-12-04  2:54 ` [PATCH v10 03/15] iio: adc: qcom-vadc: move several adc5 functions to common file Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Dmitry Baryshkov
2020-12-04  2:54 ` [PATCH v10 04/15] iio: adc: qcom-vadc-common: use fixp_linear_interpolate Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Dmitry Baryshkov
2021-02-18 22:03     ` kernel test robot
2021-02-18 22:03       ` kernel test robot
2020-12-04  2:54 ` Dmitry Baryshkov [this message]
2021-02-18 20:39   ` [thermal: thermal/next] iio: adc: move qcom-vadc-common.h to include dir thermal-bot for Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 06/15] iio: adc: qcom-spmi-adc5: use of_device_get_match_data Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 07/15] iio: provide of_iio_channel_get_by_name() and devm_ version it Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 08/15] iio: adc: move vadc_map_pt from header to the source file Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 09/15] iio: adc: qcom-vadc-common: rewrite vadc7 die temp calculation Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 10/15] iio: adc: qcom-vadc-common: simplify qcom_vadc_map_voltage_temp Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 11/15] iio: adc: qcom-vadc-common: scale adcmap_100k_104ef_104fb Dmitry Baryshkov
2021-02-18 20:39   ` [thermal: thermal/next] " thermal-bot for Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 12/15] thermal: qcom: add support for adc-tm5 PMIC thermal monitor Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 13/15] arm64: dts: qcom: pm8150x: add definitions for adc-tm5 part Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 14/15] arm64: dts: sm8250-mtp: add thermal zones using pmic's adc-tm5 Dmitry Baryshkov
2020-12-04  2:55 ` [PATCH v10 15/15] arm64: dts: qrb5165-rb5: port thermal zone definitions Dmitry Baryshkov
2020-12-05 17:08 ` [PATCH v10 00/15] qcom: pm8150: add support for thermal monitoring Jonathan Cameron
2020-12-05 21:05   ` Dmitry Baryshkov
2020-12-08 10:39     ` Jonathan Cameron
2020-12-08 17:14       ` Dmitry Baryshkov
2021-01-13 17:19   ` Dmitry Baryshkov
2021-01-05  2:03 ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201204025509.1075506-6-dmitry.baryshkov@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=agross@kernel.org \
    --cc=amitk@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=jprakash@qti.qualcomm.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.