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
- References:
- [PATCH v3 00/20] ASoC: tas27{64,70}: improve support for Apple codec variants
- From: James Calligeros
- [PATCH v3 12/20] ASoC: tas2770: expose die temp to hwmon
- From: James Calligeros
- Re: [PATCH v3 12/20] ASoC: tas2770: expose die temp to hwmon
- From: Guenter Roeck
- [PATCH v3 00/20] ASoC: tas27{64,70}: improve support for Apple codec variants
- Prev by Date: [PATCH v4 10/16] soundwire: intel_auxdevice: add indirection for BPT send_async/wait
- Next by Date: RE: [PATCH v3 01/16] Documentation: driver: add SoundWire BRA description
- Previous by thread: Re: [PATCH v3 12/20] ASoC: tas2770: expose die temp to hwmon
- Next by thread: [PATCH v3 14/20] ASoC: tas2764: Crop SDOUT zero-out mask based on BCLK ratio
- Index(es):
![]() |