/* * Get directory name for OPP. * * - Normally rate is unique to each OPP, use it to get unique opp-name. * - For some devices rate isn't available or there are multiple, use * index instead for them.
*/ if (likely(opp_table->clk_count == 1 && opp->rates[0]))
id = opp->rates[0]; else
id = _get_opp_count(opp_table);
snprintf(name, sizeof(name), "opp:%lu", id);
/* Create per-opp directory */
d = debugfs_create_dir(name, pdentry);
/* Create device specific directory link */
opp_dev->dentry = debugfs_create_symlink(name, rootdir,
opp_table->dentry_name);
}
/** * opp_debug_register - add a device opp node to the debugfs 'opp' directory * @opp_dev: opp-dev pointer for device * @opp_table: the device-opp being added * * Dynamically adds device specific directory in debugfs 'opp' directory. If the * device-opp is shared with other devices, then links will be created for all * devices except the first.
*/ void opp_debug_register(struct opp_device *opp_dev, struct opp_table *opp_table)
{ if (opp_table->dentry)
opp_list_debug_create_link(opp_dev, opp_table); else
opp_list_debug_create_dir(opp_dev, opp_table);
}
/** * opp_debug_unregister - remove a device opp node from debugfs opp directory * @opp_dev: opp-dev pointer for device * @opp_table: the device-opp being removed * * Dynamically removes device specific directory from debugfs 'opp' directory.
*/ void opp_debug_unregister(struct opp_device *opp_dev, struct opp_table *opp_table)
{ if (opp_dev->dentry == opp_table->dentry) { /* Move the real dentry object under another device */ if (!list_is_singular(&opp_table->dev_list)) {
opp_migrate_dentry(opp_dev, opp_table); goto out;
}
opp_table->dentry = NULL;
}
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.