From patchwork Fri Dec 7 19:11:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10718785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E540E13AF for ; Fri, 7 Dec 2018 19:12:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D152A2B027 for ; Fri, 7 Dec 2018 19:12:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C46B82F3C6; Fri, 7 Dec 2018 19:12:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EEEA2F421 for ; Fri, 7 Dec 2018 19:12:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726115AbeLGTLy (ORCPT ); Fri, 7 Dec 2018 14:11:54 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42975 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbeLGTLx (ORCPT ); Fri, 7 Dec 2018 14:11:53 -0500 Received: by mail-lj1-f196.google.com with SMTP id l15-v6so4448072lja.9; Fri, 07 Dec 2018 11:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9lZ1jc9eu+qngoQSAA5KNgJbshVX5vnWxLkDtgSyMDI=; b=DTL2MKoPhuwQPtRKrUkKDelyhdY0lUC3nLAMbQyPWQLlC7mGxuY/CZY4GMsZqQwp0t Xu13lS2mvRDFmTWR+WsWDufyPomAn7GXFezlHdZ7DKYBgNKitStQ0bC+axqBzWhR+17w dL0jlpgfIZjczX+6NFsihD7beFxAg2gDIJvkH9YAvSyJUDKSJV4Z5g+2DmDwXR89nox2 HgOs53kUfkVdhQWDbYHCwneGMkiXRmqDu7opknV1OTHQz+d5DX/bdOn7dRchfriJv4fI LUY/u9F8HHy4OMsLpM09hHUV7zx8+VV4IBr7soB0jQfAKetVkRFfeUbWFoj00PLKNOMr NLrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9lZ1jc9eu+qngoQSAA5KNgJbshVX5vnWxLkDtgSyMDI=; b=I4kwnGleL6FMovpwywXTtI4ShxqlYajBiudxNlscM8shvgG4OMquE/T24Bg7SKfGfU 07+tNViw8zz++c3GTQESIrisWXeU54pJ6NMNMSOP9+quj+QYmmfrecoqoqBpk+VwQzlp bFhs48Cs3EgfP4mI1uF79Jemhe9INB8/5O9mYedofFn8uyZ1NZg6A5S5PNKC5FG4R1Md BpFj+zMZHL8HOY5vRD032xOjaPgPm7LuqgxPsKPw11j9ea5lYfIJgQvAh02Vwpv8LZkR +CmFA1AbZ8F3v82laz5qU+OAkjEaZa367MXTu59eCpoYlVQsLTXoN95IZAis18c9X3p9 ZjVw== X-Gm-Message-State: AA+aEWbBQRpwvRM8sswyawtwSFUZg7lyCrAM0OtmI8GVRIn3s9vE+4mv 3/2TM3OAwNhAjoMFDDMI1I4= X-Google-Smtp-Source: AFSGD/XLtd860YcbUUErKxHr82lc8x+SxGhOFNQbMdvXXFtQCqeBCCCTlBgHl0KRWlpBUEotjGf0nA== X-Received: by 2002:a2e:3603:: with SMTP id d3-v6mr2030639lja.46.1544209910517; Fri, 07 Dec 2018 11:11:50 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:45d9:69e8:d41f:b616]) by smtp.googlemail.com with ESMTPSA id 12-v6sm727915ljs.29.2018.12.07.11.11.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 11:11:49 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= 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 Message-Id: <20181207191136.5464-2-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207191136.5464-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207191136.5464-1-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jonathan Bakker 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 Signed-off-by: Paweł Chmiel --- 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,