No cpufreq entries with omap2plus_defconfig since "cpufreq: dt-platdev: Support building as module" (commit 3b062a08)

From: Merlijn Wajer
Date: Thu May 02 2024 - 07:31:50 EST


Hi,

I was looking at switching my Motorola Droid 4 phone from Linux 6.1 to Linux 6.6, and it no longer gets any cpufreq entries on boot, and I found cpufreq_dt was no longer loaded. I tried to force the issue by modprobe it, but to no avail. The same issue occurs on the latest 6.9.

After a bit of digging it looks like the problem is that cpufreq-dt-platdev can be built as a module and when this the case (apparently the default), cpufreq_dt doesn't work. With the omap2plus_defconfig, CONFIG_CPUFREQ_DT_PLATDEV is indeed set to module.

When I manually probe cpufreq-dt-platdev and cpufreq_dt, I get the cpufreq_entries back.

Searching around I found this debian bug report [1] which just flips the CONFIG_CPUFREQ_DT_PLATDEV back to '=y', but I think there might be a deeper issue here.

Is there a way to define this relationship/dependency for cpufreq-dt, so that it will automatically load this module?

Regards,
Merlijn

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050587