1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2013 Google, Inc
11 #if CONFIG_IS_ENABLED(DM_WARN)
12 #define dm_warn(fmt...) log(LOGC_DM, LOGL_WARNING, ##fmt)
14 static inline void dm_warn(const char *fmt, ...)
22 * list_count_items() - Count number of items in a list
24 * @param head: Head of list
25 * Return: number of items, or 0 if empty
27 int list_count_items(struct list_head *head);
29 /* Dump out a tree of all devices */
30 void dm_dump_tree(void);
32 /* Dump out a list of uclasses and their devices */
33 void dm_dump_uclass(void);
35 #ifdef CONFIG_DEBUG_DEVRES
36 /* Dump out a list of device resources */
37 void dm_dump_devres(void);
39 static inline void dm_dump_devres(void)
44 /* Dump out a list of drivers */
45 void dm_dump_drivers(void);
47 /* Dump out a list with each driver's compatibility strings */
48 void dm_dump_driver_compat(void);
50 /* Dump out a list of drivers with static platform data */
51 void dm_dump_static_driver_info(void);
54 * dm_dump_mem() - Dump stats on memory usage in driver model
58 void dm_dump_mem(struct dm_stats *stats);
60 #if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY)
61 void *dm_priv_to_rw(void *priv);
63 static inline void *dm_priv_to_rw(void *priv)