devfreq_devbw: Assign labels to devbw nodes.
Helps in using them from user space later. Change-Id: Ic4c33e882d6535eded77a2a7c79c223ec3255924
This commit is contained in:
parent
c7f5e69157
commit
98049851b6
|
@ -18,6 +18,7 @@
|
|||
|
||||
/* Bus governor */
|
||||
gpubw: qcom,gpubw {
|
||||
label = "gpubw";
|
||||
compatible = "qcom,devbw";
|
||||
governor = "bw_vbif";
|
||||
qcom,src-dst-ports = <26 512>;
|
||||
|
|
|
@ -406,6 +406,7 @@
|
|||
};
|
||||
|
||||
cpubw: qcom,cpubw {
|
||||
label = "cpubw";
|
||||
compatible = "qcom,devbw";
|
||||
governor = "cpufreq";
|
||||
qcom,src-dst-ports = <1 512>;
|
||||
|
@ -423,6 +424,7 @@
|
|||
};
|
||||
|
||||
mincpubw: qcom,mincpubw {
|
||||
label = "mincpubw";
|
||||
compatible = "qcom,devbw";
|
||||
governor = "cpufreq";
|
||||
qcom,src-dst-ports = <1 512>;
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
|
||||
/delete-node/ qcom,cpubw;
|
||||
cpubw: qcom,cpubw@0 {
|
||||
label = "cpubw";
|
||||
reg = <0 4>;
|
||||
compatible = "qcom,devbw";
|
||||
governor = "cpufreq";
|
||||
|
|
|
@ -137,7 +137,7 @@ int devfreq_add_devbw(struct device *dev)
|
|||
struct dev_data *d;
|
||||
struct devfreq_dev_profile *p;
|
||||
u32 *data, ports[MAX_PATHS * 2];
|
||||
const char *gov_name;
|
||||
const char *gov_name, *label;
|
||||
int ret, len, i, num_paths;
|
||||
|
||||
d = devm_kzalloc(dev, sizeof(*d), GFP_KERNEL);
|
||||
|
@ -145,6 +145,9 @@ int devfreq_add_devbw(struct device *dev)
|
|||
return -ENOMEM;
|
||||
dev_set_drvdata(dev, d);
|
||||
|
||||
if (of_property_read_string(dev->of_node, "label", &label) == 0)
|
||||
dev_set_name(dev, "%s", label);
|
||||
|
||||
if (of_find_property(dev->of_node, PROP_PORTS, &len)) {
|
||||
len /= sizeof(ports[0]);
|
||||
if (len % 2 || len > ARRAY_SIZE(ports)) {
|
||||
|
|
Loading…
Reference in New Issue