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: 10718795 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 1E41B14E2 for ; Fri, 7 Dec 2018 19:12:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CB482B027 for ; Fri, 7 Dec 2018 19:12:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F379D2F412; Fri, 7 Dec 2018 19:12:37 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B2772B027 for ; Fri, 7 Dec 2018 19:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ApVaOuPH6aDZ9Bg9jJcBIW81LUE9iUOHgg+O53ZNvJM=; b=KD3gC645BkK+4i C4c5SUa79fJKZcxTpyNu/S1P8DWNM7mrRLGnuZwL6NkIDh6IWaw0ENqJt9jPK49tKXtomW7Tvi3Ls 842Yf+bA17ZZiv+A64HsxtfXfuFaTiux6TNAoqmT4ZUAH3tJlvKpU+AnSO3Z92ShsN09OFRn374pq h5rzS9HyhW12/0Z855ryffy/9aJ/NqCQhiWjFEWqJrN3recnG6Ezj+RlbblNakmf7GsgCPdUfN8Wi MxsQ0pbd31oho2FWQruemdLALrLDOXKPyN+vI6WVkT9ir0KF3Pw8IFMYq8p+T3uE+05txMUoBWWv5 mZUWE0I18Xrp0tXoEAog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gVLYB-0001Oc-7s; Fri, 07 Dec 2018 19:12:35 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gVLXf-0000lO-AZ for linux-arm-kernel@lists.infradead.org; Fri, 07 Dec 2018 19:12:04 +0000 Received: by mail-lj1-x241.google.com with SMTP id v1-v6so4509607ljd.0 for ; Fri, 07 Dec 2018 11:11:52 -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=m03X26MeAK3wFDRR1tZMwOO3KqdFzYRjnfW2KPbIc0JwE2ZieQ/EgSuQhxrCgBIVcA G2qMHvH1m37y4TlFDx8gQYm9Xh01PvI/wR2Mq0m4zDrLcXCGpEIQ5HrFTz5piUkY+uc+ vzxEOanlNluXkmnrImEWkCNffeQSHOoy4aO1KTc04VIv+4s3Q0KAXECaNnX6e0dajqWb 6qhfX1HPkEyIVkqjt1Z8jgPRuLYPxOXlm61X5avE1FDReF5l/b5SchwPT18iajMQ3OGF xHnmudBW34N7VhCtrh5rpFY6NuNVTvIR21ludyuq4eBHdijmdgZCuEwRQOsuCY7UWABn vvpQ== X-Gm-Message-State: AA+aEWZE/e5ps+1tv8ObQToPgzTUQG7to0q+qABSRp09IAmh5iRc1D6/ he9MJjsIqXyGCTlE4vykptI= 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181207_111203_370721_121D35F7 X-CRM114-Status: GOOD ( 12.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-iio@vger.kernel.org, xc-racer2@live.ca, pmeerw@pmeerw.net, freeman.liu@spreadtrum.com, marcus.folkesson@gmail.com, lars@metafoo.de, krzk@kernel.org, linux-samsung-soc@vger.kernel.org, kgene@kernel.org, geert@linux-m68k.org, pawel.mikolaj.chmiel@gmail.com, devicetree@vger.kernel.org, smohanad@codeaurora.org, vilhelm.gray@gmail.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, baolin.wang@linaro.org, rdunlap@infradead.org, arnaud.pouliquen@st.com, linux-kernel@vger.kernel.org, broonie@kernel.org, knaack.h@gmx.de, eugen.hristev@microchip.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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,