From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20C19C4CEC5 for ; Fri, 13 Sep 2019 13:31:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0311206A5 for ; Fri, 13 Sep 2019 13:31:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568381478; bh=SbjtpXFVL3W6WXlw+krsgMsn8WUkfGvBq0rbLKiQEhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lOSayaBiun0YcDUn+ysIlYMCeoF/rYHn5lbopq5K327mSxj/kMVoTbUD2ui3Vfab5 H3GLlxrIXROL3DtVwTeE+MXehsJK0Wy18t0633cNgFZ+D58j84EriCAtUmFAhtqaRa 5utZFVQet3yxtjRlcou2L+DvAW/2RSyCsU9fVuhQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389658AbfIMNPL (ORCPT ); Fri, 13 Sep 2019 09:15:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:41322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389105AbfIMNPK (ORCPT ); Fri, 13 Sep 2019 09:15:10 -0400 Received: from localhost (unknown [104.132.45.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 97FD4208C2; Fri, 13 Sep 2019 13:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568380510; bh=SbjtpXFVL3W6WXlw+krsgMsn8WUkfGvBq0rbLKiQEhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tyEXKognn+uHSY+MZ8GlvvET+AkjZTdd8+TFp6UTiQestm+gWtirN8b2e1k32Xj5n 2PeGetmMrCt89wwmeqd5z3TKcPL6fmhEyF7COBK/bPDp792swR0d5eU2bTs6togXBs 7JeU0FgdfHfJX1pEE66Wuglxo8W4LddY3OY244ww= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Bakker , =?UTF-8?q?Pawe=C5=82=20Chmiel?= , Jonathan Cameron , Sasha Levin Subject: [PATCH 4.19 088/190] iio: adc: exynos-adc: Add S5PV210 variant Date: Fri, 13 Sep 2019 14:05:43 +0100 Message-Id: <20190913130606.615365344@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190913130559.669563815@linuxfoundation.org> References: <20190913130559.669563815@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ Upstream commit 882bf52fdeab47dbe991cc0e564b0b51c571d0a3 ] 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 Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- 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 4be29ed447559..41da522fc6735 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.20.1