Commit 43e60861fe9d39740cf5b355f58fecedf0d8e9ba

Authored by Mark Brown
Committed by Rafael J. Wysocki
1 parent d08a5ace18

PM / OPP: Hide OPP configuration when SoCs do not provide an implementation

Since the OPP API is only useful with an appropraite SoC-specific
implementation there is no point in offering the ability to enable
the API on general systems. Provide an ARCH_HAS OPP Kconfig symbol
which masks out the option unless selected by an implementation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Showing 2 changed files with 7 additions and 0 deletions Side-by-side Diff

Documentation/power/opp.txt
... ... @@ -37,6 +37,9 @@
37 37 SoC framework -> modifies on required cases certain OPPs -> OPP layer
38 38 -> queries to search/retrieve information ->
39 39  
  40 +Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
  41 +to make the OPP layer available.
  42 +
40 43 OPP layer expects each domain to be represented by a unique device pointer. SoC
41 44 framework registers a set of initial OPPs per device with the OPP layer. This
42 45 list is expected to be an optimally small number typically around 5 per device.
kernel/power/Kconfig
... ... @@ -246,9 +246,13 @@
246 246 depends on PM_SLEEP || PM_RUNTIME
247 247 default y
248 248  
  249 +config ARCH_HAS_OPP
  250 + bool
  251 +
249 252 config PM_OPP
250 253 bool "Operating Performance Point (OPP) Layer library"
251 254 depends on PM
  255 + depends on ARCH_HAS_OPP
252 256 ---help---
253 257 SOCs have a standard set of tuples consisting of frequency and
254 258 voltage pairs that the device will support per voltage domain. This