From patchwork Wed Oct 25 13:44:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: marius.cristea@microchip.com X-Patchwork-Id: 15876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2611701vqx; Wed, 25 Oct 2023 06:46:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1R3QMQdmYA0VWMQA+VPF8iwISI2+xjrKYlKFNP08b3XhiRG5HqznVFXQLopmQSDbFy/jd X-Received: by 2002:aca:280f:0:b0:3b2:e9ad:c01f with SMTP id 15-20020aca280f000000b003b2e9adc01fmr13732426oix.44.1698241573802; Wed, 25 Oct 2023 06:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698241573; cv=none; d=google.com; s=arc-20160816; b=LFtNLYbfGdWlRvmz0Z6Y05FN7alBbFtJMzmf4k58WMgRcmz6Zt80tw/0vXxmgRnH0/ S4Z9RIupi3Udfts+zmggN/AZnwIzm0TVqmrS8m2gnLIpo8WAi+UUXr/KOpPd2E4s17/f fUYFLyFH2iLGTgPlHxA1jwg8TtDZpuxJtaCImlyz7BIUoaI7f5wfbcY4ISOiNAtzJU5Z hnaOedA+uPsPlGMbWBSW0mN3wSpK0Wyq37mAJq1PIPHJKqa7Z2A1mC68CSRVmPjAJQZY BQ5UeGvl1Uy6D0A+qFmu7it8R0L8s5rnX+1R9hm5WGty10Ka3MJoRY3++Wl74M6cHgM4 HBBg== 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=ZfTE5QNqdqaBIs1KaLmTImSpayGMQVp/KO4+sLPu7pE=; fh=CfXnvszhvWuE28iJMeSRS+uCCoveCk+buAgXjq9mGdM=; b=Tq35uOdA36jkAgK3+EUMT1IneIMIKZrCSKmN58GhVJsg18A56kre+HmDwXPMkIcgRs BG8GMpDMBuKgisUj9RB2Js3gYa6w5kWirReCkWiEOFpHshc+kq6xneSUlfKjmKw2uID7 /7hl6cRcOZk6G6yHtx0Vl3/J7XIGUKIbLkClLO5H8eT88YEqPVr4+2cxB+vOAGZq0DOV KNVy7W9CuO3ruG+nKa5x5tsoT6K4l1GrVJMM/cYdtHYqS5i6fKyD9d2rKmTdLXKecgNh Dat/Hv2z12ADqjUOgVkGQkotY5zyPOl96SYYuDnBqoOzu679o5x8mAMrUZOUfR9SVCvo NGsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=PY8ftMQn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p16-20020a254210000000b00d8662700d83si10001852yba.134.2023.10.25.06.46.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:46:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=PY8ftMQn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AF3FF8072141; Wed, 25 Oct 2023 06:45:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233249AbjJYNpC (ORCPT + 26 others); Wed, 25 Oct 2023 09:45:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344243AbjJYNo4 (ORCPT ); Wed, 25 Oct 2023 09:44:56 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE4F2132; Wed, 25 Oct 2023 06:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1698241493; x=1729777493; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qsWPpHChbj6eevlntikLCMGGhKdN1IGjbsMPO1RBLKc=; b=PY8ftMQntozJ0/f8L2mcaKYHC31SMUTiTVa4erJlsDjlP2tegtE5sFq/ B+bd9aVLKRMd1wtq2v2GW8Uz5cojnSMnJLnDFOJ21e4F6a2NxQnkWAzuQ P4BWCGSmKzyH+QJEsDjefkq7bBUR6kx4BAYztryeq5iDY1NLbaDr3pKLu LiIourrMk/Q/uBVh7sdcQgexL8HmKvnKEPDbUo6IeDDlYkspDoLefc16Q himC232jzmsrSeCZBo1Y4lzLqVM5Nl4ZuaZMFJCR+/T0dw7Zqhwj2LuU0 QVLa0+f5MPHZBXMhzoZWg7JQ1nY43AE25znhpE+d6fzORF6VG20Q6ac9B w==; X-CSE-ConnectionGUID: hKESaP82Toq6NENXDanU3Q== X-CSE-MsgGUID: jFhgmQrLQFStVJ4OPoGYxw== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="177743696" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 25 Oct 2023 06:44:52 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 25 Oct 2023 06:44:16 -0700 Received: from marius-VM.mshome.net (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 25 Oct 2023 06:44:14 -0700 From: To: , , CC: , , , , , Subject: [PATCH v2 0/2] adding support for Microchip PAC193X Power Monitor Date: Wed, 25 Oct 2023 16:44:02 +0300 Message-ID: <20231025134404.131485-1-marius.cristea@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 06:45:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780735356086384234 X-GMAIL-MSGID: 1780735356086384234 From: Marius Cristea Adding support for Microchip PAC193X series of Power Monitor with Accumulator chip family. This driver covers the following part numbers: - PAC1931, PAC1932, PAC1933 and PAC1934 Differences related to previous patch: v2: - fix review comments: - change the device tree bindings - use label property - fix coding style issues - remove unused headers - use get_unaligned_bexx instead of own functions - change to use a system work queue - use probe_new instead of old probe v1: - first version comitted to review Marius Cristea (2): dt-bindings: iio: adc: adding dt-bindings for PAC193X iio: adc: adding support for pac193x .../ABI/testing/sysfs-bus-iio-adc-pac1934 | 15 + .../bindings/iio/adc/microchip,pac1934.yaml | 146 ++ MAINTAINERS | 7 + drivers/iio/adc/Kconfig | 12 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/pac1934.c | 1775 +++++++++++++++++ 6 files changed, 1956 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-pac1934 create mode 100644 Documentation/devicetree/bindings/iio/adc/microchip,pac1934.yaml create mode 100644 drivers/iio/adc/pac1934.c base-commit: 5e99f692d4e32e3250ab18d511894ca797407aec