Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2213768ybe; Tue, 3 Sep 2019 09:29:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpzfZkTRgnfHeKQuGpzYUJrsUpl/BR8Ihn15zScdmsNu3qC99zh8C+DYrKURKd0rfIt1/F X-Received: by 2002:a63:ec13:: with SMTP id j19mr30628331pgh.369.1567528149133; Tue, 03 Sep 2019 09:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567528149; cv=none; d=google.com; s=arc-20160816; b=r50eq7wWTafENE26kyrHpm7rS9xLUfxKVO4KcQfgyTJThIIIqkWbfw5TDRoNC+aZ/2 DOPSRTrBSkPI817X1xz2WhU/toD5jGwwxeZL0AEFLRCDt7BJKa/r1gINB2BPN412AqNX 3yBE4p1i2SZMLiIpv9IDEwVIQTMMs4rRxsuke8JXzV0kbvDVQ684txo1LH/ycc/K14oz jQ1uoc1oXicfX9EIAY5cQoUaE4m0yAzo1YlRSJhjo2WLjh5UysrNPdMw9165I6xgBkdp Om6CJ09bvAzTHohdtiZPZM01mND8tf/gLIyy/q1+Ah2iL+a+nhpao1E1obCnzDZBZiSy 8JkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=duCcI149kLttx9lg8cXTtZ5kiKwRRXNtZad6LnZCuFs=; b=0wJXPUESJfDEzawTvBmhr9yVqW8S2Qd89EhgSyrFD9fEmHVicVnjBjlOIF24W9fcXW 24u78eUptm8jT7zTmRqlnq29MP3LrUfduIYeRmXShBLx7kY+qix7J51IX1UKjZ71uPec urLskCigh2X7RVh+DwRIvQfQ1MoaZoaQrmadf3hhH3PHO0+mWkw65ZUrowOXdsGFwzeB qmXL6DVhMk29p4u2SwKMx47FhvUJOk2VrAc9VQot6d5SSAKLtwPHMtpnrkdiPQvr7nDe EH4VGQfkJOB6dwE/9I0FPb1C7Gw49rZQrvQ87C9jivd6B/fGf/XytIcB8wQZx3vY7xpP qR5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GI4iiMOm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4si39309pjo.83.2019.09.03.09.28.52; Tue, 03 Sep 2019 09:29:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GI4iiMOm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730836AbfICQ1V (ORCPT + 99 others); Tue, 3 Sep 2019 12:27:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:48654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730823AbfICQ1S (ORCPT ); Tue, 3 Sep 2019 12:27:18 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6474C238C5; Tue, 3 Sep 2019 16:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567528038; bh=CObjYhzcgxIymlgK/8BKotmVimCoec0fpoJRSZ6T+HA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GI4iiMOmVy2LMOyKb43eQ12KMrcFkq2HaJn/ow1TohvJQKitY6nlhYlnlCd8ZqKKe OF6keEVK7jSDSBFcwaZ0dqWVLKWzHQSFNBCxcgkj5sHabq9Qgy6EtQOnG/gy34fMsO 5lGnXBVDkbMGgj/4kYlsbtf+mir6PrhgTtN6TPLE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jonathan Bakker , =?UTF-8?q?Pawe=C5=82=20Chmiel?= , Jonathan Cameron , Sasha Levin , linux-iio@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 066/167] iio: adc: exynos-adc: Add S5PV210 variant Date: Tue, 3 Sep 2019 12:23:38 -0400 Message-Id: <20190903162519.7136-66-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190903162519.7136-1-sashal@kernel.org> References: <20190903162519.7136-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Bakker [ 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