From patchwork Wed Oct 25 10:34:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Leitner X-Patchwork-Id: 158000 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2502925vqx; Wed, 25 Oct 2023 03:35:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECJncnGGOGYz+fw855MG++0bnlJzhzpZ3dGNFSsxzaPMYufNTPCUN/LMy/Y3SAupde1uDz X-Received: by 2002:a05:6830:2693:b0:6c4:9852:a498 with SMTP id l19-20020a056830269300b006c49852a498mr19816123otu.4.1698230154501; Wed, 25 Oct 2023 03:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698230154; cv=none; d=google.com; s=arc-20160816; b=0eCCI4FujGUfzjKUbG1l3COE7zxRw/WIRI8WAZd9N5AEIkb+BNPFi3neU2HlCQ8Pi0 0ptiTYh0gE7vLTzv/d4jb1Z20iaOI7OXFJj1rY2QITyHmu/cCTzFPMeMz1JfLpqN+6H7 q6PkKZH6AWsI326yqJFKFjowIywGTzgXZ7jvls2mfXONKtbb+4B8fJAIMb70CEl0uawB ekzudliWaGau4l8U69oKGkekb2/PzMrH1GBHwI5YA1GLsJlURqALcnJ6B+i8hQ95iLpj 9kWRuQEZ3psM1ny5+s4cQn1742U4byqdXA6SoBRQfZW4rnD+CzbuJW3nQ4FpsceefdP3 ZyIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=AP119HFKWaKDfYbaQvKW0DlT3lnf3/cltkpSqxZXE2Y=; fh=lhNkkbLm/HIJ1PE6fjk142ayDM14yYFU7I5GsZU8FkM=; b=pWOwBwt3b8CJyOS5tsmSTNNNxTw4dn/Ee2GZ6nzlef58DGAiBxEdOBoo4A6VNfqtBD HXSgw4VFfF9HOZtK0TyDeAf59Fp+dYqAlwZzX+ajo/sWCDo3NFM94VE+wj+wB7D7dNjK KNSsALh3qg7ZSGAcoOGL9k0IrdRzLt7aBLGsOWimnon/wI1fYCwlNKq8YRXQIqYsA/M0 OAP5dIJBpOVLdP+9Z7qbA5puRXfH3flQfrxzEOEZc2oX2U+fR4ZnC5Raql84Nejdneck byZjEzt5/TAxxwERBDDJ0COcAnbvO6NNbPHSExZrrQWynbijbGle6669zaCVCMFxy+o0 EOhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=FzwS0199; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id w187-20020a817bc4000000b005a7af21fd04si10944607ywc.7.2023.10.25.03.35.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:35:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=FzwS0199; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 019F5801EA8C; Wed, 25 Oct 2023 03:35:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234977AbjJYKfa (ORCPT + 26 others); Wed, 25 Oct 2023 06:35:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234851AbjJYKfC (ORCPT ); Wed, 25 Oct 2023 06:35:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E77E01716; Wed, 25 Oct 2023 03:34:49 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPS id 52F3FC433C8; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.dev; s=korg; t=1698230089; bh=To9+llqVwQfE3FZYma/wWqALeRFyp/9+Ac4qHFPwfQc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FzwS0199WwjkV+1Fcqqi4ZRw1eaGO+ES2LrQBDkUR31aV8WgtrVT3vIreqzuijz23 L+I6kRnSBpcZSvM86a4uSv00LdXn3DSCpV/qeflzVWjoeAd/UCZKATVZH/McGVLU9s /2HnfOaLHV9h4ND45wlFwyKG5WxR0m/iNBddLuDE= Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 266FAC25B6B; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) From: Richard Leitner Date: Wed, 25 Oct 2023 10:34:11 +0000 Subject: [PATCH 1/4] MAINTAINERS: Add entry for ina238 driver MIME-Version: 1.0 Message-Id: <20231025-ina237-v1-1-a0196119720c@linux.dev> References: <20231025-ina237-v1-0-a0196119720c@linux.dev> In-Reply-To: <20231025-ina237-v1-0-a0196119720c@linux.dev> To: Guenter Roeck , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Richard Leitner X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698230088; l=764; i=richard.leitner@linux.dev; s=20231025; h=from:subject:message-id; bh=To9+llqVwQfE3FZYma/wWqALeRFyp/9+Ac4qHFPwfQc=; =?utf-8?q?b=3DGbcBOmbxKW/N?= =?utf-8?q?aOZK/tWlRFetfHjOKl+VCAXOa2pUDIWUfcoEjx++tHSDimH9wHPkypn2z8yR908y?= oV7A1CFxDLcMhgE5pRVfnFfPrGx+xr9d6mKqdI52FLyq7kX1jBXV X-Developer-Key: i=richard.leitner@linux.dev; a=ed25519; pk=ZYa5+0m9RFYtnNU6DLet7sHyPehnVHa0ucJlYiAu2NU= X-Endpoint-Received: by B4 Relay for richard.leitner@linux.dev/20231025 with auth_id=90 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Wed, 25 Oct 2023 03:35:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780723382258984665 X-GMAIL-MSGID: 1780723382258984665 The ina238 driver is available since 2021 but lacks a MAINTAINERS entry file. Therefore add the missing entry now. Signed-off-by: Richard Leitner --- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 668d1e24452d..28f91c8a2e1c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10267,6 +10267,12 @@ F: Documentation/hwmon/ina2xx.rst F: drivers/hwmon/ina2xx.c F: include/linux/platform_data/ina2xx.h +INA238 HARDWARE MONITOR DRIVER +M: Guenter Roeck +L: linux-hwmon@vger.kernel.org +S: Maintained +F: drivers/hwmon/ina238.c + INDEX OF FURTHER KERNEL DOCUMENTATION M: Carlos Bilbao S: Maintained From patchwork Wed Oct 25 10:34:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Leitner X-Patchwork-Id: 158004 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2503158vqx; Wed, 25 Oct 2023 03:36:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvL23JdehdG78Fj2SsQMMUPDNmSfL+hPl97e/Cx6OGvqgAz4WeNtBz2eQMSeQ6/Fv/Tc6D X-Received: by 2002:a25:e74b:0:b0:d9a:c8a1:70d0 with SMTP id e72-20020a25e74b000000b00d9ac8a170d0mr13682477ybh.30.1698230184626; Wed, 25 Oct 2023 03:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698230184; cv=none; d=google.com; s=arc-20160816; b=FPcbecRrCAEjMynwWp0+v7h2F+FZGQzVwekjB90RkwqtfBGRTN+3Jm3Gt2fgJUlhBu tX5yfTRL1SufOlBrELaighN7rO5DyzGOVgqppScV2trRNrixgznoJg32MP/Ztb84CVHf jr08HMxuQRLr8N3lWE9VTiy8NdfGfysvXwbhFU/PtGFfFgTizL5z8/SJ2Vw/BGmGnZ6s VY2A5MeBUW/+EGVCiefFf2iYSA2392qXOr9vwgwxwJ3f/ArJiP++0qDRTbSL26OTj/np 5JfWOx3pZOfO7plx7mdgcA6T54NywQBmTRy+zXA168fJeRuAniy85uyXhwujmJta935k KK6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=EWT4tiwSCHa1IHwabwZCyboV8lHl01kP2sICYrR/H4k=; fh=lhNkkbLm/HIJ1PE6fjk142ayDM14yYFU7I5GsZU8FkM=; b=qhmmfvcW6woiDptXT5zd/InGn8kEOJAs4HslUZPuPHf7IWgAEw/qfAW2BwUkT3CEtC WVa71iF2gaNPltxVepfMW5SFeNTToyOvAAgvnYIrt+dIGFHIvqaffgaI23TAklzIeijL LD1QHUGVC8QOOKZ6S1iy4VqCm9ZgMIdqgOu6lExo9TzzX9NlaqhncyWuhHq/Yh0RgmJC iGe+ZikRh2YMa/5R89W4AFd7E7fbkLfKjZkidGJJJuxkhRjL8y9zhvZhVtRuEEGpyYDe xol876gQhb/8CcE2YUWRehPjlBcNKIjutn/JEdok9KtND06hWPzbz1508sZSvGyhniyc gVFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=IveYCGBP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id i30-20020a25b21e000000b00d9cafbf5357si10076995ybj.676.2023.10.25.03.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:36:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=IveYCGBP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 73A6C80FE29D; Wed, 25 Oct 2023 03:36:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234823AbjJYKff (ORCPT + 26 others); Wed, 25 Oct 2023 06:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234854AbjJYKfC (ORCPT ); Wed, 25 Oct 2023 06:35:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B2F21718; Wed, 25 Oct 2023 03:34:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPS id 5D48CC433A9; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.dev; s=korg; t=1698230089; bh=i2xaXqOVgU88Uvg3QDgHjQjoR8ujrvuCPuyxLV6Xtz4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IveYCGBPkLzyDWD2vMUNdTgoYO0lOeBomBtiGi/LsxivNdwrcc48Y/gXA+ypOBn4K HIaDa54lSyssv3B+j40INE0lDtVkcVzaye2cB0w9KF3/x9O8k2evuwWiZtaNMH3upz 3pL5AuYsjGl/CDRQrorHhUOM3KZ6ycdeox8KW5N4= Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D2FEC25B6E; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) From: Richard Leitner Date: Wed, 25 Oct 2023 10:34:12 +0000 Subject: [PATCH 2/4] dt-bindings: hwmon: add ti,ina238 MIME-Version: 1.0 Message-Id: <20231025-ina237-v1-2-a0196119720c@linux.dev> References: <20231025-ina237-v1-0-a0196119720c@linux.dev> In-Reply-To: <20231025-ina237-v1-0-a0196119720c@linux.dev> To: Guenter Roeck , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Richard Leitner X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698230088; l=2124; i=richard.leitner@linux.dev; s=20231025; h=from:subject:message-id; bh=i2xaXqOVgU88Uvg3QDgHjQjoR8ujrvuCPuyxLV6Xtz4=; =?utf-8?q?b=3Dyuv9v7Sy8wlR?= =?utf-8?q?5MraQ2EgcTULWV5JPbnedvH4packoK616Xqds4Mm9TEg6QErN/mLJKfPfxhhqp4c?= CD7JxoP4Bq3qpgWMbMbjwAsk960HEgsqRRKpjySvzmZZnznGL4HR X-Developer-Key: i=richard.leitner@linux.dev; a=ed25519; pk=ZYa5+0m9RFYtnNU6DLet7sHyPehnVHa0ucJlYiAu2NU= X-Endpoint-Received: by B4 Relay for richard.leitner@linux.dev/20231025 with auth_id=90 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Wed, 25 Oct 2023 03:36:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780723414266474442 X-GMAIL-MSGID: 1780723414266474442 The ina238 driver is available since 2021 but lacks a dt-bindings file. Therefore add the missing file now. Mention Jean Delvare and Guenter Roeck as maintainers as reported by the get_maintainer.pl script. Signed-off-by: Richard Leitner --- .../devicetree/bindings/hwmon/ti,ina238.yaml | 46 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 47 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml new file mode 100644 index 000000000000..aba89e5f34b3 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/hwmon/ti,ina238.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments INA238 power/voltage monitors + +maintainers: + - Jean Delvare + - Guenter Roeck + +description: | + The INA238 is an ultra-precise digital power monitor with a + 16-bit delta-sigma ADC specifically designed for current-sensing + applications. + + Datasheets: + https://www.ti.com/lit/ds/symlink/ina238.pdf + +properties: + compatible: + enum: + - ti,ina238 + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + power-sensor@40 { + compatible = "ti,ina238"; + reg = <0x40>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 28f91c8a2e1c..13858bd6a3d4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10271,6 +10271,7 @@ INA238 HARDWARE MONITOR DRIVER M: Guenter Roeck L: linux-hwmon@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/hwmon/ti,ina238.yaml F: drivers/hwmon/ina238.c INDEX OF FURTHER KERNEL DOCUMENTATION From patchwork Wed Oct 25 10:34:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Leitner X-Patchwork-Id: 158006 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2503265vqx; Wed, 25 Oct 2023 03:36:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQsUKNiCpkoFxkWZRAOqlMKNCLc0SH9wJ2pCIBL7ZDljIO6FbA6QLzRwAOUaEPVNgtqmwP X-Received: by 2002:a25:acc4:0:b0:da0:3972:a062 with SMTP id x4-20020a25acc4000000b00da03972a062mr4797055ybd.39.1698230196121; Wed, 25 Oct 2023 03:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698230196; cv=none; d=google.com; s=arc-20160816; b=R7NcqXMWAcZaD3h5nw9s9aZhR44hZAQaTFFn239qTgEuiGyWoyCLCk4jGRfdJT2XKS IAHkz4VvSXqQRbVB6zc5Yg6+vnsLYGvaUV4sZznODwDY+sYZDev7WWH83WhyY5KM7f5z iRosaA4bnSMriAud0j2wGcqi5u6uOMjeKUXzwTgdOFT3GACMhjIJYcTEQ9xZofgO6Smq lTAOW9XL5kqYUzfDSaSIe8sR5HmxjbzwUv9t2saAI3EsLRPwNu2q8F13wpc1HLXSi7NS bILyVa4Kuie3HE2Zd+G/RaWa8yCEb8CiukKETubn0oT9rSmsEu38ZyyZXyNCuR9kGuy8 SNlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ySilvzOExPXGfgGL5gO3l97kd5/IWTnoOuFkLbNpPUg=; fh=lhNkkbLm/HIJ1PE6fjk142ayDM14yYFU7I5GsZU8FkM=; b=zNWVNwY4ouNciWO8tUlm0fAsraPOe63v6YzCGAJ0zyboi0ZHfMN3SavHF8cBIex72G G01LcEHrjHwquPhFzy7u0nUfrohXQ7X+qMb8zTcEAPEXB4m5hD0iJxN6lIK069hjOTVH dFHnn+99bJeZQeY0gT5WgXTBngMV8Zxy0e+N+64HFHxgmz9gU6GrNw2WpwLcQlcb9uh3 v1kpIEZSAPcyAEyds84g1VuWXJnao7Oed0jZqunQ1g8ZYeStbsrctW71jjlif9/bvdTu lIV8hwVmcmofz80EY7VLo4kF1fSNJoT/yWHq0jeFjO6Q16D5QC3jEX8jbSCS1UizKrlX 7keQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=BjiBDWUM; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e72-20020a25694b000000b00da06203c706si2393582ybc.318.2023.10.25.03.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:36:36 -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=@linux.dev header.s=korg header.b=BjiBDWUM; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 594E4805F09C; Wed, 25 Oct 2023 03:36:13 -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 S234903AbjJYKfu (ORCPT + 26 others); Wed, 25 Oct 2023 06:35:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234831AbjJYKfC (ORCPT ); Wed, 25 Oct 2023 06:35:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 737F7171A; Wed, 25 Oct 2023 03:34:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPS id 732DBC433B6; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.dev; s=korg; t=1698230089; bh=DtHEPpID31tWjOLNIsg0s4zUFeieNUVEZ4/N6Xx8pBg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=BjiBDWUMuj2tkWUwTUmXk+7PGrVIGz3zwiAzUlyvkvPp4VSCBA9MDde6zGjkgQOIR +N8gsK0fk7EF3dkwYdCFXB+4GHIAxC/+1Npnj7ZZNjgX8FvG3t5RKQtskoGVjq9Psm wkk1VeOCjKG18kaHLbgBzXqLcilm9k5W9YMqUkEI= Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AD4BC25B47; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) From: Richard Leitner Date: Wed, 25 Oct 2023 10:34:13 +0000 Subject: [PATCH 3/4] hwmon: ina238: add ina237 support MIME-Version: 1.0 Message-Id: <20231025-ina237-v1-3-a0196119720c@linux.dev> References: <20231025-ina237-v1-0-a0196119720c@linux.dev> In-Reply-To: <20231025-ina237-v1-0-a0196119720c@linux.dev> To: Guenter Roeck , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Richard Leitner X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698230088; l=1834; i=richard.leitner@linux.dev; s=20231025; h=from:subject:message-id; bh=DtHEPpID31tWjOLNIsg0s4zUFeieNUVEZ4/N6Xx8pBg=; =?utf-8?q?b=3Dcbexpn9jwDnL?= =?utf-8?q?m+iezslfz1ab3VC6XgcxtDK5rB8jqIMYOYfLU10JVG6RexSObUWxYfv/lSVZWjUN?= mndptX2xClpQW5585VXATi/o+DZCXtdCE+kJlqIZpCmvIIwi3Ljr X-Developer-Key: i=richard.leitner@linux.dev; a=ed25519; pk=ZYa5+0m9RFYtnNU6DLet7sHyPehnVHa0ucJlYiAu2NU= X-Endpoint-Received: by B4 Relay for richard.leitner@linux.dev/20231025 with auth_id=90 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 03:36:13 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780723425858698333 X-GMAIL-MSGID: 1780723425858698333 The INA237 "85-V, 16-Bit, Precision Power Monitor With I2C Interface" is basically the same as INA328. Therefore add a corresponding compatible to the driver. According to the datasheet the main difference is the current and power monitoring accuracy: +------------------------+---------------+---------------+ | | INA238 | INA237 | +------------------------+---------------+---------------+ | Offset voltage | +/- 5µV | +/- 50µV | | Offset drift | +/- 0.02µV/°C | +/- 0.02µV/°C | | Gain error | +/- 0.1% | +/- 0.3% | | Gain error drift | +/- 25ppm/°C | +/- 50ppm/°C | | Common mode rejection | 140dB | 120dB | | Power accuracy | 0.7% | 1.6% | +------------------------+---------------+---------------+ As well as the missing DEVICE_ID register at 0x3F, which is currently not in use by the driver. Signed-off-by: Richard Leitner --- drivers/hwmon/ina238.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/ina238.c b/drivers/hwmon/ina238.c index f519c22d3907..ca9f5d2c811b 100644 --- a/drivers/hwmon/ina238.c +++ b/drivers/hwmon/ina238.c @@ -33,7 +33,7 @@ #define INA238_BUS_UNDER_VOLTAGE 0xf #define INA238_TEMP_LIMIT 0x10 #define INA238_POWER_LIMIT 0x11 -#define INA238_DEVICE_ID 0x3f +#define INA238_DEVICE_ID 0x3f /* not available on INA237 */ #define INA238_CONFIG_ADCRANGE BIT(4) @@ -622,6 +622,7 @@ static const struct i2c_device_id ina238_id[] = { MODULE_DEVICE_TABLE(i2c, ina238_id); static const struct of_device_id __maybe_unused ina238_of_match[] = { + { .compatible = "ti,ina237" }, { .compatible = "ti,ina238" }, { }, }; From patchwork Wed Oct 25 10:34:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Leitner X-Patchwork-Id: 158005 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2503181vqx; Wed, 25 Oct 2023 03:36:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVE4nTRvW/s3FKD41JjZpPQKeZ/6AgXBFpIsHJpKC1CeCmx1KrQTwQoeAbtq9NL1COVmkl X-Received: by 2002:a05:6122:178f:b0:495:3d9d:535c with SMTP id o15-20020a056122178f00b004953d9d535cmr14952771vkf.4.1698230187318; Wed, 25 Oct 2023 03:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698230187; cv=none; d=google.com; s=arc-20160816; b=UbFwGhkDaeF3R2HkqzPch1uSI4EZ2yvicbCyD780dLSBoNV8uj+bFfpa4BqFzI98mm hjm5tQJvx7yqrPF09hdBHr1UateBeDh+omzj5GP6PSwOfOEtZD+R7NTJn14uqlXx8BrJ jlKhc6GtzzWRHQlB8m3ZtobfYDRiIiKzUIFxEs6+iJjpWAI+a1AjNuAEbzHuGHJ4fqwO EYsbeHJanBrRbOTmevMMXbUdc975mdyCbbvyMW++Xk8hGbN5NcU/lreKpoZr07C9VqyE TVHdvaB69C+M54BrqDttUwcG/BwrJ0L5CuxTdK1SfSaFv75l6B91byQmEvM9qx3PZrwS MMBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=sQ9Uo8YsVmHuGQTV4xR5AWSkbxykNAnnRGGq4p/MoWc=; fh=lhNkkbLm/HIJ1PE6fjk142ayDM14yYFU7I5GsZU8FkM=; b=A9p39sPz5rjSnG3DcgygidDuvGY9qsT6pQuE2wh9yKvkQaPu5W8AjBdyjkk7+qEXnf FoDUTaadgTIOhK74Y/xKgb5JxV/8mHSlW6wJSN9Iam/9kHKIYVtjm8R2qsxN19YCKBtH je4HhZ9GWuXmrpB1t57TyXxTYtXH2MI3SX9AXikdZmX9qkhndJFBmqEJAlyEmXOcOd9t TKF/LYIGBjeWvepGfTcQymdkRyCBnWJgtlPlZOgQrIdMLl8sLsv3KEiJsKXe7iEZdd/l DqkJRG6/6u+XBsykGsCeH/Fw6J4NvNQrZ2/Us/9nHSGC3xMA32xOjK+cffOXRQhI76Ah a+ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=0Z1BfXWg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u11-20020a81a50b000000b0059b3e22e6d2si10748144ywg.154.2023.10.25.03.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:36:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=0Z1BfXWg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 39387809477B; Wed, 25 Oct 2023 03:36:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343622AbjJYKfk (ORCPT + 26 others); Wed, 25 Oct 2023 06:35:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234617AbjJYKfC (ORCPT ); Wed, 25 Oct 2023 06:35:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5298C1719; Wed, 25 Oct 2023 03:34:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPS id 75C4AC433AD; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.dev; s=korg; t=1698230089; bh=2UlV2SAeLThisZx2CDUzVQIsXFCsdphm0WX5MqF/paA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=0Z1BfXWgfx5rvEQovfZHR5PrOerqx9mtKj0gvUKkZkvLL/uGDjnqG7M8qQEBqsGWE FBRvTxMCS6UaSA6UX29G/K9+PczmVEOaeELWTjn0aGlf2dtH/1OKCeP6tTf+4GlS95 +t0vUgeDr1AUmkRnqwma+kPTgNod/r0EHNBtZFRs= Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 599C7C25B6F; Wed, 25 Oct 2023 10:34:49 +0000 (UTC) From: Richard Leitner Date: Wed, 25 Oct 2023 10:34:14 +0000 Subject: [PATCH 4/4] dt-bindings: hwmon: ti,ina238: add ti,ina237 MIME-Version: 1.0 Message-Id: <20231025-ina237-v1-4-a0196119720c@linux.dev> References: <20231025-ina237-v1-0-a0196119720c@linux.dev> In-Reply-To: <20231025-ina237-v1-0-a0196119720c@linux.dev> To: Guenter Roeck , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Richard Leitner X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698230088; l=666; i=richard.leitner@linux.dev; s=20231025; h=from:subject:message-id; bh=2UlV2SAeLThisZx2CDUzVQIsXFCsdphm0WX5MqF/paA=; =?utf-8?q?b=3DqVMEmSxVR/Bx?= =?utf-8?q?f6+PrpumfMpyFJL40+yFqvVmuDr8yuDujWEFxZ2CGxoNMGcrHJR8tHp9Rf4n02pU?= YDhZzYxyBzu4oeagPUqVG4mczsszD7wqGMgouzCpDI++hLYnLHSe X-Developer-Key: i=richard.leitner@linux.dev; a=ed25519; pk=ZYa5+0m9RFYtnNU6DLet7sHyPehnVHa0ucJlYiAu2NU= X-Endpoint-Received: by B4 Relay for richard.leitner@linux.dev/20231025 with auth_id=90 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Wed, 25 Oct 2023 03:36:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780723416650219954 X-GMAIL-MSGID: 1780723416650219954 Add ti,ina237 binding to ti,ina238 as they share the same driver. Signed-off-by: Richard Leitner --- Documentation/devicetree/bindings/hwmon/ti,ina238.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml index aba89e5f34b3..17408076696c 100644 --- a/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml +++ b/Documentation/devicetree/bindings/hwmon/ti,ina238.yaml @@ -22,6 +22,7 @@ description: | properties: compatible: enum: + - ti,ina237 - ti,ina238 reg: