Re: [PATCH v3 1/3] omap: opp: add OMAP3 OPP table data and common init

Thomas Petazzoni
2010-11-17T08:19:24Z

On Tue, 16 Nov 2010 08:16:07 -0800
Kevin Hilman <khilman@deeprootsystems.com> wrote:

> Yes, I'm not a big fan of the init function called multiple times
> either, but I really want to minimize what board files have to do.
>
> Historically, we tend to add all the init functions to every board
> file, and this is getting cumbersome to understand and maintain.
> What we need is for common code to take care of sensible defaults for
> all boards, and then only boards with non-default behavior have to
> have custom code.

The other way is to have the board code "register" its customization
into the OPP subsystem, and then when the OPP subsystem is initialized,
it takes those customizations into account. But in that specific case,
it's not clear how those customizations could easily be expressed, so
maybe that multiple call strategy is the simplest solution.

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.