cam_debug_util.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
  5. */
  6. #ifndef _CAM_DEBUG_UTIL_H_
  7. #define _CAM_DEBUG_UTIL_H_
  8. #include <dt-bindings/msm-camera.h>
  9. #include <linux/platform_device.h>
  10. #include "cam_presil_hw_access.h"
  11. #include "cam_trace.h"
  12. extern unsigned long long debug_mdl;
  13. extern unsigned int debug_type;
  14. extern unsigned int debug_priority;
  15. extern unsigned int debug_drv;
  16. extern unsigned int debug_bypass_drivers;
  17. #define CAM_IS_NULL_TO_STR(ptr) ((ptr) ? "Non-NULL" : "NULL")
  18. #define CAM_LOG_BUF_LEN 512
  19. #define BYPASS_VALUE 0xDEADBEEF
  20. #define DEFAULT_CLK_VALUE 19200000
  21. /* Module IDs used for debug logging */
  22. enum cam_debug_module_id {
  23. CAM_CDM, /* bit 0 */
  24. CAM_CORE, /* bit 1 */
  25. CAM_CPAS, /* bit 2 */
  26. CAM_ISP, /* bit 3 */
  27. CAM_CRM, /* bit 4 */
  28. CAM_SENSOR, /* bit 5 */
  29. CAM_SMMU, /* bit 6 */
  30. CAM_SYNC, /* bit 7 */
  31. CAM_ICP, /* bit 8 */
  32. CAM_JPEG, /* bit 9 */
  33. CAM_FD, /* bit 10 */
  34. CAM_LRME, /* bit 11 */
  35. CAM_FLASH, /* bit 12 */
  36. CAM_ACTUATOR, /* bit 13 */
  37. CAM_CCI, /* bit 14 */
  38. CAM_CSIPHY, /* bit 15 */
  39. CAM_EEPROM, /* bit 16 */
  40. CAM_UTIL, /* bit 17 */
  41. CAM_HFI, /* bit 18 */
  42. CAM_CTXT, /* bit 19 */
  43. CAM_OIS, /* bit 20 */
  44. CAM_RES, /* bit 21 */
  45. CAM_MEM, /* bit 22 */
  46. CAM_IRQ_CTRL, /* bit 23 */
  47. CAM_REQ, /* bit 24 */
  48. CAM_PERF, /* bit 25 */
  49. CAM_CUSTOM, /* bit 26 */
  50. CAM_PRESIL, /* bit 27 */
  51. CAM_OPE, /* bit 28 */
  52. CAM_IO_ACCESS, /* bit 29 */
  53. CAM_SFE, /* bit 30 */
  54. CAM_CRE, /* bit 31 */
  55. CAM_PRESIL_CORE, /* bit 32 */
  56. CAM_TPG, /* bit 33 */
  57. CAM_DMA_FENCE, /* bit 34 */
  58. CAM_SENSOR_UTIL, /* bit 35 */
  59. CAM_SYNX, /* bit 36 */
  60. CAM_DBG_MOD_MAX
  61. };
  62. /* Log level types */
  63. enum cam_debug_log_level {
  64. CAM_TYPE_TRACE,
  65. CAM_TYPE_ERR,
  66. CAM_TYPE_WARN,
  67. CAM_TYPE_INFO,
  68. CAM_TYPE_DBG,
  69. CAM_TYPE_MAX,
  70. };
  71. /*
  72. * enum cam_debug_priority - Priority of debug log (0 = Lowest)
  73. */
  74. enum cam_debug_priority {
  75. CAM_DBG_PRIORITY_0,
  76. CAM_DBG_PRIORITY_1,
  77. CAM_DBG_PRIORITY_2,
  78. };
  79. static const char *cam_debug_mod_name[CAM_DBG_MOD_MAX] = {
  80. [CAM_CDM] = "CAM-CDM",
  81. [CAM_CORE] = "CAM-CORE",
  82. [CAM_CRM] = "CAM-CRM",
  83. [CAM_CPAS] = "CAM-CPAS",
  84. [CAM_ISP] = "CAM-ISP",
  85. [CAM_SENSOR] = "CAM-SENSOR",
  86. [CAM_SMMU] = "CAM-SMMU",
  87. [CAM_SYNC] = "CAM-SYNC",
  88. [CAM_ICP] = "CAM-ICP",
  89. [CAM_JPEG] = "CAM-JPEG",
  90. [CAM_FD] = "CAM-FD",
  91. [CAM_LRME] = "CAM-LRME",
  92. [CAM_FLASH] = "CAM-FLASH",
  93. [CAM_ACTUATOR] = "CAM-ACTUATOR",
  94. [CAM_CCI] = "CAM-CCI",
  95. [CAM_CSIPHY] = "CAM-CSIPHY",
  96. [CAM_EEPROM] = "CAM-EEPROM",
  97. [CAM_UTIL] = "CAM-UTIL",
  98. [CAM_CTXT] = "CAM-CTXT",
  99. [CAM_HFI] = "CAM-HFI",
  100. [CAM_OIS] = "CAM-OIS",
  101. [CAM_IRQ_CTRL] = "CAM-IRQ-CTRL",
  102. [CAM_MEM] = "CAM-MEM",
  103. [CAM_PERF] = "CAM-PERF",
  104. [CAM_REQ] = "CAM-REQ",
  105. [CAM_CUSTOM] = "CAM-CUSTOM",
  106. [CAM_OPE] = "CAM-OPE",
  107. [CAM_PRESIL] = "CAM-PRESIL",
  108. [CAM_RES] = "CAM-RES",
  109. [CAM_IO_ACCESS] = "CAM-IO-ACCESS",
  110. [CAM_SFE] = "CAM-SFE",
  111. [CAM_CRE] = "CAM-CRE",
  112. [CAM_PRESIL_CORE] = "CAM-CORE-PRESIL",
  113. [CAM_TPG] = "CAM-TPG",
  114. [CAM_DMA_FENCE] = "CAM-DMA-FENCE",
  115. [CAM_SENSOR_UTIL] = "CAM-SENSOR-UTIL",
  116. [CAM_SYNX] = "CAM_SYNX",
  117. };
  118. #define ___CAM_DBG_MOD_NAME(module_id) \
  119. __builtin_choose_expr(((module_id) == CAM_CDM), "CAM-CDM", \
  120. __builtin_choose_expr(((module_id) == CAM_CORE), "CAM-CORE", \
  121. __builtin_choose_expr(((module_id) == CAM_CRM), "CAM-CRM", \
  122. __builtin_choose_expr(((module_id) == CAM_CPAS), "CAM-CPAS", \
  123. __builtin_choose_expr(((module_id) == CAM_ISP), "CAM-ISP", \
  124. __builtin_choose_expr(((module_id) == CAM_SENSOR), "CAM-SENSOR", \
  125. __builtin_choose_expr(((module_id) == CAM_SMMU), "CAM-SMMU", \
  126. __builtin_choose_expr(((module_id) == CAM_SYNC), "CAM-SYNC", \
  127. __builtin_choose_expr(((module_id) == CAM_ICP), "CAM-ICP", \
  128. __builtin_choose_expr(((module_id) == CAM_JPEG), "CAM-JPEG", \
  129. __builtin_choose_expr(((module_id) == CAM_FD), "CAM-FD", \
  130. __builtin_choose_expr(((module_id) == CAM_LRME), "CAM-LRME", \
  131. __builtin_choose_expr(((module_id) == CAM_FLASH), "CAM-FLASH", \
  132. __builtin_choose_expr(((module_id) == CAM_ACTUATOR), "CAM-ACTUATOR", \
  133. __builtin_choose_expr(((module_id) == CAM_CCI), "CAM-CCI", \
  134. __builtin_choose_expr(((module_id) == CAM_CSIPHY), "CAM-CSIPHY", \
  135. __builtin_choose_expr(((module_id) == CAM_EEPROM), "CAM-EEPROM", \
  136. __builtin_choose_expr(((module_id) == CAM_UTIL), "CAM-UTIL", \
  137. __builtin_choose_expr(((module_id) == CAM_CTXT), "CAM-CTXT", \
  138. __builtin_choose_expr(((module_id) == CAM_HFI), "CAM-HFI", \
  139. __builtin_choose_expr(((module_id) == CAM_OIS), "CAM-OIS", \
  140. __builtin_choose_expr(((module_id) == CAM_IRQ_CTRL), "CAM-IRQ-CTRL", \
  141. __builtin_choose_expr(((module_id) == CAM_MEM), "CAM-MEM", \
  142. __builtin_choose_expr(((module_id) == CAM_PERF), "CAM-PERF", \
  143. __builtin_choose_expr(((module_id) == CAM_REQ), "CAM-REQ", \
  144. __builtin_choose_expr(((module_id) == CAM_CUSTOM), "CAM-CUSTOM", \
  145. __builtin_choose_expr(((module_id) == CAM_OPE), "CAM-OPE", \
  146. __builtin_choose_expr(((module_id) == CAM_PRESIL), "CAM-PRESIL", \
  147. __builtin_choose_expr(((module_id) == CAM_RES), "CAM-RES", \
  148. __builtin_choose_expr(((module_id) == CAM_IO_ACCESS), "CAM-IO-ACCESS", \
  149. __builtin_choose_expr(((module_id) == CAM_SFE), "CAM-SFE", \
  150. __builtin_choose_expr(((module_id) == CAM_CRE), "CAM-CRE", \
  151. __builtin_choose_expr(((module_id) == CAM_PRESIL_CORE), "CAM-CORE-PRESIL", \
  152. __builtin_choose_expr(((module_id) == CAM_TPG), "CAM-TPG", \
  153. __builtin_choose_expr(((module_id) == CAM_DMA_FENCE), "CAM-DMA-FENCE", \
  154. __builtin_choose_expr(((module_id) == CAM_SENSOR_UTIL), "CAM-SENSOR-UTIL", \
  155. __builtin_choose_expr(((module_id) == CAM_SYNX), "CAM-SYNX", \
  156. "CAMERA")))))))))))))))))))))))))))))))))))))
  157. #define CAM_DBG_MOD_NAME(module_id) \
  158. ((module_id < CAM_DBG_MOD_MAX) ? cam_debug_mod_name[module_id] : "CAMERA")
  159. #define __CAM_DBG_MOD_NAME(module_id) \
  160. __builtin_choose_expr(__builtin_constant_p((module_id)), ___CAM_DBG_MOD_NAME(module_id), \
  161. CAM_DBG_MOD_NAME(module_id))
  162. static const char *cam_debug_tag_name[CAM_TYPE_MAX] = {
  163. [CAM_TYPE_TRACE] = "CAM_TRACE",
  164. [CAM_TYPE_ERR] = "CAM_ERR",
  165. [CAM_TYPE_WARN] = "CAM_WARN",
  166. [CAM_TYPE_INFO] = "CAM_INFO",
  167. [CAM_TYPE_DBG] = "CAM_DBG",
  168. };
  169. #define ___CAM_LOG_TAG_NAME(tag) \
  170. ({ \
  171. static_assert(tag < CAM_TYPE_MAX); \
  172. cam_debug_tag_name[tag]; \
  173. })
  174. #define CAM_LOG_TAG_NAME(tag) ((tag < CAM_TYPE_MAX) ? cam_debug_tag_name[tag] : "CAM_LOG")
  175. #define __CAM_LOG_TAG_NAME(tag) \
  176. __builtin_choose_expr(__builtin_constant_p((tag)), ___CAM_LOG_TAG_NAME(tag), \
  177. CAM_LOG_TAG_NAME(tag))
  178. enum cam_log_print_type {
  179. CAM_PRINT_LOG = 0x1,
  180. CAM_PRINT_TRACE = 0x2,
  181. CAM_PRINT_BOTH = 0x3,
  182. };
  183. #define __CAM_LOG_FMT KERN_INFO "%s: %s: %s: %d: %s "
  184. /**
  185. * cam_print_log() - function to print logs (internal use only, use macros instead)
  186. *
  187. * @type: Corresponds to enum cam_log_print_type, selects if logs are printed in log buffer,
  188. * trace buffers or both
  189. * @module_id: Module calling the log macro
  190. * @tag: Tag for log level
  191. * @func: Function string
  192. * @line: Line number
  193. * @fmt: Formatting string
  194. */
  195. void cam_print_log(int type, int module, int tag, const char *func,
  196. int line, const char *fmt, ...);
  197. #define __CAM_LOG(type, tag, module_id, fmt, args...) \
  198. ({ \
  199. cam_print_log(type, \
  200. module_id, tag, __func__, \
  201. __LINE__, fmt, ##args); \
  202. })
  203. #define CAM_LOG(tag, module_id, fmt, args...) \
  204. __CAM_LOG(CAM_PRINT_BOTH, tag, module_id, fmt, ##args)
  205. #define CAM_LOG_RL_CUSTOM(type, module_id, interval, burst, fmt, args...) \
  206. ({ \
  207. static DEFINE_RATELIMIT_STATE(_rs, (interval * HZ), burst); \
  208. __CAM_LOG(__ratelimit(&_rs) ? CAM_PRINT_BOTH : CAM_PRINT_TRACE, \
  209. type, module_id, fmt, ##args); \
  210. })
  211. #define CAM_LOG_RL(type, module_id, fmt, args...) \
  212. CAM_LOG_RL_CUSTOM(type, module_id, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST, \
  213. fmt, ##args)
  214. #define __CAM_DBG(module_id, priority, fmt, args...) \
  215. ({ \
  216. if (unlikely((debug_mdl & BIT_ULL(module_id)) && (priority >= debug_priority))) { \
  217. CAM_LOG(CAM_TYPE_DBG, module_id, fmt, ##args); \
  218. } \
  219. })
  220. /**
  221. * CAM_ERR / CAM_WARN / CAM_INFO / CAM_TRACE
  222. *
  223. * @brief: Macros to print logs at respective level error/warn/info/trace. All
  224. * logs except CAM_TRACE are printed in both log and trace buffers.
  225. *
  226. * @__module: Respective enum cam_debug_module_id
  227. * @fmt: Format string
  228. * @args: Arguments to match with format
  229. */
  230. #define CAM_ERR(__module, fmt, args...) CAM_LOG(CAM_TYPE_ERR, __module, fmt, ##args)
  231. #define CAM_WARN(__module, fmt, args...) CAM_LOG(CAM_TYPE_WARN, __module, fmt, ##args)
  232. #define CAM_INFO(__module, fmt, args...) CAM_LOG(CAM_TYPE_INFO, __module, fmt, ##args)
  233. #define CAM_TRACE(__module, fmt, args...) \
  234. __CAM_LOG(CAM_PRINT_TRACE, CAM_TYPE_TRACE, __module, fmt, ##args)
  235. /**
  236. * CAM_ERR_RATE_LIMIT / CAM_WARN_RATE_LIMIT / CAM_INFO_RATE_LIMIT
  237. *
  238. * @brief: Rate limited version of logs used to reduce log spew.
  239. *
  240. * @__module: Respective enum cam_debug_module_id
  241. * @fmt: Format string
  242. * @args: Arguments to match with format
  243. */
  244. #define CAM_ERR_RATE_LIMIT(__module, fmt, args...) CAM_LOG_RL(CAM_TYPE_ERR, __module, fmt, ##args)
  245. #define CAM_WARN_RATE_LIMIT(__module, fmt, args...) CAM_LOG_RL(CAM_TYPE_WARN, __module, fmt, ##args)
  246. #define CAM_INFO_RATE_LIMIT(__module, fmt, args...) CAM_LOG_RL(CAM_TYPE_INFO, __module, fmt, ##args)
  247. /**
  248. * CAM_ERR_RATE_LIMIT_CUSTOM / CAM_WARN_RATE_LIMITT_CUSTOM/ CAM_INFO_RATE_LIMITT_CUSTOM
  249. *
  250. * @brief: Rate limited version of logs used to reduce log spew that can have
  251. * customized burst rate
  252. *
  253. * @__module: Respective enum cam_debug_module_id
  254. * @interval: Sliding window interval in which to count logs
  255. * @burst: Maximum number of logs in the specified interval
  256. * @fmt: Format string
  257. * @args: Arguments to match with format
  258. */
  259. #define CAM_ERR_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \
  260. CAM_LOG_RL_CUSTOM(CAM_TYPE_ERR, __module, interval, burst, fmt, ##args)
  261. #define CAM_WARN_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \
  262. CAM_LOG_RL_CUSTOM(CAM_TYPE_WARN, __module, interval, burst, fmt, ##args)
  263. #define CAM_INFO_RATE_LIMIT_CUSTOM(__module, interval, burst, fmt, args...) \
  264. CAM_LOG_RL_CUSTOM(CAM_TYPE_INFO, __module, interval, burst, fmt, ##args)
  265. /*
  266. * CAM_DBG
  267. * @brief : This Macro will print debug logs when enabled using GROUP and
  268. * if its priority is greater than the priority parameter
  269. *
  270. * @__module : Respective module id which is been calling this Macro
  271. * @fmt : Formatted string which needs to be print in log
  272. * @args : Arguments which needs to be print in log
  273. */
  274. #define CAM_DBG(__module, fmt, args...) __CAM_DBG(__module, CAM_DBG_PRIORITY_0, fmt, ##args)
  275. #define CAM_DBG_PR1(__module, fmt, args...) __CAM_DBG(__module, CAM_DBG_PRIORITY_1, fmt, ##args)
  276. #define CAM_DBG_PR2(__module, fmt, args...) __CAM_DBG(__module, CAM_DBG_PRIORITY_2, fmt, ##args)
  277. /**
  278. * cam_print_to_buffer
  279. * @brief: Function to print to camera logs to a buffer. Don't use directly. Use macros
  280. * provided below.
  281. *
  282. * @buf: Buffer to print into
  283. * @buf_size: Total size of the buffer
  284. * @len: Pointer to variable used to keep track of the length
  285. * @tag: Log level tag to be prefixed
  286. * @module_id: Module id tag to be prefixed
  287. * @fmt: Formatted string which needs to be print in log
  288. * @args: Arguments which needs to be print in log
  289. */
  290. void cam_print_to_buffer(char *buf, const size_t buf_size, size_t *len, unsigned int tag,
  291. unsigned long long module_id, const char *fmt, ...);
  292. /**
  293. * CAM_[ERR/WARN/INFO]_BUF
  294. * @brief: Macro to print a new line into log buffer.
  295. *
  296. * @module_id: Module id tag to be prefixed
  297. * @buf: Buffer to print into
  298. * @buf_size: Total size of the buffer
  299. * @len: Pointer to the variable used to keep track of the length
  300. * @fmt: Formatted string which needs to be print in log
  301. * @args: Arguments which needs to be print in log
  302. */
  303. #define CAM_ERR_BUF(module_id, buf, buf_size, len, fmt, args...) \
  304. cam_print_to_buffer(buf, buf_size, len, CAM_TYPE_ERR, module_id, fmt, ##args)
  305. #define CAM_WARN_BUF(module_id, buf, buf_size, len, fmt, args...) \
  306. cam_print_to_buffer(buf, buf_size, len, CAM_TYPE_WARN, module_id, fmt, ##args)
  307. #define CAM_INFO_BUF(module_id, buf, buf_size, len, fmt, args...) \
  308. cam_print_to_buffer(buf, buf_size, len, CAM_TYPE_INFO, module_id, fmt, ##args)
  309. #define CAM_BOOL_TO_YESNO(val) ((val) ? "Y" : "N")
  310. /**
  311. * struct cam_cpas_debug_settings - Sysfs debug settings for cpas driver
  312. */
  313. struct cam_cpas_debug_settings {
  314. uint64_t mnoc_hf_0_ab_bw;
  315. uint64_t mnoc_hf_0_ib_bw;
  316. uint64_t mnoc_hf_1_ab_bw;
  317. uint64_t mnoc_hf_1_ib_bw;
  318. uint64_t mnoc_sf_0_ab_bw;
  319. uint64_t mnoc_sf_0_ib_bw;
  320. uint64_t mnoc_sf_1_ab_bw;
  321. uint64_t mnoc_sf_1_ib_bw;
  322. uint64_t mnoc_sf_icp_ab_bw;
  323. uint64_t mnoc_sf_icp_ib_bw;
  324. uint64_t camnoc_bw;
  325. uint64_t cam_ife_0_drv_ab_high_bw;
  326. uint64_t cam_ife_0_drv_ib_high_bw;
  327. uint64_t cam_ife_1_drv_ab_high_bw;
  328. uint64_t cam_ife_1_drv_ib_high_bw;
  329. uint64_t cam_ife_2_drv_ab_high_bw;
  330. uint64_t cam_ife_2_drv_ib_high_bw;
  331. uint64_t cam_ife_0_drv_ab_low_bw;
  332. uint64_t cam_ife_0_drv_ib_low_bw;
  333. uint64_t cam_ife_1_drv_ab_low_bw;
  334. uint64_t cam_ife_1_drv_ib_low_bw;
  335. uint64_t cam_ife_2_drv_ab_low_bw;
  336. uint64_t cam_ife_2_drv_ib_low_bw;
  337. uint64_t cam_ife_0_drv_low_set_zero;
  338. uint64_t cam_ife_1_drv_low_set_zero;
  339. uint64_t cam_ife_2_drv_low_set_zero;
  340. bool is_updated;
  341. };
  342. /**
  343. * struct camera_debug_settings - Sysfs debug settings for camera
  344. *
  345. * @cpas_settings: Debug settings for cpas driver.
  346. */
  347. struct camera_debug_settings {
  348. struct cam_cpas_debug_settings cpas_settings;
  349. };
  350. /**
  351. * @brief : API to get camera debug settings
  352. * @return const struct camera_debug_settings pointer.
  353. */
  354. const struct camera_debug_settings *cam_debug_get_settings(void);
  355. /**
  356. * @brief : API to parse and store input from sysfs debug node
  357. * @return Number of bytes read from buffer on success, or -EPERM on error.
  358. */
  359. ssize_t cam_debug_sysfs_node_store(struct device *dev,
  360. struct device_attribute *attr, const char *buf, size_t count);
  361. /**
  362. * cam_debugfs_init()
  363. *
  364. * @brief: create camera debugfs root folder
  365. */
  366. void cam_debugfs_init(void);
  367. /**
  368. * cam_debugfs_deinit()
  369. *
  370. * @brief: remove camera debugfs root folder
  371. */
  372. void cam_debugfs_deinit(void);
  373. /**
  374. * cam_debugfs_create_subdir()
  375. *
  376. * @brief: create a directory within the camera debugfs root folder
  377. *
  378. * @name: name of the directory
  379. * @subdir: pointer to the newly created directory entry
  380. *
  381. * @return: 0 on success, negative on failure
  382. */
  383. int cam_debugfs_create_subdir(const char *name, struct dentry **subdir);
  384. /**
  385. * cam_debugfs_lookup_subdir()
  386. *
  387. * @brief: lookup a directory within the camera debugfs root folder
  388. *
  389. * @name: name of the directory
  390. * @subdir: pointer to the successfully found directory entry
  391. *
  392. * @return: 0 on success, negative on failure
  393. */
  394. int cam_debugfs_lookup_subdir(const char *name, struct dentry **subdir);
  395. /**
  396. * cam_debugfs_available()
  397. *
  398. * @brief: Check if debugfs is enabled for camera. Use this function before creating any
  399. * debugfs entries.
  400. *
  401. * @return: true if enabled, false otherwise
  402. */
  403. static inline bool cam_debugfs_available(void)
  404. {
  405. #if defined(CONFIG_DEBUG_FS)
  406. return true;
  407. #else
  408. return false;
  409. #endif
  410. }
  411. #endif /* _CAM_DEBUG_UTIL_H_ */