3
À<×eŽ ã @ sX d dl mZ d dlT ddlZddlZddlZddlmZ ej j
ƒ ZG dd„ dejƒZ
dS )é )Úbase)Ú*é N)ÚACPI_DIRc sv e Zd ZdZ‡ fdd„Zedd„ ƒZdd„ Zdd „ Zed
d„ ƒZ edd
„ ƒZ
edƒdd„ ƒZe
dƒddd„ƒZ‡ ZS )Ú
ACPIPlugina>
`acpi`::
Configures the ACPI driver.
+
The only currently supported option is
[option]`platform_profile`, which sets the ACPI
platform profile sysfs attribute,
a generic power/performance preference API for other drivers.
Multiple profiles can be specified, separated by `|`.
The first available profile is selected.
+
--
.Selecting a platform profile
====
----
[acpi]
platform_profile=balanced|low-power
----
Using this option, *TuneD* will try to set the platform profile
to `balanced`. If that fails, it will try to set it to `low-power`.
====
--
c s t t| ƒj||Ž d S )N)Úsuperr Ú__init__)ÚselfÚargsÚkwargs)Ú __class__© ú!/usr/lib/python3.6/plugin_acpi.pyr $ s zACPIPlugin.__init__c C s dd iS )NÚplatform_profiler
)Úclsr
r
r Ú_get_config_options' s zACPIPlugin._get_config_optionsc C s d|_ d|_d S )NTF)Z_has_static_tuningZ_has_dynamic_tuning)r Úinstancer
r
r Ú_instance_init+ s zACPIPlugin._instance_initc C s d S )Nr
)r r r
r
r Ú_instance_cleanup/ s zACPIPlugin._instance_cleanupc C s t jjtdƒS )NZplatform_profile_choices)ÚosÚpathÚjoinr )r r
r
r Ú_platform_profile_choices_path2 s z)ACPIPlugin._platform_profile_choices_pathc C s t jjtdƒS )Nr )r r r r )r r
r
r Ú_platform_profile_path6 s z!ACPIPlugin._platform_profile_pathr c C s´ t jj| jƒ ƒstjdƒ d S dd„ |jdƒD ƒ}t| jj | j
ƒ ƒjƒ ƒ}xZ|D ]R}||kr”|s�tjd| ƒ | jj| jƒ ||rˆt
jgndd� |S tjd| ƒ qPW tjd ƒ d S )
Nz5ACPI platform_profile is not supported on this systemc S s g | ]}|j ƒ ‘qS r
)Ústrip)Ú.0Úprofiler
r
r ú