From patchwork Mon Sep 9 16:36:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martyn Welch X-Patchwork-Id: 13797310 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2FF2ECE579 for ; Mon, 9 Sep 2024 16:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=pEdXwM6kNLD2Wk26Smfp680Rf6Nw1BC7cBDznRchqSg=; b=bdDF9uKXJBa6CvwHlZlo4Cqr1B Yw4gtBmnHF7avmW3ikhc4ZMBMdKrRKFByPnA4hybGHeJml8gtNk8eynP32JcOTjkPXB8W8IV9OuJ5 Xbmy55Q6zfhdRIxWS8+qaIO1cP6s/sq5p7dImdcdo2uDNup/SaR0GRyNFwiudjAyDGyGPGZxhWmEO FbOJFxx7Nv9lIILRHhTLh8BwqHcHtJomjZxGCRlCtxm0NwWU8uD17gDZTN06P8ZwC06zBa+LtFD9Q FhnwkGZcd53ymhqcdp1uusubHQ3D1c8mg1DLch2d534z84EIRMUENtS89WYjYqAC4uNW9t/LfRer2 7Hu8wZTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snhOG-00000002gg9-0uhq; Mon, 09 Sep 2024 16:37:24 +0000 Received: from bali.collaboradmins.com ([148.251.105.195]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snhNE-00000002gXV-337k for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2024 16:36:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1725899777; bh=FclFSf8FsCbG3fQav3OgUtvEsLk1smEIFvpfVk170gU=; h=From:To:Cc:Subject:Date:From; b=oPyu9U4PgYBX/KN9dZCJ8ufd/krOlZpiQeuq8Mo23NhVMrpsh8Y64Tv/fAd8uTTmN tMoL2tLhYhwdwLO4QmHJScRo+Tu5N526kVlJXoScWUwGqUeg0KGuL72DApqSWSCz7p VoOau2YMyUYI2M2TaAW+18AlJP+WWUhht0Wu066TdJvdVpmwBWUiVlKX3j0Cn7Xgab Jul+9tWGUWgModujrZDgvKovXSQnwVIiSduMjmh8jlK82wAofX2KDSZFTaNSxHW2my 0SOpcF/FopJvZJQrGWhdVNMajsaIIt4NZK/k9/z92J7xnt0t0pc+b6TwNl5T8CBAWI FjbqWeE0vGjVA== Received: from pan.lan (unknown [IPv6:2a00:23c6:c32f:9100::16d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: martyn) by bali.collaboradmins.com (Postfix) with ESMTPSA id 73D7717E35D9; Mon, 9 Sep 2024 18:36:17 +0200 (CEST) From: Martyn Welch To: Shawn Guo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: kernel@collabora.com, Martyn Welch , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: arm64: dts: ls1028a-rdb: Add iio-hwmon compatibility table Date: Mon, 9 Sep 2024 17:36:07 +0100 Message-ID: <20240909163608.80541-1-martyn.welch@collabora.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_093620_944332_764E02D8 X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The ls1028ardb uses the TI ina220 power monitor. This device has an IIO and hwmon drivers, but can't be used with both at the same time. To enable us to utilise the iio framework, but also access power information via the hwmon framework, add an iio-hwmon map. This allows the IIO driver to be used for the ina220, with the iio-hwmon driver mapping the data from the IIO framework into hwmon. Signed-off-by: Martyn Welch --- arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts index ecd2c1e..b062de5 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts @@ -94,6 +94,12 @@ simple-audio-card,codec { system-clock-frequency = <25000000>; }; }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&ina220 0>, <&ina220 1>, + <&ina220 2>, <&ina220 3>; + }; }; &can0 { @@ -222,8 +228,9 @@ i2c@2 { #size-cells = <0>; reg = <0x02>; - current-monitor@40 { + ina220: current-monitor@40 { compatible = "ti,ina220"; + #io-channel-cells = <1>; reg = <0x40>; shunt-resistor = <500>; };