Lines Matching refs:opp

18 #include "opp.h"
31 void opp_debug_remove_one(struct dev_pm_opp *opp)
33 debugfs_remove_recursive(opp->dentry);
56 static void opp_debug_create_bw(struct dev_pm_opp *opp,
73 &opp->bandwidth[i].peak);
75 &opp->bandwidth[i].avg);
79 static void opp_debug_create_clks(struct dev_pm_opp *opp,
87 debugfs_create_ulong("rate_hz", S_IRUGO, pdentry, &opp->rates[0]);
93 debugfs_create_ulong(name, S_IRUGO, pdentry, &opp->rates[i]);
97 static void opp_debug_create_supplies(struct dev_pm_opp *opp,
109 /* Create per-opp directory */
113 &opp->supplies[i].u_volt);
116 &opp->supplies[i].u_volt_min);
119 &opp->supplies[i].u_volt_max);
122 &opp->supplies[i].u_amp);
125 &opp->supplies[i].u_watt);
129 void opp_debug_create_one(struct dev_pm_opp *opp, struct opp_table *opp_table)
134 char name[25]; /* 20 chars for 64 bit value + 5 (opp:\0) */
139 * - Normally rate is unique to each OPP, use it to get unique opp-name.
143 if (likely(opp_table->clk_count == 1 && opp->rates[0]))
144 id = opp->rates[0];
148 snprintf(name, sizeof(name), "opp:%lu", id);
150 /* Create per-opp directory */
153 debugfs_create_bool("available", S_IRUGO, d, &opp->available);
154 debugfs_create_bool("dynamic", S_IRUGO, d, &opp->dynamic);
155 debugfs_create_bool("turbo", S_IRUGO, d, &opp->turbo);
156 debugfs_create_bool("suspend", S_IRUGO, d, &opp->suspend);
157 debugfs_create_u32("level", S_IRUGO, d, &opp->level);
159 &opp->clock_latency_ns);
161 opp->of_name = of_node_full_name(opp->np);
162 debugfs_create_str("of_name", S_IRUGO, d, (char **)&opp->of_name);
164 opp_debug_create_clks(opp, opp_table, d);
165 opp_debug_create_supplies(opp, opp_table, d);
166 opp_debug_create_bw(opp, opp_table, d);
168 opp->dentry = d;
199 * opp_debug_register - add a device opp node to the debugfs 'opp' directory
200 * @opp_dev: opp-dev pointer for device
201 * @opp_table: the device-opp being added
203 * Dynamically adds device specific directory in debugfs 'opp' directory. If the
204 * device-opp is shared with other devices, then links will be created for all
222 /* Look for next opp-dev */
250 * opp_debug_unregister - remove a device opp node from debugfs opp directory
251 * @opp_dev: opp-dev pointer for device
252 * @opp_table: the device-opp being removed
254 * Dynamically removes device specific directory from debugfs 'opp' directory.
276 /* Create /sys/kernel/debug/opp directory */
277 rootdir = debugfs_create_dir("opp", NULL);