Ignore:
Timestamp:
Mar 18, 2021, 8:57:36 PM (4 years ago)
Author:
David Azarewicz
Message:

Merge changes from Paul's uniaud32next branch.

Location:
GPL/trunk
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/include/linux/pm_qos.h

    r614 r679  
    1111
    1212#include <linux/version.h>
     13#include <linux/plist.h>
     14#include <linux/notifier.h>
     15#include <linux/device.h>
     16#include <linux/workqueue.h>
     17
     18enum dev_pm_qos_req_type {
     19        DEV_PM_QOS_RESUME_LATENCY = 1,
     20        DEV_PM_QOS_LATENCY_TOLERANCE,
     21        DEV_PM_QOS_FLAGS,
     22};
     23
     24struct pm_qos_flags_request {
     25        struct list_head node;
     26        s32 flags;      /* Do not change to 64 bit */
     27};
     28
     29struct dev_pm_qos_request {
     30        enum dev_pm_qos_req_type type;
     31        union {
     32                struct plist_node pnode;
     33                struct pm_qos_flags_request flr;
     34        } data;
     35        struct device *dev;
     36};
     37
     38struct pm_qos_request {
     39        struct plist_node node;
     40        int pm_qos_class;
     41        struct delayed_work work; /* for pm_qos_update_request_timeout */
     42};
     43
    1344#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
    1445#include <linux/latency.h>
     
    3667}
    3768
     69static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)
     70{
     71        return req->dev != NULL;
     72}
     73
     74static inline void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
     75                        s32 value) {}
     76static inline void pm_qos_update_request(struct pm_qos_request *req,
     77                           s32 new_value) {}
     78static inline void pm_qos_update_request_timeout(struct pm_qos_request *req,
     79                                   s32 new_value, unsigned long timeout_us) {}
     80static inline void pm_qos_remove_request(struct pm_qos_request *req) {}
     81
     82static inline int pm_qos_request_active(struct pm_qos_request *req)
     83{
     84        return 0;
     85}
    3886#endif /* >= 2.6.19 */
    3987
     88static inline s32 cpu_latency_qos_limit(void) { return INT_MAX; }
     89static inline bool cpu_latency_qos_request_active(struct pm_qos_request *req)
     90{
     91        return false;
     92}
     93static inline void cpu_latency_qos_add_request(struct pm_qos_request *req,
     94                                               s32 value) {}
     95static inline void cpu_latency_qos_update_request(struct pm_qos_request *req,
     96                                                  s32 new_value) {}
     97static inline void cpu_latency_qos_remove_request(struct pm_qos_request *req) {}
     98
    4099#endif /* _LINUX_PM_QOS_H */
Note: See TracChangeset for help on using the changeset viewer.