@@ -204,32 +204,6 @@ void pm_policy_event_update(struct pm_policy_event *evt, int64_t uptime_ticks);
204
204
*/
205
205
void pm_policy_event_unregister (struct pm_policy_event * evt );
206
206
207
- /**
208
- * @brief Increase power state locks.
209
- *
210
- * Set power state locks in all power states that disable power in the given
211
- * device.
212
- *
213
- * @param dev Device reference.
214
- *
215
- * @see pm_policy_device_power_lock_put()
216
- * @see pm_policy_state_lock_get()
217
- */
218
- void pm_policy_device_power_lock_get (const struct device * dev );
219
-
220
- /**
221
- * @brief Decrease power state locks.
222
- *
223
- * Remove power state locks in all power states that disable power in the given
224
- * device.
225
- *
226
- * @param dev Device reference.
227
- *
228
- * @see pm_policy_device_power_lock_get()
229
- * @see pm_policy_state_lock_put()
230
- */
231
- void pm_policy_device_power_lock_put (const struct device * dev );
232
-
233
207
/**
234
208
* @brief Check if a state will disable a device
235
209
*
@@ -295,22 +269,52 @@ static inline void pm_policy_event_unregister(struct pm_policy_event *evt)
295
269
ARG_UNUSED (evt );
296
270
}
297
271
298
- static inline void pm_policy_device_power_lock_get ( const struct device * dev )
272
+ static inline int64_t pm_policy_next_event_ticks ( void )
299
273
{
300
- ARG_UNUSED ( dev ) ;
274
+ return -1 ;
301
275
}
302
276
303
- static inline void pm_policy_device_power_lock_put (const struct device * dev )
277
+ #endif /* CONFIG_PM */
278
+
279
+ #if defined(CONFIG_PM_POLICY_DEVICE_CONSTRAINTS ) || defined(__DOXYGEN__ )
280
+ /**
281
+ * @brief Increase power state locks.
282
+ *
283
+ * Set power state locks in all power states that disable power in the given
284
+ * device.
285
+ *
286
+ * @param dev Device reference.
287
+ *
288
+ * @see pm_policy_device_power_lock_put()
289
+ * @see pm_policy_state_lock_get()
290
+ */
291
+ void pm_policy_device_power_lock_get (const struct device * dev );
292
+
293
+ /**
294
+ * @brief Decrease power state locks.
295
+ *
296
+ * Remove power state locks in all power states that disable power in the given
297
+ * device.
298
+ *
299
+ * @param dev Device reference.
300
+ *
301
+ * @see pm_policy_device_power_lock_get()
302
+ * @see pm_policy_state_lock_put()
303
+ */
304
+ void pm_policy_device_power_lock_put (const struct device * dev );
305
+
306
+ #else
307
+
308
+ static inline void pm_policy_device_power_lock_get (const struct device * dev )
304
309
{
305
310
ARG_UNUSED (dev );
306
311
}
307
312
308
- static inline int64_t pm_policy_next_event_ticks ( void )
313
+ static inline void pm_policy_device_power_lock_put ( const struct device * dev )
309
314
{
310
- return -1 ;
315
+ ARG_UNUSED ( dev ) ;
311
316
}
312
-
313
- #endif /* CONFIG_PM */
317
+ #endif /* CONFIG_PM_POLICY_DEVICE_CONSTRAINTS */
314
318
315
319
#if defined(CONFIG_PM ) || defined(CONFIG_PM_POLICY_LATENCY_STANDALONE ) || defined(__DOXYGEN__ )
316
320
/**
0 commit comments