This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 83e4b6065ad drivers/devfreq: add missing governor_data field and
ondemand declaration
83e4b6065ad is described below
commit 83e4b6065add902305896b449272664634ae6ba9
Author: guanyi <[email protected]>
AuthorDate: Tue Aug 11 16:42:03 2026 +0800
drivers/devfreq: add missing governor_data field and ondemand declaration
The ondemand governor (devfreq_ondemand.c) references dev->governor_data
to store its private state, and defines devfreq_ondemand(), but neither
the field in struct devfreq_s nor the function declaration were present
in include/nuttx/devfreq.h. As a result, building with
CONFIG_DEVFREQ_GOV_ONDEMAND=y failed to compile.
These two definitions were originally introduced by a downstream commit
that was not part of the devfreq upstreaming series, so the gap only
surfaced when the ondemand governor is enabled (which additionally
requires !CONFIG_SCHED_CPULOAD_NONE and is off by default).
Add the governor_data field to struct devfreq_s and declare
devfreq_ondemand() alongside the other governors.
Signed-off-by: guanyi <[email protected]>
---
include/nuttx/devfreq.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/nuttx/devfreq.h b/include/nuttx/devfreq.h
index 13c28d1787b..dc1ca051ce0 100644
--- a/include/nuttx/devfreq.h
+++ b/include/nuttx/devfreq.h
@@ -63,6 +63,7 @@ struct devfreq_s
FAR const struct devfreq_driver_s *driver;
FAR const uint32_t *freq_table;
+ FAR void *governor_data;
struct qos_constraints_s constraints;
@@ -353,6 +354,7 @@ void devfreq_procfs_initialize(void);
FAR struct devfreq_governor_s *devfreq_performance(void);
FAR struct devfreq_governor_s *devfreq_powersave(void);
+FAR struct devfreq_governor_s *devfreq_ondemand(void);
#undef EXTERN
#if defined(__cplusplus)