Re: [PATCH v4 2/2] cpufreq: tegra124: Allow building as a module

Aaron Kling
2025-05-14T16:43:21Z

On Mon, May 12, 2025 at 11:26 PM Aaron Kling <webgeek1234@gmail.com> wrote:
>
> On Fri, May 9, 2025 at 8:38 AM Jon Hunter <jonathanh@nvidia.com> wrote:
> >
> >
> >
> > On 09/05/2025 01:04, Aaron Kling via B4 Relay wrote:
> > > From: Aaron Kling <webgeek1234@gmail.com>
> > >
> > > This requires three changes:
> > > * A soft dependency on cpufreq-dt as this driver only handles power
> > > management and cpufreq-dt does the real operations
> >
> > Hmmm .. how is this handled for other drivers using the cpufreq-dt
> > driver? I see the imx driver has a dependency on this.
>
> A hard dependency would likely make more sense here. I can update this
> in a new revision. When I first set the soft dependency, I wasn't
> certain how the driver worked, so I was trying to be less intrusive.

I remember why I added this soft dep now. The kconfig already has a
dependency on cpufreq_dt. However, this driver doesn't call any
functions directly in that driver. It just builds a platform device
struct for it, then registers it. This results in depmod not requiring
cpufreq_dt for tegra124_cpufreq. So I added the softdep to work around
that, so modprobing tegra124_cpufreq by itself functions properly. Is
there a better way to make depmod map this as needed?

Sincerely,
Aaron