static int tz_handler(struct devfreq *devfreq, unsigned int event, void *data) { int result; BUG_ON(devfreq == NULL); switch (event) { case DEVFREQ_GOV_START: result = tz_start(devfreq); break; case DEVFREQ_GOV_STOP: result = tz_stop(devfreq); break; case DEVFREQ_GOV_SUSPEND: result = tz_suspend(devfreq); break; case DEVFREQ_GOV_RESUME: result = tz_resume(devfreq); break; case DEVFREQ_GOV_INTERVAL: /* ignored, this governor doesn't use polling */ default: result = 0; break; } return result; }
static int tz_handler(struct devfreq *devfreq, unsigned int event, void *data) { int result; struct msm_adreno_extended_profile *gpu_profile = container_of( (devfreq->profile), struct msm_adreno_extended_profile, profile); BUG_ON(devfreq == NULL); switch (event) { case DEVFREQ_GOV_START: result = tz_start(devfreq); break; case DEVFREQ_GOV_STOP: result = tz_stop(devfreq); break; case DEVFREQ_GOV_SUSPEND: result = tz_suspend(devfreq); break; case DEVFREQ_GOV_RESUME: result = tz_resume(devfreq); break; case DEVFREQ_GOV_INTERVAL: /* ignored, this governor doesn't use polling */ default: result = 0; break; } if (partner_gpu_profile && partner_gpu_profile->bus_devfreq) switch (event) { case DEVFREQ_GOV_START: queue_work(gpu_profile->partner_wq, &gpu_profile->partner_start_event_ws); break; case DEVFREQ_GOV_STOP: queue_work(gpu_profile->partner_wq, &gpu_profile->partner_stop_event_ws); break; case DEVFREQ_GOV_SUSPEND: queue_work(gpu_profile->partner_wq, &gpu_profile->partner_suspend_event_ws); break; case DEVFREQ_GOV_RESUME: queue_work(gpu_profile->partner_wq, &gpu_profile->partner_resume_event_ws); break; } return result; }