hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/devfreq/governor.h
....@@ -1,12 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * governor.h - internal header for devfreq governors.
34 *
45 * Copyright (C) 2011 Samsung Electronics
56 * MyungJoo Ham <myungjoo.ham@samsung.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 *
118 * This header is for devfreq governors in drivers/devfreq/
129 */
....@@ -21,7 +18,7 @@
2118 /* Devfreq events */
2219 #define DEVFREQ_GOV_START 0x1
2320 #define DEVFREQ_GOV_STOP 0x2
24
-#define DEVFREQ_GOV_INTERVAL 0x3
21
+#define DEVFREQ_GOV_UPDATE_INTERVAL 0x3
2522 #define DEVFREQ_GOV_SUSPEND 0x4
2623 #define DEVFREQ_GOV_RESUME 0x5
2724
....@@ -33,7 +30,9 @@
3330 * @node: list node - contains registered devfreq governors
3431 * @name: Governor's name
3532 * @immutable: Immutable flag for governor. If the value is 1,
36
- * this govenror is never changeable to other governor.
33
+ * this governor is never changeable to other governor.
34
+ * @interrupt_driven: Devfreq core won't schedule polling work for this
35
+ * governor if value is set to 1.
3736 * @get_target_freq: Returns desired operating frequency for the device.
3837 * Basically, get_target_freq will run
3938 * devfreq_dev_profile.get_dev_status() to get the
....@@ -52,25 +51,22 @@
5251
5352 const char name[DEVFREQ_NAME_LEN];
5453 const unsigned int immutable;
54
+ const unsigned int interrupt_driven;
5555 int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
5656 int (*event_handler)(struct devfreq *devfreq,
5757 unsigned int event, void *data);
5858 };
5959
60
-/* Caution: devfreq->lock must be locked before calling update_devfreq */
61
-extern int update_devfreq(struct devfreq *devfreq);
60
+void devfreq_monitor_start(struct devfreq *devfreq);
61
+void devfreq_monitor_stop(struct devfreq *devfreq);
62
+void devfreq_monitor_suspend(struct devfreq *devfreq);
63
+void devfreq_monitor_resume(struct devfreq *devfreq);
64
+void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay);
6265
63
-extern void devfreq_monitor_start(struct devfreq *devfreq);
64
-extern void devfreq_monitor_stop(struct devfreq *devfreq);
65
-extern void devfreq_monitor_suspend(struct devfreq *devfreq);
66
-extern void devfreq_monitor_resume(struct devfreq *devfreq);
67
-extern void devfreq_interval_update(struct devfreq *devfreq,
68
- unsigned int *delay);
66
+int devfreq_add_governor(struct devfreq_governor *governor);
67
+int devfreq_remove_governor(struct devfreq_governor *governor);
6968
70
-extern int devfreq_add_governor(struct devfreq_governor *governor);
71
-extern int devfreq_remove_governor(struct devfreq_governor *governor);
72
-
73
-extern int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);
69
+int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);
7470
7571 static inline int devfreq_update_stats(struct devfreq *df)
7672 {