Re: [PATCH 2/5] thermal/core: Reset cooling state during cooling device unregistration
From: Zhang, Rui
Date: Wed Mar 29 2023 - 02:28:36 EST
On Tue, 2023-03-28 at 19:54 +0200, Rafael J. Wysocki wrote:
> > > What do the other cooling device drivers do in general when they
> > > get
> > > removed?
> >
> > No cooling device driver has extra handling after cdev
> > unregistration.
>
> However, the question regarding what to do when the driver of a
> cooling device in use is being removed is a valid one.
>
> One possible approach that comes to mind could be to defer the driver
> removal until the overheat condition goes away, but anyway it would
> be
> better to do that in the core IMV.
In this case, we should guarantee that the thermal zone driver is still
functional. i.e. it still can get temperature change notifications and
update the thermal zone. I doubt if current thermal zone drivers can
guarantee this.
Given that this is a rare case, and the current behavior is not perfect
but still acceptable, maybe we can leave this low priority for now.
thanks,
rui