Received: by 10.223.176.5 with SMTP id f5csp2363874wra; Sun, 28 Jan 2018 18:56:36 -0800 (PST) X-Google-Smtp-Source: AH8x224d7kTlHn2bTv+dsxIVHx9v9JkQhU+Owp43+nHKPLQbuIFuxPlBFiUTRwWMQ00XBaR312DE X-Received: by 10.98.157.211 with SMTP id a80mr25390814pfk.242.1517194596299; Sun, 28 Jan 2018 18:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517194596; cv=none; d=google.com; s=arc-20160816; b=BZ9ifmjLeOVPBrBwQeE+EYbqyWG6unozIeHGepI8jpQ9hGNlLCYGf0pL8r3CY1ZIpy 54u6VHD+HMWylzY53tcjXpHSYtz3Eu/9krZbT6uVN8f/qEh3x1Gp+LpC10tTiyBcjhK2 JtpLbyCQGFTMBDViB6ckHx6rzuaGYHWAXXFXQ4qMyUPFKnvZuKYwhAbDRh95+G4FD0aR UGCjiWV1uLkoQjcAi02hwWgYHJdl965+JQ+VOpnzO8yLueSVEbmy+TZTx8cUM/QNJthw Ukt8B3H30MKJhCHfL8J4NlqO+3sqc6cPQJ9/l84AjiucvanKmrlx+4sBHZ4HQABJAROG RR6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=EAjnLvoqhMbzlotDnuHUu9ybDHQkUvTALGhKb2JZFwQ=; b=Vvdf02d0KlOIpIWudcxltF/HOOFLK62hDJ8xkdFrwnuHrWjOzQR5Ggt0SZ5jxp9sak SiEr/5L383sQatU7nS4DmcZ7iiyWJv7ThEk4pihjA1n83vHnx7iTL4uKnOv28get5LFj qZoOkrlTeD644yenfbyxV/gHD+QPggpTVBRqL7Ck4r36iLniYcfutvCQ78BAXbKtJC2x UYi0ck+9rAXkQ0IdYCEhDDNj7JuHT20T3j5WG9E1S4xg+9eYO/bjTofXBh2gzKogAXqu L9iXUUFGYW0lkv6OovHsnJpEtK9cZBmJAuzBYYw4hVjIckfq7dHwudwRvf4HArTPg19A ZKDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MmDQ18nE; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si1368917plp.58.2018.01.28.18.56.22; Sun, 28 Jan 2018 18:56:36 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=MmDQ18nE; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbeA1X30 (ORCPT + 99 others); Sun, 28 Jan 2018 18:29:26 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34835 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152AbeA1X3Y (ORCPT ); Sun, 28 Jan 2018 18:29:24 -0500 Received: by mail-wm0-f65.google.com with SMTP id r78so30476843wme.0; Sun, 28 Jan 2018 15:29:23 -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; bh=EAjnLvoqhMbzlotDnuHUu9ybDHQkUvTALGhKb2JZFwQ=; b=MmDQ18nERvuGwaTKH7LxEY/fOvUgmVAO3JSiMSlur1Tse5oGvRp6pSL6AZoDMQyNQj yBxzQT3nBTImG5Sfgq8ScW0QsAibu+zwXDTbnQfQQlWJ3FTlR2Eo35Q31vN7GxwMlxU2 VTyUg1pIdR2MNDlHeF7w3w/vEjygY28q7V/L43vNUoX+/No2K21HkwLyNh2Zu2Z2qTdw xNbGCAC8/FTK9TaO5gPrMuyVN8MvazgvdZceFCeP9MMTMPBJoQ6WyQsVvY+VdXxsijkp yInZ7FY2Gvo7dQpCuKTYfGS4PT1sSJfFx/6gQiuUFsWMMwcLAJFkEqsaTGhun+vVNFJg Q00Q== 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; bh=EAjnLvoqhMbzlotDnuHUu9ybDHQkUvTALGhKb2JZFwQ=; b=J9VMCDmXtb76xgiTIYJgKpVvmHvyt9Qo6iWuR0Q5fndZ47W+cbbJLRfFOKor5ji3m6 UewhT+UD4RZU8eA90zzeLurJvQDFNwXm7JSuQX9+Mhl34wpyhnznsz4ujJfSmm8koqVe D9KkvCC4l+63QzGsC4n2OBFmpzG9xUqq8zWCdWcGrY9YytVCq4QXMrq+fxgqvlkWQQrF Rf6IIzn66n3pRZuF8WES0VFo6Tlz2RXyIYmmmyd8i9+fP1B/ufQ2WU5oh8kGuJQDkeMo bcr5rNpc9d4e1rPJLfMvAH/sg0h+ewKiDf1zEOAbmm6UdoTJhGN+BjUctykF0fevSCt0 AzKg== X-Gm-Message-State: AKwxytcjwj0iOaYwSgEMnQsV0EVE4bIcp3Z3R8eVeI2sfR7v6UAduR0a QcjEwoYhS4fchyFlcjQJwd8= X-Received: by 10.28.130.84 with SMTP id e81mr15360861wmd.15.1517182162366; Sun, 28 Jan 2018 15:29:22 -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.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jan 2018 15:29:21 -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 00/16] IIO-based thermal sensor driver for Allwinner H3 and A83T SoC Date: Mon, 29 Jan 2018 00:29:03 +0100 Message-Id: <20180128232919.12639-1-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allwiner H3 and A83T SoCs have a thermal sensor, which is a large refactored version of the old Allwinner "GPADC" (although it have already only thermal part left in A33). This patch tried to add support for the sensor in H3 and A83T based on the A33 thermal sensor driver by Quentin Schulz, which is already merged. This Patchseries is based on Icenowy Zhengs v4 patchseries [1]. The first 5 patches are reworked patches from the v4 patchseries. The rest of the patches add step by step a feature to support multible sensors, nvmem calibration and interupts. This patchseries should make it easy also to add other sunxi SoCs, like the H5, A64 and A80. Patches that adds support for H5, A64 and A80 SoCs are allready prepared, and will be upstreamed if this patchseries is applied and the testing is done. I tried to pick up all the feedback from [1]. I hope I didn't miss anything. Regards, Philipp @Jonathan Could you please check Patch 8 again. I moved some code from Patch 8 to 9. Please chek it again, if your still ok with it. But I think it sould be ok. changes since v1: * collecting all acks * rewording commits/fix typos * move code in place where it is used * fix naming conventions of defines * clarify commits * update documentation to cover the new nvmem calibraion * change nvmem calibration Icenowy Zheng (1): iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 Philipp Rossak (15): dt-bindings: update the Allwinner GPADC device tree binding for H3 & A83T arm: config: sunxi_defconfig: enable SUN4I_GPADC iio: adc: sun4i-gpadc-iio: rework: sampling start/end code readout reg iio: adc: sun4i-gpadc-iio: rework: support clocks and reset iio: adc: sun4i-gpadc-iio: rework: support multiple sensors iio: adc: sun4i-gpadc-iio: rework: support nvmem calibration data iio: adc: sun4i-gpadc-iio: rework: add interrupt support iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor iio: adc: sun4i-gpadc-iio: add support for A83T thermal sensor arm: dts: sunxi-h3-h5: add support for the thermal sensor in H3 and H5 arm: dts: sun8i: h3: add support for the thermal sensor in H3 arm: dts: sun8i: h3: add thermal zone to H3 arm: dts: sun8i: h3: enable H3 sid controller arm: dts: sun8i: a83t: add support for the thermal sensor in A83T arm: dts: sun8i: a83t: add thermal zone to A83T .../devicetree/bindings/mfd/sun4i-gpadc.txt | 50 ++- arch/arm/boot/dts/sun8i-a83t.dtsi | 28 ++ arch/arm/boot/dts/sun8i-h3.dtsi | 21 ++ arch/arm/boot/dts/sunxi-h3-h5.dtsi | 9 + arch/arm/configs/sunxi_defconfig | 1 + drivers/iio/adc/sun4i-gpadc-iio.c | 367 ++++++++++++++++++++- include/linux/mfd/sun4i-gpadc.h | 51 ++- 7 files changed, 503 insertions(+), 24 deletions(-) -- 2.11.0