Lines Matching refs:dytc

133 	struct ideapad_dytc_priv *dytc;  member
139 bool dytc : 1; member
748 struct ideapad_dytc_priv *dytc = container_of(pprof, struct ideapad_dytc_priv, pprof); in dytc_profile_get() local
750 *profile = dytc->current_profile; in dytc_profile_get()
801 struct ideapad_dytc_priv *dytc = container_of(pprof, struct ideapad_dytc_priv, pprof); in dytc_profile_set() local
802 struct ideapad_private *priv = dytc->priv; in dytc_profile_set()
806 err = mutex_lock_interruptible(&dytc->mutex); in dytc_profile_set()
830 dytc->current_profile = profile; in dytc_profile_set()
833 mutex_unlock(&dytc->mutex); in dytc_profile_set()
844 mutex_lock(&priv->dytc->mutex); in dytc_profile_refresh()
846 mutex_unlock(&priv->dytc->mutex); in dytc_profile_refresh()
855 if (profile != priv->dytc->current_profile) { in dytc_profile_refresh()
856 priv->dytc->current_profile = profile; in dytc_profile_refresh()
884 if (!priv->features.dytc) in ideapad_dytc_profile_init()
912 priv->dytc = kzalloc(sizeof(*priv->dytc), GFP_KERNEL); in ideapad_dytc_profile_init()
913 if (!priv->dytc) in ideapad_dytc_profile_init()
916 mutex_init(&priv->dytc->mutex); in ideapad_dytc_profile_init()
918 priv->dytc->priv = priv; in ideapad_dytc_profile_init()
919 priv->dytc->pprof.profile_get = dytc_profile_get; in ideapad_dytc_profile_init()
920 priv->dytc->pprof.profile_set = dytc_profile_set; in ideapad_dytc_profile_init()
923 set_bit(PLATFORM_PROFILE_LOW_POWER, priv->dytc->pprof.choices); in ideapad_dytc_profile_init()
924 set_bit(PLATFORM_PROFILE_BALANCED, priv->dytc->pprof.choices); in ideapad_dytc_profile_init()
925 set_bit(PLATFORM_PROFILE_PERFORMANCE, priv->dytc->pprof.choices); in ideapad_dytc_profile_init()
928 err = platform_profile_register(&priv->dytc->pprof); in ideapad_dytc_profile_init()
938 mutex_destroy(&priv->dytc->mutex); in ideapad_dytc_profile_init()
939 kfree(priv->dytc); in ideapad_dytc_profile_init()
940 priv->dytc = NULL; in ideapad_dytc_profile_init()
947 if (!priv->dytc) in ideapad_dytc_profile_exit()
951 mutex_destroy(&priv->dytc->mutex); in ideapad_dytc_profile_exit()
952 kfree(priv->dytc); in ideapad_dytc_profile_exit()
954 priv->dytc = NULL; in ideapad_dytc_profile_exit()
1645 priv->features.dytc = true; in ideapad_check_features()
1929 if (priv->dytc) in ideapad_acpi_resume()