From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.99 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796147155; b=Yb2Io3kWlC+STVjD6ZpTuFq8aMSr6N22sdWTnrkKHKBAHQjatYuom03T90mXRlpGPDcr uBeJxWgpF8dtedFdTKXXyPbRCWXg+Ekclwp/FS4ykwYfO4WySeLeW1YEmENCXOJORWxWd EakOr479j7lx1Vkz4lt9hRvlYoCPvyuch7IeoOFScCLnUTbvTOzvJGpMf+HvenuTUOclN XF/oCrmEGTCi097CqOKg4no9Bruk0NA6Fj3q62jOQ9HCDgI7Tz6c67x1A7CfAjl7I50+w FSWyGDeVgoD+57vimKBzRPSezaY4/830g2mWVClsvzg3a1TFPTrvEQ//91OumiLujhQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796147155; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:X-Relaying-Domain: X-CFilter-Loop:Received:DKIM-Signature:X-Forwarded-Encrypted: X-Received:X-Received:Received:From:To:Cc:Subject:Date:Message-Id: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-DetectorID-Processed; bh=gLK52RD3R/z3ipDxnFOGHCR6WdB/hBKCwhg2JbyY7jo=; b=vFn6wuoVGQzKMZmhR+eZ4Q7l2jcXmI72jUSgxlg78hL8OnpAgkDKQfPhLAdWb9l9sl65 NuLw5r5OMIdhtOhU8nrkukafvFvnjYXSi5doimn7fpJFHx0qLMgGlg5qw/63UxjJpkfnT AhvT/PzOIKpCjfKEErmzEyUTUw6d1ziPA1L7dH3NOhvsRG/pfcsS6UBLfkRbtmqOAQdoB e3FKDnE6IthUMG0OaZwASrA/V+2lmiXkBQE6n2P8UMvZZh4aSy8b1bjvp6w/yOrVcw02b j+8MiHR5GT0vHq5q/7A/Hypk29NQm74F3dwjmYeYgu1n0z15wq1W5F5mgLfyTYNP6xw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=LlBXRson; arc=none smtp.remote-ip=209.85.216.99 Received: from mail-pj1-f99.google.com (mail-pj1-f99.google.com [209.85.216.99]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93EFB606A325 for ; Tue, 1 Dec 2026 17:45:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 93EFB606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=LlBXRson Received: by mail-pj1-f99.google.com with SMTP id 98e67ed59e1d1-3b44bdcea8aso7301055a91.1 for ; Tue, 01 Dec 2026 09:45:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796147154; x=1796751954; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gLK52RD3R/z3ipDxnFOGHCR6WdB/hBKCwhg2JbyY7jo=; b=Lnwuc8gETgTeRha4hL+7Nrq97Ba9xFoZWcuGae5X4N4ZWRfKYjSbY22nIfh2Y4rJNA XaWcbcUyDTtz2sQUdlXZtAEe1hEWwE5V63nBl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RU83fYNh3KM1/uGREF/u2kuAZ48t8Awb4ole0Gv4bQwDHdQgd06q4 HR500IlgXVTTEK7MamUzUY6gPUyrcI8wxKRWvkwugYIwc= X-Received: by 2002:a17:90b:39af:b0:3b0:a757:e370 with SMTP id 98e67ed59e1d1-3b41c982510mr24675519a91.42.1796147153608; Tue, 01 Dec 2026 09:45:53 -0800 (PST) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-100.dlp.protect.broadcom.com. [144.49.247.100]) by smtp-relay.gmail.com with ESMTPS id 98e67ed59e1d1-3b42006822asm10025129a91.4.2026.12.01.09.45.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Dec 2026 09:45:53 -0800 (PST) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-ua1-f70.google.com with SMTP id a1e0cc1a2514c-990835cec5aso7345702241.0 for ; Tue, 01 Dec 2026 09:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1796147152; x=1796751952; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gLK52RD3R/z3ipDxnFOGHCR6WdB/hBKCwhg2JbyY7jo=; b=LlBXRsonKx3ToFqkeBla94LKcFwF02OOAok/op/uaEUfDlPv5q73vCoToJLNv2pKu0 yYfRUKDnzGdeanDYMVDaZmNfzRBpQF+2E1PXVFPX63FQLn4eFvIHDSHUamW5zOgA4+Bz UADsFE/dBxKFnh412H/IHQDDbidgrLeSq1oTI= X-Forwarded-Encrypted: i=1; AL+hErGfdtlb9Hc0biC71GaFUtfAqq5ke0V6nBole1hh1IpMhRKoAAW71ajHWMZUmmyRi9MtPLI/ISjoI+ev@vger.kernel.org X-Received: by 2002:a05:6102:e13:b0:7bf:8ec:4996 with SMTP id ada2fe7eead31-7d6db9d165dmr17284271137.20.1796147152083; Tue, 01 Dec 2026 09:45:52 -0800 (PST) X-Received: by 2002:a05:6102:e13:b0:7bf:8ec:4996 with SMTP id ada2fe7eead31-7d6db9d165dmr17284221137.20.1796147151418; Tue, 01 Dec 2026 09:45:51 -0800 (PST) Received: from stbirv-lnx-1.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-92134a16754sm327221356d6.39.2026.12.01.09.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 09:45:50 -0800 (PST) From: Florian Fainelli To: linux-hwmon@vger.kernel.org Cc: Yuval Raviv , Florian Fainelli , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), bcm-kernel-feedback-list@broadcom.com Subject: [PATCH v2 3/3] hwmon: ina2xx: add support for TI INA236 power monitor Date: Tue, 1 Dec 2026 09:45:32 -0800 Message-Id: <20261201174532.3114634-4-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261201174532.3114634-1-florian.fainelli@broadcom.com> References: <20261201174532.3114634-1-florian.fainelli@broadcom.com> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-DetectorID-Processed: b00c1d49-9d2e-4205-b15f-d015386d3d5e From: Yuval Raviv The INA236 shares the same electrical characteristics as the already supported INA232 (calibration value, shunt/bus-voltage/power LSBs, alert support, update interval), and no code path in the driver needs to tell the two apart. Add it to the I2C device ID table and OF match table using the existing ina232 configuration, and list it in the Kconfig help text and in the driver documentation. Signed-off-by: Yuval Raviv [florian: forward porting, commit message] Signed-off-by: Florian Fainelli --- Changes in v2: - Drop the ina236 enum value and the duplicated ina2xx_config[] entry, point the ina236 I2C ID and OF match entries at ina232 instead - Update the SENSORS_INA2XX Kconfig help text and Documentation/hwmon/ina2xx.rst to list the INA236 Documentation/hwmon/ina2xx.rst | 17 ++++++++++++++--- drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/ina2xx.c | 5 +++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Documentation/hwmon/ina2xx.rst b/Documentation/hwmon/ina2xx.rst index 78b8bbf936a2..c69108e57d23 100644 --- a/Documentation/hwmon/ina2xx.rst +++ b/Documentation/hwmon/ina2xx.rst @@ -94,6 +94,16 @@ Supported chips: https://www.ti.com/ + * Texas Instruments INA236 + + Prefix: 'ina236' + + Addresses: I2C 0x40 - 0x43 and 0x48 - 0x4b + + Datasheet: Publicly available at the Texas Instruments website + + https://www.ti.com/ + Author: Lothar Felten Description @@ -109,9 +119,9 @@ interface. The INA220 monitors both shunt drop and supply voltage. The INA226 is a current shunt and power monitor with an I2C interface. The INA226 monitors both a shunt voltage drop and bus supply voltage. -INA230, INA231, INA232, and INA234 are high or low side current shunt and power -monitors with an I2C interface. The chips monitor both a shunt voltage drop and -bus supply voltage. +INA230, INA231, INA232, INA234, and INA236 are high or low side current shunt +and power monitors with an I2C interface. The chips monitor both a shunt +voltage drop and bus supply voltage. INA260 is a high or low side current and power monitor with integrated shunt resistor. @@ -154,6 +164,7 @@ Additional entries are available for the following chips: * ina231 * ina232 * ina234 + * ina236 * ina260 * sy24655 diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 83916de08ea3..eb65fbd16af9 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -2456,8 +2456,8 @@ config SENSORS_INA2XX select REGMAP_I2C help If you say yes here you get support for INA219, INA220, INA226, - INA230, INA231, INA232, INA234, INA260, and SY24655 power monitor - chips. + INA230, INA231, INA232, INA234, INA236, INA260, and SY24655 power + monitor chips. The INA2xx driver is configured for the default configuration of the part as described in the datasheet. diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c index aa5b39a87622..3ddc87986a42 100644 --- a/drivers/hwmon/ina2xx.c +++ b/drivers/hwmon/ina2xx.c @@ -1140,6 +1140,7 @@ static const struct i2c_device_id ina2xx_id[] = { { .name = "ina231", .driver_data = ina226 }, { .name = "ina232", .driver_data = ina232 }, { .name = "ina234", .driver_data = ina234 }, + { .name = "ina236", .driver_data = ina232 }, { .name = "ina260", .driver_data = ina260 }, { .name = "sy24655", .driver_data = sy24655 }, { } @@ -1179,6 +1180,10 @@ static const struct of_device_id __maybe_unused ina2xx_of_match[] = { .compatible = "ti,ina234", .data = (void *)ina234 }, + { + .compatible = "ti,ina236", + .data = (void *)ina232 + }, { .compatible = "ti,ina260", .data = (void *)ina260 -- 2.34.1