static ssize_t soidle_state_store(struct kobject *kobj,
                struct kobj_attribute *attr, const char *buf, size_t n)
{
    char cmd[32];
    int param;

    if (sscanf(buf, "%s %d", cmd, &param) == 2) {
        if (!strcmp(cmd, "soidle")) {
            idle_switch[IDLE_TYPE_SO] = param;
        } else if (!strcmp(cmd, "enable")) {
            enable_soidle_by_bit(param);
        } else if (!strcmp(cmd, "disable")) {
            disable_soidle_by_bit(param);
        } else if (!strcmp(cmd, "time")) {
            soidle_time_critera = param;
        } else if (!strcmp(cmd, "bypass")) {
            soidle_by_pass_cg = param;
        }
        return n;
    } else if (sscanf(buf, "%d", &param) == 1) {
        idle_switch[IDLE_TYPE_SO] = param;
        return n;
    }

    return -EINVAL;
}
示例#2
0
void AudDrv_Emi_Clk_On(void)
{
    mutex_lock(&auddrv_pmic_mutex);
    if(Aud_EMI_cntr == 0)
    {
        disable_dpidle_by_bit(MT_CG_AUDIO_AFE);
        disable_soidle_by_bit(MT_CG_AUDIO_AFE);
    }
    Aud_EMI_cntr++;
    mutex_unlock(&auddrv_pmic_mutex);
}
void AudDrv_Emi_Clk_On(void)
{
    mutex_lock(&auddrv_pmic_mutex);
    if(Aud_EMI_cntr == 0)
    {
#ifndef CONFIG_FPGA_EARLY_PORTING //george early porting disable
        disable_dpidle_by_bit(MT_CG_AUDIO_AFE);
        disable_soidle_by_bit(MT_CG_AUDIO_AFE);
#endif
    }
    Aud_EMI_cntr++;
    mutex_unlock(&auddrv_pmic_mutex);
}