[PATCH v8 10/11] media: chips-media: wave6: Add Wave6 thermal cooling device

Frank Li Frank.li at oss.nxp.com
Thu Nov 19 13:03:30 PST 2026


On Thu, Nov 19, 2026 at 06:00:04PM +0900, Nas Chung wrote:
> Add a thermal cooling device for the Wave6 VPU, so the thermal
> framework can lower the VPU performance state when the SoC gets hot.
>
> The control driver registers the cooling device on its device tree
> node. The cooling states are built from the OPP table of the "perf"
> power domain.
>
> Tested-by: Ming Qian <ming.qian at oss.nxp.com>
> Tested-by: Marek Vasut <marek.vasut at mailbox.org>
> Signed-off-by: Nas Chung <nas.chung at chipsnmedia.com>
> ---
>  .../media/platform/chips-media/wave6/Makefile |   1 +
>  .../chips-media/wave6/wave6-vpu-thermal.c     | 141 ++++++++++++++++++
>  .../chips-media/wave6/wave6-vpu-thermal.h     |  24 +++
>  .../platform/chips-media/wave6/wave6-vpu.c    |  22 +++
>  .../platform/chips-media/wave6/wave6-vpu.h    |   3 +
>  5 files changed, 191 insertions(+)
>  create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-thermal.c
>  create mode 100644 drivers/media/platform/chips-media/wave6/wave6-vpu-thermal.h
...
> +
> +	if (!thermal->thermal_max)
> +		goto error;

nothing clean up at error label, just return ret

> +
> +	thermal->thermal_event = 0;
> +	thermal->cooling = devm_thermal_of_child_cooling_device_register(dev,
> +									 dev->of_node,
> +									 dev_name(thermal->dev),
> +									 thermal,
> +									 &wave6_cooling_ops);
> +	if (IS_ERR(thermal->cooling)) {
> +		dev_err(thermal->dev, "register cooling device failed\n");
> +		ret = PTR_ERR(thermal->cooling);
> +		goto error;

return dev_err_probe()

Frank



More information about the linux-arm-kernel mailing list