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 */
|
/* Bus governor */
|
||||||
gpubw: qcom,gpubw {
|
gpubw: qcom,gpubw {
|
||||||
|
label = "gpubw";
|
||||||
compatible = "qcom,devbw";
|
compatible = "qcom,devbw";
|
||||||
governor = "bw_vbif";
|
governor = "bw_vbif";
|
||||||
qcom,src-dst-ports = <26 512>;
|
qcom,src-dst-ports = <26 512>;
|
||||||
|
|
|
@ -406,6 +406,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
cpubw: qcom,cpubw {
|
cpubw: qcom,cpubw {
|
||||||
|
label = "cpubw";
|
||||||
compatible = "qcom,devbw";
|
compatible = "qcom,devbw";
|
||||||
governor = "cpufreq";
|
governor = "cpufreq";
|
||||||
qcom,src-dst-ports = <1 512>;
|
qcom,src-dst-ports = <1 512>;
|
||||||
|
@ -423,6 +424,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
mincpubw: qcom,mincpubw {
|
mincpubw: qcom,mincpubw {
|
||||||
|
label = "mincpubw";
|
||||||
compatible = "qcom,devbw";
|
compatible = "qcom,devbw";
|
||||||
governor = "cpufreq";
|
governor = "cpufreq";
|
||||||
qcom,src-dst-ports = <1 512>;
|
qcom,src-dst-ports = <1 512>;
|
||||||
|
|
|
@ -172,6 +172,7 @@
|
||||||
|
|
||||||
/delete-node/ qcom,cpubw;
|
/delete-node/ qcom,cpubw;
|
||||||
cpubw: qcom,cpubw@0 {
|
cpubw: qcom,cpubw@0 {
|
||||||
|
label = "cpubw";
|
||||||
reg = <0 4>;
|
reg = <0 4>;
|
||||||
compatible = "qcom,devbw";
|
compatible = "qcom,devbw";
|
||||||
governor = "cpufreq";
|
governor = "cpufreq";
|
||||||
|
|
|
@ -137,7 +137,7 @@ int devfreq_add_devbw(struct device *dev)
|
||||||
struct dev_data *d;
|
struct dev_data *d;
|
||||||
struct devfreq_dev_profile *p;
|
struct devfreq_dev_profile *p;
|
||||||
u32 *data, ports[MAX_PATHS * 2];
|
u32 *data, ports[MAX_PATHS * 2];
|
||||||
const char *gov_name;
|
const char *gov_name, *label;
|
||||||
int ret, len, i, num_paths;
|
int ret, len, i, num_paths;
|
||||||
|
|
||||||
d = devm_kzalloc(dev, sizeof(*d), GFP_KERNEL);
|
d = devm_kzalloc(dev, sizeof(*d), GFP_KERNEL);
|
||||||
|
@ -145,6 +145,9 @@ int devfreq_add_devbw(struct device *dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
dev_set_drvdata(dev, d);
|
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)) {
|
if (of_find_property(dev->of_node, PROP_PORTS, &len)) {
|
||||||
len /= sizeof(ports[0]);
|
len /= sizeof(ports[0]);
|
||||||
if (len % 2 || len > ARRAY_SIZE(ports)) {
|
if (len % 2 || len > ARRAY_SIZE(ports)) {
|
||||||
|
|
Loading…
Reference in New Issue