Lines Matching refs:opp
17 #include "opp.h"
30 void opp_debug_remove_one(struct dev_pm_opp *opp)
32 debugfs_remove_recursive(opp->dentry);
52 static void opp_debug_create_bw(struct dev_pm_opp *opp, struct opp_table *opp_table, struct dentry *pdentry)
65 debugfs_create_u32("peak_bw", S_IRUGO, d, &opp->bandwidth[i].peak);
66 debugfs_create_u32("avg_bw", S_IRUGO, d, &opp->bandwidth[i].avg);
70 static void opp_debug_create_supplies(struct dev_pm_opp *opp, struct opp_table *opp_table, struct dentry *pdentry)
80 /* Create per-opp directory */
83 debugfs_create_ulong("u_volt_target", S_IRUGO, d, &opp->supplies[i].u_volt);
85 debugfs_create_ulong("u_volt_min", S_IRUGO, d, &opp->supplies[i].u_volt_min);
87 debugfs_create_ulong("u_volt_max", S_IRUGO, d, &opp->supplies[i].u_volt_max);
89 debugfs_create_ulong("u_amp", S_IRUGO, d, &opp->supplies[i].u_amp);
93 void opp_debug_create_one(struct dev_pm_opp *opp, struct opp_table *opp_table)
98 char name[25]; /* 20 chars for 64 bit value + 5 (opp:\0) */
103 * - Normally rate is unique to each OPP, use it to get unique opp-name.
106 if (likely(opp->rate)) {
107 id = opp->rate;
112 ret = snprintf(name, sizeof(name), "opp:%lu", id);
114 /* Create per-opp directory */
117 debugfs_create_bool("available", S_IRUGO, d, &opp->available);
118 debugfs_create_bool("dynamic", S_IRUGO, d, &opp->dynamic);
119 debugfs_create_bool("turbo", S_IRUGO, d, &opp->turbo);
120 debugfs_create_bool("suspend", S_IRUGO, d, &opp->suspend);
121 debugfs_create_u32("performance_state", S_IRUGO, d, &opp->pstate);
122 debugfs_create_ulong("rate_hz", S_IRUGO, d, &opp->rate);
123 debugfs_create_ulong("clock_latency_ns", S_IRUGO, d, &opp->clock_latency_ns);
125 opp_debug_create_supplies(opp, opp_table, d);
126 opp_debug_create_bw(opp, opp_table, d);
128 opp->dentry = d;
156 * opp_debug_register - add a device opp node to the debugfs 'opp' directory
157 * @opp_dev: opp-dev pointer for device
158 * @opp_table: the device-opp being added
160 * Dynamically adds device specific directory in debugfs 'opp' directory. If the
161 * device-opp is shared with other devices, then links will be created for all
179 /* Look for next opp-dev */
199 * opp_debug_unregister - remove a device opp node from debugfs opp directory
200 * @opp_dev: opp-dev pointer for device
201 * @opp_table: the device-opp being removed
203 * Dynamically removes device specific directory from debugfs 'opp' directory.
226 struct dev_pm_opp *opp;
237 list_for_each_entry(opp, &opp_table->opp_list, node)
239 seq_printf(s, "%31lu %12lu %11lu %11lu\n", opp->rate, opp->supplies[0].u_volt, opp->supplies[0].u_volt_min,
240 opp->supplies[0].u_volt_max);
264 /* Create /sys/kernel/debug/opp directory */
265 rootdir = debugfs_create_dir("opp", NULL);