Lines Matching refs:power
54 struct dev_pm_qos *qos = dev->power.qos; in __dev_pm_qos_flags()
58 lockdep_assert_held(&dev->power.lock); in __dev_pm_qos_flags()
84 spin_lock_irqsave(&dev->power.lock, irqflags); in dev_pm_qos_flags()
86 spin_unlock_irqrestore(&dev->power.lock, irqflags); in dev_pm_qos_flags()
100 lockdep_assert_held(&dev->power.lock); in __dev_pm_qos_resume_latency()
112 struct dev_pm_qos *qos = dev->power.qos; in dev_pm_qos_read_value()
116 spin_lock_irqsave(&dev->power.lock, flags); in dev_pm_qos_read_value()
136 spin_unlock_irqrestore(&dev->power.lock, flags); in dev_pm_qos_read_value()
154 struct dev_pm_qos *qos = req->dev->power.qos; in apply_constraint()
170 req->dev->power.set_latency_tolerance(req->dev, value); in apply_constraint()
231 spin_lock_irq(&dev->power.lock); in dev_pm_qos_constraints_allocate()
232 dev->power.qos = qos; in dev_pm_qos_constraints_allocate()
233 spin_unlock_irq(&dev->power.lock); in dev_pm_qos_constraints_allocate()
268 qos = dev->power.qos; in dev_pm_qos_constraints_destroy()
309 spin_lock_irq(&dev->power.lock); in dev_pm_qos_constraints_destroy()
310 dev->power.qos = ERR_PTR(-ENODEV); in dev_pm_qos_constraints_destroy()
311 spin_unlock_irq(&dev->power.lock); in dev_pm_qos_constraints_destroy()
326 !dev->power.set_latency_tolerance; in dev_pm_qos_invalid_req_type()
342 if (IS_ERR(dev->power.qos)) in __dev_pm_qos_add_request()
344 else if (!dev->power.qos) in __dev_pm_qos_add_request()
354 ret = freq_qos_add_request(&dev->power.qos->freq, in __dev_pm_qos_add_request()
358 ret = freq_qos_add_request(&dev->power.qos->freq, in __dev_pm_qos_add_request()
419 if (IS_ERR_OR_NULL(req->dev->power.qos)) in __dev_pm_qos_update_request()
486 if (IS_ERR_OR_NULL(req->dev->power.qos)) in __dev_pm_qos_remove_request()
543 if (IS_ERR(dev->power.qos)) in dev_pm_qos_add_notifier()
545 else if (!dev->power.qos) in dev_pm_qos_add_notifier()
553 ret = blocking_notifier_chain_register(dev->power.qos->resume_latency.notifiers, in dev_pm_qos_add_notifier()
557 ret = freq_qos_add_notifier(&dev->power.qos->freq, in dev_pm_qos_add_notifier()
561 ret = freq_qos_add_notifier(&dev->power.qos->freq, in dev_pm_qos_add_notifier()
595 if (IS_ERR_OR_NULL(dev->power.qos)) in dev_pm_qos_remove_notifier()
600 ret = blocking_notifier_chain_unregister(dev->power.qos->resume_latency.notifiers, in dev_pm_qos_remove_notifier()
604 ret = freq_qos_remove_notifier(&dev->power.qos->freq, in dev_pm_qos_remove_notifier()
608 ret = freq_qos_remove_notifier(&dev->power.qos->freq, in dev_pm_qos_remove_notifier()
638 while (ancestor && !ancestor->power.ignore_children) in dev_pm_qos_add_ancestor_request()
643 while (ancestor && !ancestor->power.set_latency_tolerance) in dev_pm_qos_add_ancestor_request()
667 req = dev->power.qos->resume_latency_req; in __dev_pm_qos_drop_user_request()
668 dev->power.qos->resume_latency_req = NULL; in __dev_pm_qos_drop_user_request()
671 req = dev->power.qos->latency_tolerance_req; in __dev_pm_qos_drop_user_request()
672 dev->power.qos->latency_tolerance_req = NULL; in __dev_pm_qos_drop_user_request()
675 req = dev->power.qos->flags_req; in __dev_pm_qos_drop_user_request()
676 dev->power.qos->flags_req = NULL; in __dev_pm_qos_drop_user_request()
721 if (IS_ERR_OR_NULL(dev->power.qos)) in dev_pm_qos_expose_latency_limit()
723 else if (dev->power.qos->resume_latency_req) in dev_pm_qos_expose_latency_limit()
732 dev->power.qos->resume_latency_req = req; in dev_pm_qos_expose_latency_limit()
748 if (!IS_ERR_OR_NULL(dev->power.qos) && dev->power.qos->resume_latency_req) in __dev_pm_qos_hide_latency_limit()
798 if (IS_ERR_OR_NULL(dev->power.qos)) in dev_pm_qos_expose_flags()
800 else if (dev->power.qos->flags_req) in dev_pm_qos_expose_flags()
809 dev->power.qos->flags_req = req; in dev_pm_qos_expose_flags()
826 if (!IS_ERR_OR_NULL(dev->power.qos) && dev->power.qos->flags_req) in __dev_pm_qos_hide_flags()
864 if (IS_ERR_OR_NULL(dev->power.qos) || !dev->power.qos->flags_req) { in dev_pm_qos_update_flags()
875 ret = __dev_pm_qos_update_request(dev->power.qos->flags_req, value); in dev_pm_qos_update_flags()
892 ret = IS_ERR_OR_NULL(dev->power.qos) in dev_pm_qos_get_user_latency_tolerance()
893 || !dev->power.qos->latency_tolerance_req ? in dev_pm_qos_get_user_latency_tolerance()
895 dev->power.qos->latency_tolerance_req->data.pnode.prio; in dev_pm_qos_get_user_latency_tolerance()
911 if (IS_ERR_OR_NULL(dev->power.qos) in dev_pm_qos_update_user_latency_tolerance()
912 || !dev->power.qos->latency_tolerance_req) { in dev_pm_qos_update_user_latency_tolerance()
932 dev->power.qos->latency_tolerance_req = req; in dev_pm_qos_update_user_latency_tolerance()
938 ret = __dev_pm_qos_update_request(dev->power.qos->latency_tolerance_req, val); in dev_pm_qos_update_user_latency_tolerance()
956 if (!dev->power.set_latency_tolerance) in dev_pm_qos_expose_latency_tolerance()