From patchwork Thu Aug 30 15:45:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10582121 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 7926B181E for ; Thu, 30 Aug 2018 15:47:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6944E2C0A7 for ; Thu, 30 Aug 2018 15:47:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AB6B2C0AB; Thu, 30 Aug 2018 15:47: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 E27A12C0B0 for ; Thu, 30 Aug 2018 15:47:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727185AbeH3Ttz (ORCPT ); Thu, 30 Aug 2018 15:49:55 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40615 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727642AbeH3TsV (ORCPT ); Thu, 30 Aug 2018 15:48:21 -0400 Received: by mail-wr1-f67.google.com with SMTP id n2-v6so8510552wrw.7; Thu, 30 Aug 2018 08:45:35 -0700 (PDT) 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=tH+coJrBrADIqfyrRfncPAy+/dBVRmXaC+ssyvweTRQ=; b=tSomAZIfZ4Bt/SxfSxf/Vm1zKdiYAyr1R/H/C4bmYm6GUnDwr+TeazwGUEfCwUxOC+ RDJuxwTtxQ+D22LUu3G0J5w/nhxHwQthP4dwpZv/Ib/N6ZEmEiUl/gYmDRR0hZuWWxne FGyyH7Alsg5YAM9BQF7w7V+mpAL0Oy4a05OAPc+3IWztjjdV/Y0OX6EVQcpI5bcdZQyJ 2ZNBa/nnw+wm0sFvfIgAT4AO7W7TFUs+tGT5X9HYbBqf/5J1PjaYVa2aeknIAEIIjw39 nDOCQhg9u2JXbXs7wYdB9nuiWDma0KRPEYLprib8b6IGjdop9YqO2euA+2f4OX0fyPb+ yoPQ== 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=tH+coJrBrADIqfyrRfncPAy+/dBVRmXaC+ssyvweTRQ=; b=lxB6JoC+wFY2gJmHh/tteZYY36d4vngHtPXRYKJpxeQvKip3kEyCMpf9mpYhqdifAU UIWd9zx1fqCWIY1kadSnFZEBHjm1ev8h+PvLgF3miqEf0aNMPZH7w02sUPnD+trdVeWP uOoKw7Pk3aIM7i1myq5YTArvjoOOgvlklJygsdD2SoLqsSbVnwQiKqjQiBG4UuTGj/0b 8KYHhX3aHFy7eNBNY6bUvMZ2yHBqg3UblUPaVcua5mPuBXSaEwCRDQNj9H7CuCP9LEWt I0Dtv6FTgsaPji8l32M+9QW/vZHAwnnJEgQKt1PkS0f9il3Pduk5Z6bt+cQk7X/JdxKD VBHA== X-Gm-Message-State: APzg51BIHFmZr/jBk0BtukfUE5jKqgHwyk3wxxuiuBsoGOmYY06bzEDv HQw4rnDvsk7wSmP+It5XsdA= X-Google-Smtp-Source: ANB0VdYSolJLm8cuC5xWQsxS+GbMgnObtfCJ9RZYtvbZrdjeMUkgcnzZlH1oDuWWGIYLOM3Dq+uLxg== X-Received: by 2002:adf:c64e:: with SMTP id u14-v6mr7702233wrg.177.1535643934972; Thu, 30 Aug 2018 08:45:34 -0700 (PDT) Received: from debian-hp.wlan.uni-ulm.de (eduroam170-020.wlan.uni-ulm.de. [134.60.170.20]) by smtp.gmail.com with ESMTPSA id j20-v6sm1362759wmh.9.2018.08.30.08.45.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 08:45:34 -0700 (PDT) From: Philipp Rossak To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, eugen.hristev@microchip.com, rdunlap@infradead.org, vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, geert+renesas@glider.be, lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de, broonie@kernel.org, arnaud.pouliquen@st.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 v3 15/30] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 Date: Thu, 30 Aug 2018 17:45:03 +0200 Message-Id: <20180830154518.29507-16-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180830154518.29507-1-embed3d@gmail.com> References: <20180830154518.29507-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/iio/adc/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 e1fe5e8e9dc0..d48f338af563 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -106,7 +106,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/iio/adc/sun4i-gpadc.h b/include/linux/iio/adc/sun4i-gpadc.h index ca59336f246b..d6850f39dcfb 100644 --- a/include/linux/iio/adc/sun4i-gpadc.h +++ b/include/linux/iio/adc/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