Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1418469rwd; Thu, 1 Jun 2023 15:36:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4g3uQAp2vnCjJWaSZ7vxPnAqP4xsOovZP7GnPMb31gCgrJW60MnJXJHR3BBq/njRjP1/fl X-Received: by 2002:a05:6a21:78a9:b0:10b:da0f:6b2c with SMTP id bf41-20020a056a2178a900b0010bda0f6b2cmr3819385pzc.10.1685658994838; Thu, 01 Jun 2023 15:36:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685658994; cv=none; d=google.com; s=arc-20160816; b=RQPbFsY1mo3NDI8zEDgQtxkD/tDVlbrLUl5HJfdBDAeACgeAe6ingTAqS8ytQJwSIh GY2KAnTHMd8mOZBN9EnXSRyDxJNgeHHeth/Gx6ryj+/dfFll9PWi3vWWn92b/fETD6Sn /55FbtA7UDYUYTDX0qwXnWM/flNRYIdNM1VSatw2Xv9o3wvJL2Gs6KaGtS+iN7OibvIM TULLiDIoRT4g53hRCacQ7I5s9v378IEBFzCR3m/WqlN0RENk6nqGqtkMZ5cksXlb16fE 9z6R06QfBS5huFG667G5QNkaoJ7++OGuu/c+zguCDAbkb2IBiLOLMljQ1p0kDBjF488A Vrsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=osoH9NCUgVkUT2GWNEII1U4b/cNjTB8p6KRKoRqNDT8=; b=t1OrSgglw4cTakrfmGtA8V3AOrf1Rj7HzcLk2xAEoYIoCH3W7fYhpeGVnE99vXURpY TIyjAHADGPrzI7Zx+S/NIuY/bXT7rCBmGROHB76gGkIro/TQI4Bx2Pdetmqr4ZbZ4WTT Le6y5NOVywWhse1vZ2v2DUAfsUB5GLRM4PsxcN3ABpoeN068McLjedP1zsz5gTBpkrvs vDRzbdMbeiJ3ax0XsURIcNhq12z1Q/IUKy0K7AAfxPcJt0tudc5/pAQuwOX0IzH4/TPo j19svkf1Lr8b4ru5IAK0lVWdUGj7NjBaHqtSMQCoEM3ZDgthp9keIVJXcSIF5hzrfrsk cG8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=naj2UO5g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a63b407000000b00528513a135bsi1036274pgf.49.2023.06.01.15.36.23; Thu, 01 Jun 2023 15:36:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=naj2UO5g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231232AbjFAWbf (ORCPT + 99 others); Thu, 1 Jun 2023 18:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjFAWbe (ORCPT ); Thu, 1 Jun 2023 18:31:34 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06D8B12C; Thu, 1 Jun 2023 15:31:33 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-30aea656e36so1351355f8f.1; Thu, 01 Jun 2023 15:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685658691; x=1688250691; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=osoH9NCUgVkUT2GWNEII1U4b/cNjTB8p6KRKoRqNDT8=; b=naj2UO5gI1HpInnq8r9brslsJi6aK6GHpQ+JlqqQEu8p5t/EllUoZ9IIo+UBfEVF2W tdBt9KF7gLnRoKqjeKOf272ogLec2lO9xM+U1BLL8Bv/8rDKrVUCLYz8GZVgmi3tWRjO vmDqslEbw6nIqWRTObo4r6hIabmWrkBhvA4+sLaE9y0rpwPqTLIapgQhwpMaMEyGFxxh t40jUKAuLCSIu8szr30DhvYUJVMKl2P26TP8NgE2uyybCroHZr2YkUcz45aZhRzkURD9 7LCRmm9IYb17YxdsCzs9EcSwzns8mxTK5etW+friu5lsxH1+9QCgnvJw6sM5ldfk0koe gQIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685658691; x=1688250691; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=osoH9NCUgVkUT2GWNEII1U4b/cNjTB8p6KRKoRqNDT8=; b=ORa9ZTNUHeOS5Rpa58e8XOsLFGcrwTQG0KBpdkDj3nsEEH7QMLbjqH30pRWMq07nGl ZslEnGWroN8ONY+ee+V00Ax6dppOGZE0gJDYVmJeTy+QBG642wT86j8tASiOu+kJhkK7 w6yOGh/Hpy4o5GaIvR3ulEuwfrlhvTl+fL2GkqRtSCHPvEMwopZ+30u3qpVUdXdU8WxP 61B/h2d4ZHNP2BOrG19Ks8PPl0kSbt0k+F2hOp6Z4JgdVS2VzTMztTLEGnfzQQkQLukE dON5cVhGgvqceswc8ue6VLvUml/73dPAsl2plwHFBPv45tfgxs8/izGMOnq6ulGxoZvn pj+w== X-Gm-Message-State: AC+VfDzf48KYIlR7O+EQWxwhjq9wj+WwWy7pwr/K5/WBVxzOydFBMMV8 aX/0wvxKW983F0HN962Zcc5X3uB0PzvvR1Cz X-Received: by 2002:adf:e810:0:b0:306:31e0:958 with SMTP id o16-20020adfe810000000b0030631e00958mr2445035wrm.15.1685658690884; Thu, 01 Jun 2023 15:31:30 -0700 (PDT) Received: from user-PC.. ([178.134.198.138]) by smtp.gmail.com with ESMTPSA id b7-20020a5d4d87000000b0030af8da022dsm8619149wru.44.2023.06.01.15.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 15:31:30 -0700 (PDT) From: Maksim Kiselev To: linux-iio@vger.kernel.org Cc: Maksim Kiselev , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Cristian Ciocaltea , Andre Przywara , Andy Shevchenko , Cosmin Tanislav , AngeloGioacchino Del Regno , Ulf Hansson , ChiaEn Wu , William Breathitt Gray , ChiYuan Huang , Ramona Bolboaca , Ibrahim Tilki , Arnd Bergmann , Mike Looijmans , =?UTF-8?q?Leonard=20G=C3=B6hrs?= , Caleb Connolly , Haibo Chen , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 0/3] Add support for Allwinner GPADC on D1/T113s/R329/T507 SoCs Date: Fri, 2 Jun 2023 01:30:38 +0300 Message-Id: <20230601223104.1243871-1-bigunclemax@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds support for general purpose ADC (GPADC) on new Allwinner's SoCs, such as D1, T113s, T507 and R329. The implemented driver provides basic functionality for getting ADC channels data. Change History: v2: - Added lastch flag to avoid addition work for already selected channel - Added reset assertion on module remove - Added dynamic channel allocation and dropped iio_chan_spec arrays - Changed IIO_CHAN_INFO_SCALE type to FRACTIONAL_LOG2 - Dropped separate compatible strings and configs for T113s and R329 - Fixed includes - Fixed Kconfig description - Removed duplicate probe error messages - Used FIELD_PREP for bit setup v1: - Initial version Maxim Kiselev (3): iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC riscv: dts: allwinner: d1: Add GPADC node .../iio/adc/allwinner,sun20i-d1-gpadc.yaml | 79 +++++ .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 10 + drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/sun20i-gpadc-iio.c | 296 ++++++++++++++++++ 5 files changed, 396 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml create mode 100644 drivers/iio/adc/sun20i-gpadc-iio.c -- 2.39.2