/** * struct ti_sci_genpd_provider: holds common TI SCI genpd provider data * @ti_sci: handle to TI SCI protocol driver that provides ops to * communicate with system control processor. * @dev: pointer to dev for the driver for devm allocs * @pd_list: list of all the power domains on the device * @data: onecell data for genpd core
*/ struct ti_sci_genpd_provider { conststruct ti_sci_handle *ti_sci; struct device *dev; struct list_head pd_list; struct genpd_onecell_data data;
};
/** * struct ti_sci_pm_domain: TI specific data needed for power domain * @idx: index of the device that identifies it with the system * control processor. * @exclusive: Permissions for exclusive request or shared request of the * device. * @pd: generic_pm_domain for use with the genpd framework * @node: link for the genpd list * @parent: link to the parent TI SCI genpd provider
*/ struct ti_sci_pm_domain { int idx;
u8 exclusive; struct generic_pm_domain pd; struct list_head node; struct ti_sci_genpd_provider *parent;
};
if (device_may_wakeup(dev)) { /* * If device can wakeup using IO daisy chain wakeups, * we do not want to set a constraint.
*/ if (dev->power.wakeirq) {
dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__); return;
}
ret = ti_sci->ops.pm_ops.set_device_constraint(ti_sci, pd->idx,
TISCI_MSG_CONSTRAINT_SET); if (!ret)
dev_dbg(dev, "ti_sci_pd: ID:%d set device constraint.\n", pd->idx);
}
}
/* * ti_sci_pd_power_off(): genpd power down hook * @domain: pointer to the powerdomain to power off
*/ staticint ti_sci_pd_power_off(struct generic_pm_domain *domain)
{ struct ti_sci_pm_domain *pd = genpd_to_ti_sci_pd(domain); conststruct ti_sci_handle *ti_sci = pd->parent->ti_sci;
/* * ti_sci_pd_power_on(): genpd power up hook * @domain: pointer to the powerdomain to power on
*/ staticint ti_sci_pd_power_on(struct generic_pm_domain *domain)
{ struct ti_sci_pm_domain *pd = genpd_to_ti_sci_pd(domain); conststruct ti_sci_handle *ti_sci = pd->parent->ti_sci;
if (pd->exclusive) return ti_sci->ops.dev_ops.get_device_exclusive(ti_sci,
pd->idx); else return ti_sci->ops.dev_ops.get_device(ti_sci, pd->idx);
}
/* * ti_sci_pd_xlate(): translation service for TI SCI genpds * @genpdspec: DT identification data for the genpd * @data: genpd core data for all the powerdomains on the device
*/ staticstruct generic_pm_domain *ti_sci_pd_xlate( conststruct of_phandle_args *genpdspec, void *data)
{ struct genpd_onecell_data *genpd_data = data; unsignedint idx = genpdspec->args[0];
if (genpdspec->args_count != 1 && genpdspec->args_count != 2) return ERR_PTR(-EINVAL);
if (idx >= genpd_data->num_domains) {
pr_err("%s: invalid domain index %u\n", __func__, idx); return ERR_PTR(-EINVAL);
}
if (!genpd_data->domains[idx]) return ERR_PTR(-ENOENT);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.