Skip to content

Commit f629f1e

Browse files
ananglnashif
authored andcommitted
drivers: clock_control_nrf2_hsfll: Fix checking if DVFS is available
To check if DVFS can be used, the CONFIG_NRFS_DVFS_LOCAL_DOMAIN symbol needs to be used, not CONFIG_NRFS_HAS_DVFS_SERVICE which only indicates that DVFS is technically possible, not that its local domain part is actually included in the build. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent a70eaa5 commit f629f1e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/clock_control/clock_control_nrf2_hsfll.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LOG_MODULE_DECLARE(clock_control_nrf2, CONFIG_CLOCK_CONTROL_LOG_LEVEL);
1717
BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1,
1818
"multiple instances not supported");
1919

20-
#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE
20+
#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN
2121
#include <ld_dvfs_handler.h>
2222

2323
#define FLAG_FREQ_CHANGE_CB_EXPECTED BIT(FLAGS_COMMON_BITS)
@@ -131,13 +131,13 @@ static struct onoff_manager *hsfll_find_mgr(const struct device *dev,
131131
LOG_ERR("invalid frequency");
132132
return NULL;
133133
}
134-
#endif /* CONFIG_NRFS_HAS_DVFS_SERVICE */
134+
#endif /* CONFIG_NRFS_DVFS_LOCAL_DOMAIN */
135135

136136
static int api_request_hsfll(const struct device *dev,
137137
const struct nrf_clock_spec *spec,
138138
struct onoff_client *cli)
139139
{
140-
#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE
140+
#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN
141141
struct onoff_manager *mgr = hsfll_find_mgr(dev, spec);
142142

143143
if (mgr) {
@@ -153,7 +153,7 @@ static int api_request_hsfll(const struct device *dev,
153153
static int api_release_hsfll(const struct device *dev,
154154
const struct nrf_clock_spec *spec)
155155
{
156-
#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE
156+
#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN
157157
struct onoff_manager *mgr = hsfll_find_mgr(dev, spec);
158158

159159
if (mgr) {
@@ -170,7 +170,7 @@ static int api_cancel_or_release_hsfll(const struct device *dev,
170170
const struct nrf_clock_spec *spec,
171171
struct onoff_client *cli)
172172
{
173-
#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE
173+
#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN
174174
struct onoff_manager *mgr = hsfll_find_mgr(dev, spec);
175175

176176
if (mgr) {
@@ -197,7 +197,7 @@ static int api_get_rate_hsfll(const struct device *dev,
197197

198198
static int hsfll_init(const struct device *dev)
199199
{
200-
#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE
200+
#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN
201201
struct hsfll_dev_data *dev_data = dev->data;
202202
int rc;
203203

@@ -228,12 +228,12 @@ static struct nrf_clock_control_driver_api hsfll_drv_api = {
228228
.cancel_or_release = api_cancel_or_release_hsfll,
229229
};
230230

231-
#ifdef CONFIG_NRFS_HAS_DVFS_SERVICE
231+
#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN
232232
static struct hsfll_dev_data hsfll_data;
233233
#endif
234234

235235
DEVICE_DT_INST_DEFINE(0, hsfll_init, NULL,
236-
COND_CODE_1(CONFIG_NRFS_HAS_DVFS_SERVICE,
236+
COND_CODE_1(CONFIG_NRFS_DVFS_LOCAL_DOMAIN,
237237
(&hsfll_data),
238238
(NULL)),
239239
NULL,

0 commit comments

Comments
 (0)