[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <16d46b4c-9fba-4432-ac68-9ca19492d754@sirena.org.uk>
Date: Thu, 27 Feb 2025 14:04:51 +0000
From: Mark Brown <broonie@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: James Calligeros <jcalligeros99@...il.com>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Shenghao Ding <shenghao-ding@...com>, Kevin Lu <kevin-lu@...com>,
Baojun Xu <baojun.xu@...com>, Dan Murphy <dmurphy@...com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Shi Fu <shifu0704@...ndersoft.com>,
Jean Delvare <jdelvare@...e.com>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Martin PoviĊĦer <povik+lin@...ebit.org>,
Hector Martin <marcan@...can.st>, linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
asahi@...ts.linux.dev, linux-hwmon@...r.kernel.org
Subject: Re: [PATCH v3 12/20] ASoC: tas2770: expose die temp to hwmon
On Thu, Feb 27, 2025 at 04:45:35AM -0800, Guenter Roeck wrote:
> On 2/27/25 04:07, James Calligeros wrote:
> > +static int tas2770_read_die_temp(struct tas2770_priv *tas2770, long *result)
> > +{
> > + int ret, reading;
> > +
> > + /*
> > + * component could be uninitialised if the codec is not
> > + * attached to a machine driver
> > + */
> > + if (!tas2770->component)
> > + return -EINVAL;
> > +
> If this is temporary, it should return -ENODATA or better only instantiate after
> a component is attached. If it is permanent, the device should not instantiate
> in the first place.
I am wondering why this is using the ASoC component rather than just
the regmap, then there wouldn't be any issue here and the reads would
always work so long as the device was probed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists