From patchwork Sun Jan 28 23:29:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10188605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F318960383 for ; Sun, 28 Jan 2018 23:33:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED68D286D1 for ; Sun, 28 Jan 2018 23:33:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1301286D7; Sun, 28 Jan 2018 23:33:14 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 64984286D1 for ; Sun, 28 Jan 2018 23:33:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752075AbeA1XdM (ORCPT ); Sun, 28 Jan 2018 18:33:12 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:37342 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479AbeA1X33 (ORCPT ); Sun, 28 Jan 2018 18:29:29 -0500 Received: by mail-wr0-f193.google.com with SMTP id f11so5288626wre.4; Sun, 28 Jan 2018 15:29:28 -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; bh=GU1zJMZTUQwAo78uqRec9YF+St8LZfxdM9nAQGKTaiM=; b=CC2p44zMZuD6hPr/6Bc8nw3y8ATeTL1BHR/d9Cz9kX4KwPl080VfgTWO5NO7dJ/1Mv 3H3kP4xWEUpa2Tr05rzDEZyWJVmNZzfiQEpt+CE4GdbAu2aolNXJs5VkxbrO9wa/3Ndm dMwSFiblsH+YK0AsnU87mktYjFhv9+IvwURRTXdK3knrVqeMTnHeg7PSwQ9HAq7snBUd eqEkFlNanh0l5fV9OsAc6xidrOzBpyJQT7dn4BredOsZ1/AvOxH66cIz1IVcsmbrLydq Q5377WUJQuh2f3YcqmOYwj7jvs8VI/2WOpa1dcxiq5d1ZSyFoYlJUB49uP8ognlSxMxS oENA== 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; bh=GU1zJMZTUQwAo78uqRec9YF+St8LZfxdM9nAQGKTaiM=; b=ck5KEQNrfO8amtNZ+6IU0/6aBwDBJvJQG6sv9SfsSLaODmZ4fjZBzmM146o7qJF8B6 JzKb2JDy7NzRyHP7HyFvNhMYDcvGEoaUj0ibAC9SXsRnhYz7SdZFC8qUZEVda/1uRA5g AVkiJSzw5UjJmqtTUukTKh7FeAQGvyOHHfMR9wVrmdN/roZODYqNimyOwVb28Tq6o07z l853lK7Zd2+GvJyvG1QJ9gEn0jK3tErZEM9jGir2VG/UJZTlqauZeAbaKAi8ITV+1VxG GuFgBs3s6Q8PI2IO83WRQf7vC/MkwMP/2u8z4bHUarerAUJ5okF1phTLjnermAjrQF32 QTXg== X-Gm-Message-State: AKwxyteEAbPcxFqBnlgjexCNcmDkIlXGAiGkgONPv32CktmNxQfADbmG a5pBrXL48BFkCdsA27iEhTA= X-Google-Smtp-Source: AH8x22615X3B7ZeDOQvQcC4b0i4SkVAA6BZM6tAyVzxtPayaii2G1YBESGUkE+lVITmeZrn0SEzU9A== X-Received: by 10.223.186.129 with SMTP id p1mr17516161wrg.183.1517182167921; Sun, 28 Jan 2018 15:29:27 -0800 (PST) Received: from debian-laptop.fritz.box (p578F04D2.dip0.t-ipconnect.de. [87.143.4.210]) by smtp.gmail.com with ESMTPSA id m86sm11839223wmi.40.2018.01.28.15.29.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jan 2018 15:29:27 -0800 (PST) From: Philipp Rossak To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, davem@davemloft.net, hans.verkuil@cisco.com, mchehab@kernel.org, rask@formelder.dk, clabbe.montjoie@gmail.com, sean@mess.org, krzk@kernel.org, quentin.schulz@free-electrons.com, icenowy@aosc.io, edu.molinas@gmail.com, singhalsimran0@gmail.com Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v2 03/16] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 Date: Mon, 29 Jan 2018 00:29:06 +0100 Message-Id: <20180128232919.12639-4-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180128232919.12639-1-embed3d@gmail.com> References: <20180128232919.12639-1-embed3d@gmail.com> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Icenowy Zheng As the H3 SoC, which is also in sun8i line, has totally different register map for the thermal sensor (a cut down version of GPADC), we should rename A23/A33-specified registers to contain A33, in order to prevent obfuscation with H3 registers. Currently these registers are only prefixed "SUN8I", not "SUN8I_A33". Add "_A33" after "SUN8I" on the register names. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Acked-by: Maxime Ripard Acked-by: Lee Jones Acked-by: Jonathan Cameron --- drivers/iio/adc/sun4i-gpadc-iio.c | 2 +- include/linux/mfd/sun4i-gpadc.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 04d7147e0110..03804ff9c006 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -88,7 +88,7 @@ static const struct gpadc_data sun6i_gpadc_data = { static const struct gpadc_data sun8i_a33_gpadc_data = { .temp_offset = -1662, .temp_scale = 162, - .tp_mode_en = SUN8I_GPADC_CTRL1_CHOP_TEMP_EN, + .tp_mode_en = SUN8I_A33_GPADC_CTRL1_CHOP_TEMP_EN, }; struct sun4i_gpadc_iio { diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h index 139872c2e0fe..78d31984a222 100644 --- a/include/linux/mfd/sun4i-gpadc.h +++ b/include/linux/mfd/sun4i-gpadc.h @@ -38,9 +38,9 @@ #define SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(x) (GENMASK(3, 0) & BIT(x)) #define SUN6I_GPADC_CTRL1_ADC_CHAN_MASK GENMASK(3, 0) -/* TP_CTRL1 bits for sun8i SoCs */ -#define SUN8I_GPADC_CTRL1_CHOP_TEMP_EN BIT(8) -#define SUN8I_GPADC_CTRL1_GPADC_CALI_EN BIT(7) +/* TP_CTRL1 bits for A33 */ +#define SUN8I_A33_GPADC_CTRL1_CHOP_TEMP_EN BIT(8) +#define SUN8I_A33_GPADC_CTRL1_GPADC_CALI_EN BIT(7) #define SUN4I_GPADC_CTRL2 0x08