Lines Matching refs:comp
1501 power_dev(dev_info_t *dip, int comp, int level, int old_level, in power_dev() argument
1511 struct pm_component *cp = PM_CP(dip, comp); in power_dev()
1525 if (bc && comp == 0 && POWERING_OFF(old_level, level)) { in power_dev()
1538 power_req.req.ppm_set_power_req.cmpt = comp; in power_dev()
1553 pmf, PM_DEVICE(dip), cp->pmc_comp.pmc_name, comp, in power_dev()
1564 (bc && comp == 0 && POWERING_ON(old_level, level))) in power_dev()
1587 "to level %d (%s)\n", pmf, comp, cp->pmc_comp.pmc_name, in power_dev()
1606 if (bc && comp == 0) { in power_dev()
1616 (PM_CP(dip, comp)->pmc_flags & in power_dev()
1629 (PM_CP(dip, comp)->pmc_flags & in power_dev()
1693 pm_set_power(dev_info_t *dip, int comp, int level, int direction, in pm_set_power() argument
1722 pmf, PM_DEVICE(dip), comp, pm_decode_direction(direction), level)) in pm_set_power()
1727 bpc.bpc_comp = comp; in pm_set_power()
1728 bpc.bpc_olevel = PM_CURPOWER(dip, comp); in pm_set_power()
2151 pm_rsvp_lookup(dev_info_t *dip, int comp) in pm_rsvp_lookup() argument
2156 if (p->pr_dip == dip && p->pr_comp == comp) { in pm_rsvp_lookup()
2169 pm_proceed(dev_info_t *dip, int cmd, int comp, int newlevel) in pm_proceed() argument
2196 found = pm_rsvp_lookup(dip, comp); in pm_proceed()
2467 pm_power(dev_info_t *dip, int comp, int level) in pm_power() argument
2472 struct pm_component *cp = PM_CP(dip, comp); in pm_power()
2477 PM_DEVICE(dip), comp, level)) in pm_power()
2490 retval = (*fn)(dip, comp, level); in pm_power()
2493 e_pm_set_cur_pwr(dip, PM_CP(dip, comp), level); in pm_power()
2508 (void) pm_phc_impl(dip, comp, phc_lvl, 0); in pm_power()
2510 pmf, PM_DEVICE(dip), comp, phc_lvl)) in pm_power()
2514 "level=%d (%s)\n", pmf, comp, cp->pmc_comp.pmc_name, PM_DEVICE(dip), in pm_power()
2545 pm_raise_power(dev_info_t *dip, int comp, int level) in pm_raise_power() argument
2549 if (!e_pm_valid_info(dip, NULL) || !e_pm_valid_comp(dip, comp, NULL) || in pm_raise_power()
2550 !e_pm_valid_power(dip, comp, level)) in pm_raise_power()
2553 return (dev_is_needed(dip, comp, level, PM_LEVEL_UPONLY)); in pm_raise_power()
2557 pm_lower_power(dev_info_t *dip, int comp, int level) in pm_lower_power() argument
2561 if (!e_pm_valid_info(dip, NULL) || !e_pm_valid_comp(dip, comp, NULL) || in pm_lower_power()
2562 !e_pm_valid_power(dip, comp, level)) { in pm_lower_power()
2564 "comp=%d level=%d\n", pmf, PM_DEVICE(dip), comp, level)) in pm_lower_power()
2588 if (dev_is_needed(dip, comp, level, PM_LEVEL_DOWNONLY) != DDI_SUCCESS) { in pm_lower_power()
2630 psc_entry(ushort_t event, psce_t *psce, dev_info_t *dip, int comp, int new, in psc_entry() argument
2681 p->component = comp; in psc_entry()
2724 pm_enqueue_notify(ushort_t cmd, dev_info_t *dip, int comp, in pm_enqueue_notify() argument
2737 pmf, PM_DEVICE(dip), comp, oldlevel, newlevel)) in pm_enqueue_notify()
2743 overrun = psc_entry(cmd, psce, dip, comp, newlevel, oldlevel, in pm_enqueue_notify()
2755 pmf, PM_DEVICE(dip), comp, oldlevel, newlevel)) in pm_enqueue_notify()
2761 overrun = psc_entry(cmd, psce, dip, comp, newlevel, in pm_enqueue_notify()
2774 (void) psc_entry(cmd, psce, dip, comp, newlevel, in pm_enqueue_notify()
2873 dev_info_t *pdip, int comp, int old_level, int level) in pm_notify_parent() argument
2882 bphc.bphc_comp = comp; in pm_notify_parent()
2897 pm_check_and_resume(dev_info_t *dip, int comp, int old_level, int level) in pm_check_and_resume() argument
2901 if (PM_ISBC(dip) && comp == 0 && old_level == 0 && level != 0) { in pm_check_and_resume()
2935 pm_power_has_changed(dev_info_t *dip, int comp, int level) in pm_power_has_changed() argument
2950 PM_DEVICE(dip), comp, level)) in pm_power_has_changed()
2952 if (!e_pm_valid_info(dip, NULL) || !e_pm_valid_comp(dip, comp, &cp) || in pm_power_has_changed()
2953 !e_pm_valid_power(dip, comp, level)) in pm_power_has_changed()
2968 cp = PM_CP(dip, comp); in pm_power_has_changed()
2974 pm_enqueue_notify(PSC_HAS_CHANGED, dip, comp, in pm_power_has_changed()
2980 pdip, comp, cur_power(cp), level); in pm_power_has_changed()
2982 comp, cur_power(cp), level); in pm_power_has_changed()
3000 "level=%d\n", pmf, PM_DEVICE(dip), comp, level)) in pm_power_has_changed()
3009 comp, level, 1)); in pm_power_has_changed()
3013 (!PM_ISBC(dip) || comp == 0) && in pm_power_has_changed()
3016 ret = pm_phc_impl(dip, comp, level, 1); in pm_power_has_changed()
3019 comp == 0) && level == 0 && in pm_power_has_changed()
3034 (!PM_ISBC(dip) || comp == 0) && POWERING_ON(old_level, level)) in pm_power_has_changed()
3036 ret = pm_phc_impl(dip, comp, level, 1); in pm_power_has_changed()
3038 if ((!PM_ISBC(dip) || comp == 0) && level == 0 && in pm_power_has_changed()
3088 pm_phc_impl(dev_info_t *dip, int comp, int level, int notify) in pm_phc_impl() argument
3103 cp = PM_CP(dip, comp); in pm_phc_impl()
3111 "level=%d\n", pmf, PM_DEVICE(dip), comp, level)) in pm_phc_impl()
3120 power_req.req.ppm_notify_level_req.cmpt = comp; in pm_phc_impl()
3131 incr = calc_cfb_comps_incr(dip, comp, old_level, level); in pm_phc_impl()
3137 comp, old_level, level, pm_cfb_comps_off)) in pm_phc_impl()
3140 e_pm_set_cur_pwr(dip, PM_CP(dip, comp), level); in pm_phc_impl()
3145 pm_notify_parent(dip, pdip, comp, old_level, level); in pm_phc_impl()
3146 (void) pm_check_and_resume(dip, comp, old_level, level); in pm_phc_impl()
3175 if (comp == i) in pm_phc_impl()
3197 pm_enqueue_notify(PSC_HAS_CHANGED, dip, comp, level, old_level, in pm_phc_impl()
3591 pm_get_normal_power(dev_info_t *dip, int comp) in pm_get_normal_power() argument
3594 if (comp >= 0 && comp < PM_NUMCMPTS(dip)) { in pm_get_normal_power()
3595 return (PM_CP(dip, comp)->pmc_norm_pwr); in pm_get_normal_power()
3604 pm_get_current_power(dev_info_t *dip, int comp, int *levelp) in pm_get_current_power() argument
3606 if (comp >= 0 && comp < PM_NUMCMPTS(dip)) { in pm_get_current_power()
3607 *levelp = PM_CURPOWER(dip, comp); in pm_get_current_power()
3617 cur_threshold(dev_info_t *dip, int comp) in cur_threshold() argument
3619 pm_component_t *cp = PM_CP(dip, comp); in cur_threshold()
3667 pm_update_maxpower(dev_info_t *dip, int comp, int level) in pm_update_maxpower() argument
3673 if (!e_pm_valid_info(dip, NULL) || !e_pm_valid_comp(dip, comp, NULL) || in pm_update_maxpower()
3674 !e_pm_valid_power(dip, comp, level)) { in pm_update_maxpower()
3676 "comp=%d level=%d\n", pmf, PM_DEVICE(dip), comp, level)) in pm_update_maxpower()
3679 old = e_pm_get_max_power(dip, comp); in pm_update_maxpower()
3680 e_pm_set_max_power(dip, comp, level); in pm_update_maxpower()
3682 if (pm_set_power(dip, comp, level, PM_LEVEL_DOWNONLY, in pm_update_maxpower()
3684 e_pm_set_max_power(dip, comp, old); in pm_update_maxpower()
3854 pm_comp_t *comp; member
4115 compp = p->comp = kmem_zalloc(sizeof (pm_comp_t), in pm_autoconfig()
4170 if (p->comp->pmc_numlevels < 2) { in pm_autoconfig()
4173 p->comp->pmc_name, PM_DEVICE(dip), in pm_autoconfig()
4174 p->comp->pmc_numlevels)) in pm_autoconfig()
4177 for (j = 0; j < p->comp->pmc_numlevels; j++) { in pm_autoconfig()
4178 if ((p->comp->pmc_lvals[j] < 0) || ((j > 0) && in pm_autoconfig()
4179 (p->comp->pmc_lvals[j] <= in pm_autoconfig()
4180 p->comp->pmc_lvals[j - 1]))) { in pm_autoconfig()
4183 p->comp->pmc_name, PM_DEVICE(dip), in pm_autoconfig()
4184 p->comp->pmc_lvals[j], in pm_autoconfig()
4185 p->comp->pmc_lvals[j - 1])) in pm_autoconfig()
4189 ret[i] = *p->comp; /* struct assignment */ in pm_autoconfig()
4204 kmem_free(ptail->comp, sizeof (*ptail->comp)); in pm_autoconfig()
4236 pp = p->comp; in pm_autoconfig()
4276 int level, comp; /* loop counters */ in pm_set_device_threshold() local
4297 for (comp = 0; comp < ncomp; comp++) { in pm_set_device_threshold()
4298 pmc = &PM_CP(dip, comp)->pmc_comp; in pm_set_device_threshold()
4360 for (comp = 0; comp < ncomp; comp++) { in pm_set_device_threshold()
4361 pmc = &PM_CP(dip, comp)->pmc_comp; in pm_set_device_threshold()
4368 for (comp = 0; comp < ncomp; comp++) { in pm_set_device_threshold()
4369 pmc = &PM_CP(dip, comp)->pmc_comp; in pm_set_device_threshold()
4376 for (comp = 0; comp < ncomp; comp++) { in pm_set_device_threshold()
4377 pmc = &PM_CP(dip, comp)->pmc_comp; in pm_set_device_threshold()
4381 comp, level, pmc->pmc_thresh[level])) in pm_set_device_threshold()
4396 comp = 0; in pm_set_device_threshold()
4397 while (remainder && (comp < ncomp)) { in pm_set_device_threshold()
4398 pmc = &PM_CP(dip, comp)->pmc_comp; in pm_set_device_threshold()
4403 comp++; in pm_set_device_threshold()
4408 for (comp = 0; comp < ncomp; comp++) { in pm_set_device_threshold()
4409 pmc = &PM_CP(dip, comp)->pmc_comp; in pm_set_device_threshold()
4413 comp, level, pmc->pmc_thresh[level])) in pm_set_device_threshold()
4677 pm_set_normal_power(dev_info_t *dip, int comp, int level) in pm_set_normal_power() argument
4688 "level=%d\n", pmf, PM_DEVICE(dip), comp, level)) in pm_set_normal_power()
4689 e_pm_set_max_power(dip, comp, level); in pm_set_normal_power()
4690 e_pm_default_levels(dip, PM_CP(dip, comp), level); in pm_set_normal_power()
5497 pm_valid_power(dev_info_t *dip, int comp, int level) in pm_valid_power() argument
5501 if (comp >= 0 && comp < PM_NUMCMPTS(dip) && level >= 0) in pm_valid_power()
5502 return (e_pm_valid_power(dip, comp, level)); in pm_valid_power()
5505 pmf, comp, PM_NUMCMPTS(dip), level)) in pm_valid_power()
5517 pm_block(dev_info_t *dip, int comp, int newpower, int oldpower) in pm_block() argument
5527 new->pr_comp = comp; in pm_block()
5533 pm_enqueue_notify(PSC_PENDING_CHANGE, dip, comp, newpower, oldpower, in pm_block()
5859 pm_current_threshold(dev_info_t *dip, int comp, int *threshp) in pm_current_threshold() argument
5861 if (comp < 0 || comp >= PM_NUMCMPTS(dip)) { in pm_current_threshold()
5864 *threshp = cur_threshold(dip, comp); in pm_current_threshold()
7222 int comp = strcmp(path, ip->ni_path); in pm_record_invol_path() local
7223 if (comp < 0) { in pm_record_invol_path()
7239 } else if (comp == 0) { in pm_record_invol_path()
8650 int comp = bpc->bpc_comp; in pm_busop_set_power() local
8663 pm_component_t *cp = PM_CP(dip, comp); in pm_busop_set_power()
8705 if (PM_ISBC(dip) && comp != 0 && nlevel != 0 && in pm_busop_set_power()
8733 clevel = PM_CURPOWER(dip, comp); in pm_busop_set_power()
8740 if (nlevel > pm_get_normal_power(dip, comp)) { in pm_busop_set_power()
8748 "dir=%s\n", pmf, PM_DEVICE(dip), comp, bpc->bpc_olevel, nlevel, in pm_busop_set_power()
8795 thresh = cur_threshold(dip, comp); in pm_busop_set_power()
8826 calc_cfb_comps_incr(dip, comp, clevel, nlevel)) > 0) { in pm_busop_set_power()
8835 pmf, PM_DEVICE(dip), comp, clevel, nlevel, in pm_busop_set_power()
8840 comp, nlevel, clevel, canblock, &devl)) == DDI_SUCCESS) { in pm_busop_set_power()
8845 if (PM_CURPOWER(dip, comp) == 0) { in pm_busop_set_power()
8868 comp, clevel, nlevel, pm_cfb_comps_off)) in pm_busop_set_power()
8873 dodeps = (comp == 0); in pm_busop_set_power()
8889 dodeps = (comp == 0); in pm_busop_set_power()
8894 if (i == comp) in pm_busop_set_power()
8914 if ((PM_CURPOWER(dip, comp) == nlevel) && pm_watchers()) { in pm_busop_set_power()
8921 pm_enqueue_notify(PSC_HAS_CHANGED, dip, comp, nlevel, in pm_busop_set_power()
8947 comp, clevel, nlevel, pm_cfb_comps_off)) in pm_busop_set_power()
8985 (!PM_ISBC(dip) || comp == 0))) in pm_busop_set_power()
8992 nlevel == 0 && (!PM_ISBC(dip) || comp == 0)) in pm_busop_set_power()
9013 int comp = bpc->bpc_comp; in pm_busop_match_request() local
9021 clevel = PM_CURPOWER(dip, comp); in pm_busop_match_request()
9023 pmf, PM_DEVICE(dip), comp, nlevel, clevel)) in pm_busop_match_request()
9048 switch (pm_block(dip, comp, nlevel, clevel)) { in pm_busop_match_request()