Skip to content

drivers: Frequency constraint infrastructure

Viresh Kumar linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drivers: base: Add frequency constraint infrastructureMAINTAINERS drivers/base/Kconfig drivers/base/Makefile +2 more+692 -05 replies
2/3cpufreq: Implement freq-constraint callbackdrivers/cpufreq/Kconfig drivers/cpufreq/cpufreq.c+45 -02 replies
3/3cpufreq: Implement USER constraintdrivers/cpufreq/cpufreq.c include/linux/cpufreq.h+26 -440 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchMatthias Kaehlcke
1/3
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] drivers: Frequency constraint infrastructure

Hi,

This commit introduces the frequency constraint infrastructure, which provides a generic interface for parts of the kernel to constraint the working frequency range of a device.

The primary users of this are the cpufreq and devfreq frameworks. The cpufreq framework already implements such constraints with help of notifier chains (for thermal and other constraints) and some local code (for user-space constraints). The devfreq framework developers have also shown interest [1] in such a framework, which may use it at a later point of time.

The idea here is to provide a generic interface and get rid of the notifier based mechanism.

Only one constraint is added for now for the cpufreq framework and the rest will follow after this stuff is merged.

Matthias Kaehlcke was involved in the preparation of the first draft of this work and so I have added him as Co-author to the first patch. Thanks Matthias.

FWIW, This doesn't have anything to do with the boot-constraints framework [2] I was trying to upstream earlier :)

--
viresh

[1] lore.kernel.org/lkml/[email protected]
[2] lore.kernel.org/lkml/[email protected]

Viresh Kumar (3):
drivers: base: Add frequency constraint infrastructure
cpufreq: Implement freq-constraint callback
cpufreq: Implement USER constraint

 MAINTAINERS                     |   8 +
 drivers/base/Kconfig            |   5 +
 drivers/base/Makefile           |   1 +
 drivers/base/freq_constraint.c  | 633 ++++++++++++++++++++++++++++++++++++++++
 drivers/cpufreq/Kconfig         |   1 +
 drivers/cpufreq/cpufreq.c       |  92 ++++--
 include/linux/cpufreq.h         |   8 +-
 include/linux/freq_constraint.h |  45 +++
 8 files changed, 756 insertions(+), 37 deletions(-)
 create mode 100644 drivers/base/freq_constraint.c
 create mode 100644 include/linux/freq_constraint.h
Signature · 1 line
2.7.4