From: "Paweł Chmiel" <pawel.mikolaj.chmiel@gmail.com>
To: jic23@kernel.org
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
kgene@kernel.org, krzk@kernel.org, xc-racer2@live.ca,
pawel.mikolaj.chmiel@gmail.com, broonie@kernel.org,
arnaud.pouliquen@st.com, baolin.wang@linaro.org,
smohanad@codeaurora.org, eugen.hristev@microchip.com,
rdunlap@infradead.org, vilhelm.gray@gmail.com,
freeman.liu@spreadtrum.com, marcus.folkesson@gmail.com,
geert@linux-m68k.org, robh+dt@kernel.org, mark.rutland@arm.com,
devicetree@vger.kernel.org, linux-iio@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant
Date: Fri, 7 Dec 2018 20:11:34 +0100 [thread overview]
Message-ID: <20181207191136.5464-2-pawel.mikolaj.chmiel@gmail.com> (raw)
In-Reply-To: <20181207191136.5464-1-pawel.mikolaj.chmiel@gmail.com>
From: Jonathan Bakker <xc-racer2@live.ca>
S5PV210's ADC variant is almost the same as v1 except that it has 10
channels and doesn't require the pmu register
Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
drivers/iio/adc/exynos_adc.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index f10443f92e4c..fa2d2b5767f3 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -115,6 +115,7 @@
#define MAX_ADC_V2_CHANNELS 10
#define MAX_ADC_V1_CHANNELS 8
#define MAX_EXYNOS3250_ADC_CHANNELS 2
+#define MAX_S5PV210_ADC_CHANNELS 10
/* Bit definitions common for ADC_V1 and ADC_V2 */
#define ADC_CON_EN_START (1u << 0)
@@ -282,6 +283,16 @@ static const struct exynos_adc_data exynos_adc_v1_data = {
.start_conv = exynos_adc_v1_start_conv,
};
+static const struct exynos_adc_data exynos_adc_s5pv210_data = {
+ .num_channels = MAX_S5PV210_ADC_CHANNELS,
+ .mask = ADC_DATX_MASK, /* 12 bit ADC resolution */
+
+ .init_hw = exynos_adc_v1_init_hw,
+ .exit_hw = exynos_adc_v1_exit_hw,
+ .clear_irq = exynos_adc_v1_clear_irq,
+ .start_conv = exynos_adc_v1_start_conv,
+};
+
static void exynos_adc_s3c2416_start_conv(struct exynos_adc *info,
unsigned long addr)
{
@@ -478,6 +489,9 @@ static const struct of_device_id exynos_adc_match[] = {
}, {
.compatible = "samsung,s3c6410-adc",
.data = &exynos_adc_s3c64xx_data,
+ }, {
+ .compatible = "samsung,s5pv210-adc",
+ .data = &exynos_adc_s5pv210_data,
}, {
.compatible = "samsung,exynos-adc-v1",
.data = &exynos_adc_v1_data,
--
2.17.1
next prev parent reply other threads:[~2018-12-07 19:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-07 19:11 [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Paweł Chmiel
2018-12-07 19:11 ` Paweł Chmiel [this message]
2018-12-12 17:18 ` [PATCH 1/3] iio: adc: exynos-adc: Add S5PV210 variant Jonathan Cameron
2018-12-07 19:11 ` [PATCH 2/3] iio: adc: Allow selection of Exynos ADC on S5PV210 Paweł Chmiel
2018-12-12 17:22 ` Jonathan Cameron
2018-12-07 19:11 ` [PATCH 3/3] dt-bindings: iio: adc: exynos-adc: Add S5PV210 variant Paweł Chmiel
2018-12-12 17:26 ` Jonathan Cameron
2018-12-08 15:59 ` [PATCH 0/3] iio: adc: exynos-adc: Add support for S5PV210 Jonathan Cameron
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=20181207191136.5464-2-pawel.mikolaj.chmiel@gmail.com \
--to=pawel.mikolaj.chmiel@gmail.com \
--cc=arnaud.pouliquen@st.com \
--cc=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eugen.hristev@microchip.com \
--cc=freeman.liu@spreadtrum.com \
--cc=geert@linux-m68k.org \
--cc=jic23@kernel.org \
--cc=kgene@kernel.org \
--cc=knaack.h@gmx.de \
--cc=krzk@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=marcus.folkesson@gmail.com \
--cc=mark.rutland@arm.com \
--cc=pmeerw@pmeerw.net \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=smohanad@codeaurora.org \
--cc=vilhelm.gray@gmail.com \
--cc=xc-racer2@live.ca \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).