Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Martyn Welch <martyn.welch@collabora.com>
To: Frank Li <Frank.li@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>, Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski	 <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	kernel@collabora.com,  linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: arm64: dts: ls1028a-rdb: Add iio-hwmon compatibility table
Date: Tue, 10 Sep 2024 09:19:41 +0100	[thread overview]
Message-ID: <d161352f2bdf7da1b6d299818c6c665ad48ab665.camel@collabora.com> (raw)
In-Reply-To: <Zt87n+NTaN7qSQTS@lizhi-Precision-Tower-5810>

On Mon, 2024-09-09 at 14:17 -0400, Frank Li wrote:
> On Mon, Sep 09, 2024 at 05:36:07PM +0100, Martyn Welch wrote:
> > 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.
> 
> Can you simply said:
> 
> Add an iio-hwmon map to utilise the iio framework and access power
> information via the hwmon framework at the same time.
> 
> Frank
> 

Sure

Martyn

> > Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
> > ---
> >  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>;
> >  			};



      reply	other threads:[~2024-09-10  8:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 16:36 arm64: dts: ls1028a-rdb: Add iio-hwmon compatibility table Martyn Welch
2024-09-09 18:17 ` Frank Li
2024-09-10  8:19   ` Martyn Welch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d161352f2bdf7da1b6d299818c6c665ad48ab665.camel@collabora.com \
    --to=martyn.welch@collabora.com \
    --cc=Frank.li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox