On 08/03/2021 10:53, Lukasz Luba wrote: > Hi Daniel, > > In general the approach is good. If there is a special GPU driver, which > would like to provide 'struct devfreq_cooling_power *' it would leave > 'is_cooling_device=false' and register manually: > devfreq_cooling_em_register(df, dfc_power); > > Please find only a few minor comments below. > > > On 3/8/21 9:16 AM, Daniel Lezcano wrote: >> Currently the default behavior is to manually having the devfreq >> backend to register themselves as a devfreq cooling device. >> >> Instead of adding the code in the drivers for the thermal cooling >> device registering, let's provide a flag in the devfreq's profile to >> tell the common devfreq code to register the newly created devfreq as >> a cooling device. >> >> Suggested-by: Chanwoo Choi <[email protected]> >> Signed-off-by: Daniel Lezcano <[email protected]> >> ---
[ ... ] >> + struct thermal_cooling_device *cdev; > > The linux/thermal.h for 'cdev' would be needed in this header. May be just a forward declaration ? struct thermal_cooling_device; >> + >> struct notifier_block nb_min; >> struct notifier_block nb_max; >> }; >> > > With this small changes: > > Reviewed-by: Lukasz Luba <[email protected]> > > Regards, > Lukasz -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog

