1 /* SPDX-License-Identifier: GPL-2.0 */
4 #ifndef __LIMA_DEVFREQ_H__
5 #define __LIMA_DEVFREQ_H__
7 #include <linux/spinlock.h>
8 #include <linux/ktime.h>
11 struct thermal_cooling_device;
16 struct devfreq *devfreq;
17 struct thermal_cooling_device *cooling;
21 ktime_t time_last_update;
24 * Protect busy_time, idle_time, time_last_update and busy_count
25 * because these can be updated concurrently, for example by the GP
31 int lima_devfreq_init(struct lima_device *ldev);
32 void lima_devfreq_fini(struct lima_device *ldev);
34 void lima_devfreq_record_busy(struct lima_devfreq *devfreq);
35 void lima_devfreq_record_idle(struct lima_devfreq *devfreq);
37 int lima_devfreq_resume(struct lima_devfreq *devfreq);
38 int lima_devfreq_suspend(struct lima_devfreq *devfreq);