Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commitee43730

Browse files
committed
Merge branches 'pm-opp', 'pm-devfreq', 'pm-avs' and 'pm-tools'
* pm-opp: OPP: Introduce "required-opp" property OPP: Allow OPP table to be used for power-domains* pm-devfreq: PM / devfreq: Fix potential NULL pointer dereference in governor_store PM / devfreq: Propagate error from devfreq_add_device()* pm-avs: PM / AVS: rockchip-io: account for const type of of_device_id.data* pm-tools: tools/power/x86/intel_pstate_tracer: Free the trace buffer memory cpupower: Remove FSF address
5 parentsbcaea46 +b68bf11 +18065be +5a2772a +fbe3138 commitee43730

File tree

6 files changed

+108
-18
lines changed

6 files changed

+108
-18
lines changed

‎Documentation/devicetree/bindings/opp/opp.txt‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ Devices supporting OPPs must set their "operating-points-v2" property with
4545
phandle to a OPP table in their DT node. The OPP core will use this phandle to
4646
find the operating points for the device.
4747

48+
This can contain more than one phandle for power domain providers that provide
49+
multiple power domains. That is, one phandle for each power domain. If only one
50+
phandle is available, then the same OPP table will be used for all power domains
51+
provided by the power domain provider.
52+
4853
If required, this can be extended for SoC vendor specific bindings. Such bindings
4954
should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt
5055
and should have a compatible description like: "operating-points-v2-<vendor>".
@@ -154,6 +159,14 @@ Optional properties:
154159

155160
- status: Marks the node enabled/disabled.
156161

162+
- required-opp: This contains phandle to an OPP node in another device's OPP
163+
table. It may contain an array of phandles, where each phandle points to an
164+
OPP of a different device. It should not contain multiple phandles to the OPP
165+
nodes in the same OPP table. This specifies the minimum required OPP of the
166+
device(s), whose OPP's phandle is present in this property, for the
167+
functioning of the current device at the current OPP (where this property is
168+
present).
169+
157170
Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
158171

159172
/ {

‎Documentation/devicetree/bindings/power/power_domain.txt‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ Optional properties:
4040
domain's idle states. In the absence of this property, the domain would be
4141
considered as capable of being powered-on or powered-off.
4242

43+
- operating-points-v2 : Phandles to the OPP tables of power domains provided by
44+
a power domain provider. If the provider provides a single power domain only
45+
or all the power domains provided by the provider have identical OPP tables,
46+
then this shall contain a single phandle. Refer to ../opp/opp.txt for more
47+
information.
48+
4349
Example:
4450

4551
power: power-controller@12340000 {
@@ -120,4 +126,63 @@ The node above defines a typical PM domain consumer device, which is located
120126
inside a PM domain with index 0 of a power controller represented by a node
121127
with the label "power".
122128

129+
Optional properties:
130+
- required-opp: This contains phandle to an OPP node in another device's OPP
131+
table. It may contain an array of phandles, where each phandle points to an
132+
OPP of a different device. It should not contain multiple phandles to the OPP
133+
nodes in the same OPP table. This specifies the minimum required OPP of the
134+
device(s), whose OPP's phandle is present in this property, for the
135+
functioning of the current device at the current OPP (where this property is
136+
present).
137+
138+
Example:
139+
- OPP table for domain provider that provides two domains.
140+
141+
domain0_opp_table: opp-table0 {
142+
compatible = "operating-points-v2";
143+
144+
domain0_opp_0: opp-1000000000 {
145+
opp-hz = /bits/ 64 <1000000000>;
146+
opp-microvolt = <975000 970000 985000>;
147+
};
148+
domain0_opp_1: opp-1100000000 {
149+
opp-hz = /bits/ 64 <1100000000>;
150+
opp-microvolt = <1000000 980000 1010000>;
151+
};
152+
};
153+
154+
domain1_opp_table: opp-table1 {
155+
compatible = "operating-points-v2";
156+
157+
domain1_opp_0: opp-1200000000 {
158+
opp-hz = /bits/ 64 <1200000000>;
159+
opp-microvolt = <975000 970000 985000>;
160+
};
161+
domain1_opp_1: opp-1300000000 {
162+
opp-hz = /bits/ 64 <1300000000>;
163+
opp-microvolt = <1000000 980000 1010000>;
164+
};
165+
};
166+
167+
power: power-controller@12340000 {
168+
compatible = "foo,power-controller";
169+
reg = <0x12340000 0x1000>;
170+
#power-domain-cells = <1>;
171+
operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
172+
};
173+
174+
leaky-device0@12350000 {
175+
compatible = "foo,i-leak-current";
176+
reg = <0x12350000 0x1000>;
177+
power-domains = <&power 0>;
178+
required-opp = <&domain0_opp_0>;
179+
};
180+
181+
leaky-device1@12350000 {
182+
compatible = "foo,i-leak-current";
183+
reg = <0x12350000 0x1000>;
184+
power-domains = <&power 1>;
185+
required-opp = <&domain1_opp_1>;
186+
};
187+
123188
[1]. Documentation/devicetree/bindings/power/domain-idle-state.txt

‎drivers/devfreq/devfreq.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ struct devfreq *devm_devfreq_add_device(struct device *dev,
737737
devfreq=devfreq_add_device(dev,profile,governor_name,data);
738738
if (IS_ERR(devfreq)) {
739739
devres_free(ptr);
740-
returnERR_PTR(-ENOMEM);
740+
returndevfreq;
741741
}
742742

743743
*ptr=devfreq;
@@ -996,7 +996,8 @@ static ssize_t governor_store(struct device *dev, struct device_attribute *attr,
996996
if (df->governor==governor) {
997997
ret=0;
998998
gotoout;
999-
}elseif (df->governor->immutable||governor->immutable) {
999+
}elseif ((df->governor&&df->governor->immutable)||
1000+
governor->immutable) {
10001001
ret=-EINVAL;
10011002
gotoout;
10021003
}

‎drivers/power/avs/rockchip-io-domain.c‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct rockchip_iodomain_supply {
7676
structrockchip_iodomain {
7777
structdevice*dev;
7878
structregmap*grf;
79-
structrockchip_iodomain_soc_data*soc_data;
79+
conststructrockchip_iodomain_soc_data*soc_data;
8080
structrockchip_iodomain_supplysupplies[MAX_SUPPLIES];
8181
};
8282

@@ -382,43 +382,43 @@ static const struct rockchip_iodomain_soc_data soc_data_rv1108_pmu = {
382382
staticconststructof_device_idrockchip_iodomain_match[]= {
383383
{
384384
.compatible="rockchip,rk3188-io-voltage-domain",
385-
.data=(void*)&soc_data_rk3188
385+
.data=&soc_data_rk3188
386386
},
387387
{
388388
.compatible="rockchip,rk3228-io-voltage-domain",
389-
.data=(void*)&soc_data_rk3228
389+
.data=&soc_data_rk3228
390390
},
391391
{
392392
.compatible="rockchip,rk3288-io-voltage-domain",
393-
.data=(void*)&soc_data_rk3288
393+
.data=&soc_data_rk3288
394394
},
395395
{
396396
.compatible="rockchip,rk3328-io-voltage-domain",
397-
.data=(void*)&soc_data_rk3328
397+
.data=&soc_data_rk3328
398398
},
399399
{
400400
.compatible="rockchip,rk3368-io-voltage-domain",
401-
.data=(void*)&soc_data_rk3368
401+
.data=&soc_data_rk3368
402402
},
403403
{
404404
.compatible="rockchip,rk3368-pmu-io-voltage-domain",
405-
.data=(void*)&soc_data_rk3368_pmu
405+
.data=&soc_data_rk3368_pmu
406406
},
407407
{
408408
.compatible="rockchip,rk3399-io-voltage-domain",
409-
.data=(void*)&soc_data_rk3399
409+
.data=&soc_data_rk3399
410410
},
411411
{
412412
.compatible="rockchip,rk3399-pmu-io-voltage-domain",
413-
.data=(void*)&soc_data_rk3399_pmu
413+
.data=&soc_data_rk3399_pmu
414414
},
415415
{
416416
.compatible="rockchip,rv1108-io-voltage-domain",
417-
.data=(void*)&soc_data_rv1108
417+
.data=&soc_data_rv1108
418418
},
419419
{
420420
.compatible="rockchip,rv1108-pmu-io-voltage-domain",
421-
.data=(void*)&soc_data_rv1108_pmu
421+
.data=&soc_data_rv1108_pmu
422422
},
423423
{/* sentinel */ },
424424
};
@@ -443,7 +443,7 @@ static int rockchip_iodomain_probe(struct platform_device *pdev)
443443
platform_set_drvdata(pdev,iod);
444444

445445
match=of_match_node(rockchip_iodomain_match,np);
446-
iod->soc_data=(structrockchip_iodomain_soc_data*)match->data;
446+
iod->soc_data=match->data;
447447

448448
parent=pdev->dev.parent;
449449
if (parent&&parent->of_node) {

‎tools/power/cpupower/lib/cpufreq.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
* GNU General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU General Public License
16-
* along with this program; if not, write to the Free Software
17-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1814
*/
1915

2016
#ifndef__CPUPOWER_CPUFREQ_H__

‎tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,16 @@ def set_trace_buffer_size():
411411
print('IO error setting trace buffer size ')
412412
quit()
413413

414+
deffree_trace_buffer():
415+
""" Free the trace buffer memory """
416+
417+
try:
418+
open('/sys/kernel/debug/tracing/buffer_size_kb'
419+
,'w').write("1")
420+
except:
421+
print('IO error setting trace buffer size ')
422+
quit()
423+
414424
defread_trace_data(filename):
415425
""" Read and parse trace data """
416426

@@ -583,4 +593,9 @@ def read_trace_data(filename):
583593
forfinfiles:
584594
fix_ownership(f)
585595

596+
clear_trace_file()
597+
# Free the memory
598+
ifinterval:
599+
free_trace_buffer()
600+
586601
os.chdir('../../')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp