Re: [PATCH v3 12/20] ASoC: tas2770: expose die temp to hwmon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux