Re: [PATCH v1] thermal: core: Do not fail cdev registration because of invalid initial state

From: Rafael J. Wysocki
Date: Thu Jun 06 2024 - 05:48:12 EST


On Thu, Jun 6, 2024 at 5:41 AM srinivas pandruvada
<srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:
>
> On Wed, 2024-06-05 at 21:17 +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> >
> > It is reported that commit 31a0fa0019b0 ("thermal/debugfs: Pass
> > cooling
> > device state to thermal_debug_cdev_add()") causes the ACPI fan driver
> > to fail probing on some systems which turns out to be due to the _FST
> > control method returning an invalid value until _FSL is first
> > evaluated
> > for the given fan. If this happens, the .get_cur_state() cooling
> > device
> > callback returns an error and __thermal_cooling_device_register()
> > fails
> > as uses that callback after commit 31a0fa0019b0.
> >
> > Arguably, _FST should not return an inavlid
> s/inavlid/invalid

Thanks, I'll fix it up when applying the patch.