• Rafael J. Wysocki's avatar
    PM: QoS: Introduce frequency QoS · 77751a46
    Rafael J. Wysocki authored
    Introduce frequency QoS, based on the "raw" low-level PM QoS, to
    represent min and max frequency requests and aggregate constraints.
    
    The min and max frequency requests are to be represented by
    struct freq_qos_request objects and the aggregate constraints are to
    be represented by struct freq_constraints objects.  The latter are
    expected to be initialized with the help of freq_constraints_init().
    
    The freq_qos_read_value() helper is defined to retrieve the aggregate
    constraints values from a given struct freq_constraints object and
    there are the freq_qos_add_request(), freq_qos_update_request() and
    freq_qos_remove_request() helpers to manipulate the min and max
    frequency requests.  It is assumed that the the helpers will not
    run concurrently with each other for the same struct freq_qos_request
    object, so if that may be the case, their uses must ensure proper
    synchronization between them (e.g. through locking).
    
    In addition, freq_qos_add_notifier() and freq_qos_remove_notifier()
    are provided to add and remove notifiers that will trigger on aggregate
    constraint changes to and from a given struct freq_constraints object,
    respectively.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    77751a46
qos.c 23.1 KB