Lines Matching refs:dev

25 int dev_pm_get_subsys_data(struct device *dev)  in dev_pm_get_subsys_data()  argument
33 spin_lock_irq(&dev->power.lock); in dev_pm_get_subsys_data()
35 if (dev->power.subsys_data) { in dev_pm_get_subsys_data()
36 dev->power.subsys_data->refcount++; in dev_pm_get_subsys_data()
40 dev->power.subsys_data = psd; in dev_pm_get_subsys_data()
41 pm_clk_init(dev); in dev_pm_get_subsys_data()
45 spin_unlock_irq(&dev->power.lock); in dev_pm_get_subsys_data()
61 void dev_pm_put_subsys_data(struct device *dev) in dev_pm_put_subsys_data() argument
65 spin_lock_irq(&dev->power.lock); in dev_pm_put_subsys_data()
67 psd = dev_to_psd(dev); in dev_pm_put_subsys_data()
72 dev->power.subsys_data = NULL; in dev_pm_put_subsys_data()
77 spin_unlock_irq(&dev->power.lock); in dev_pm_put_subsys_data()
102 int dev_pm_domain_attach(struct device *dev, bool power_on) in dev_pm_domain_attach() argument
106 if (dev->pm_domain) in dev_pm_domain_attach()
109 ret = acpi_dev_pm_attach(dev, power_on); in dev_pm_domain_attach()
111 ret = genpd_dev_pm_attach(dev); in dev_pm_domain_attach()
143 struct device *dev_pm_domain_attach_by_id(struct device *dev, in dev_pm_domain_attach_by_id() argument
146 if (dev->pm_domain) in dev_pm_domain_attach_by_id()
149 return genpd_dev_pm_attach_by_id(dev, index); in dev_pm_domain_attach_by_id()
160 struct device *dev_pm_domain_attach_by_name(struct device *dev, in dev_pm_domain_attach_by_name() argument
163 if (dev->pm_domain) in dev_pm_domain_attach_by_name()
166 return genpd_dev_pm_attach_by_name(dev, name); in dev_pm_domain_attach_by_name()
183 void dev_pm_domain_detach(struct device *dev, bool power_off) in dev_pm_domain_detach() argument
185 if (dev->pm_domain && dev->pm_domain->detach) in dev_pm_domain_detach()
186 dev->pm_domain->detach(dev, power_off); in dev_pm_domain_detach()
201 int dev_pm_domain_start(struct device *dev) in dev_pm_domain_start() argument
203 if (dev->pm_domain && dev->pm_domain->start) in dev_pm_domain_start()
204 return dev->pm_domain->start(dev); in dev_pm_domain_start()
220 void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd) in dev_pm_domain_set() argument
222 if (dev->pm_domain == pd) in dev_pm_domain_set()
225 WARN(pd && device_is_bound(dev), in dev_pm_domain_set()
227 dev->pm_domain = pd; in dev_pm_domain_set()
228 device_pm_check_callbacks(dev); in dev_pm_domain_set()