3 *sz1USBPlugin._get_device_objects..r)r Zdevicesr)r r_get_device_objects)szUSBPlugin._get_device_objectscCsddiS)N autosuspendr)r rrr_get_config_options,szUSBPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning)r instancerrr_instance_init2szUSBPlugin._instance_initcCsdS)Nr)r rrrr_instance_cleanup6szUSBPlugin._instance_cleanupcCsd|S)Nz)/sys/bus/usb/devices/%s/power/autosuspendr)r r rrr_autosuspend_sysfile9szUSBPlugin._autosuspend_sysfilerT)Z per_devicecCsR|j|}|dkrdS|rdnd}|sN|j|}|jj|||rFtjgndd|S)N10F)no_error)Z _option_boolrr Z write_to_fileerrnoENOENT)r valuer Zsimremoveenablevalsys_filerrr_set_autosuspend<s    zUSBPlugin._set_autosuspendFcCs|j|}|jj||djS)N)r)rr Z read_filestrip)r r Zignore_missingr$rrr_get_autosuspendIs zUSBPlugin._get_autosuspendN)F)__name__ __module__ __qualname____doc__rr classmethodrrrrZ command_setr%Z command_getr'rrrrr s   r)rZ decoratorsZ tuned.logsZtunedZtuned.utils.commandsrZglobrZlogsgetlogZPluginrrrrrs