wcd9xxx-irq.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2016-2017, 2019, The Linux Foundation. All rights reserved.
  3. */
  4. #include <linux/types.h>
  5. #include "core.h"
  6. #ifndef __MFD_WCD9XXX_IRQ_H
  7. #define __MFD_WCD9XXX_IRQ_H
  8. #ifdef CONFIG_WCD9XXX_CODEC_CORE
  9. bool wcd9xxx_lock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res);
  10. void wcd9xxx_unlock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res);
  11. void wcd9xxx_nested_irq_lock(struct wcd9xxx_core_resource *wcd9xxx_res);
  12. void wcd9xxx_nested_irq_unlock(struct wcd9xxx_core_resource *wcd9xxx_res);
  13. int wcd9xxx_request_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq,
  14. irq_handler_t handler, const char *name, void *data);
  15. void wcd9xxx_free_irq(struct wcd9xxx_core_resource *wcd9xxx_res,
  16. int irq, void *data);
  17. void wcd9xxx_enable_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq);
  18. void wcd9xxx_disable_irq(struct wcd9xxx_core_resource *wcd9xxx_res,
  19. int irq);
  20. void wcd9xxx_disable_irq_sync(struct wcd9xxx_core_resource *wcd9xxx_res,
  21. int irq);
  22. int wcd9xxx_irq_init(struct wcd9xxx_core_resource *wcd9xxx_res);
  23. void wcd9xxx_irq_exit(struct wcd9xxx_core_resource *wcd9xxx_res);
  24. int wcd9xxx_irq_drv_init(void);
  25. void wcd9xxx_irq_drv_exit(void);
  26. #else
  27. bool wcd9xxx_lock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res)
  28. {
  29. return false;
  30. }
  31. void wcd9xxx_unlock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res)
  32. {
  33. }
  34. void wcd9xxx_nested_irq_lock(struct wcd9xxx_core_resource *wcd9xxx_res)
  35. {
  36. }
  37. void wcd9xxx_nested_irq_unlock(struct wcd9xxx_core_resource *wcd9xxx_res)
  38. {
  39. }
  40. int wcd9xxx_request_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq,
  41. irq_handler_t handler, const char *name, void *data)
  42. {
  43. return 0;
  44. }
  45. void wcd9xxx_free_irq(struct wcd9xxx_core_resource *wcd9xxx_res,
  46. int irq, void *data)
  47. {
  48. }
  49. void wcd9xxx_enable_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq)
  50. {
  51. }
  52. void wcd9xxx_disable_irq(struct wcd9xxx_core_resource *wcd9xxx_res,
  53. int irq)
  54. {
  55. }
  56. void wcd9xxx_disable_irq_sync(struct wcd9xxx_core_resource *wcd9xxx_res,
  57. int irq)
  58. {
  59. }
  60. int wcd9xxx_irq_init(struct wcd9xxx_core_resource *wcd9xxx_res)
  61. {
  62. return 0;
  63. }
  64. void wcd9xxx_irq_exit(struct wcd9xxx_core_resource *wcd9xxx_res)
  65. {
  66. }
  67. int wcd9xxx_irq_drv_init(void)
  68. {
  69. return 0;
  70. }
  71. void wcd9xxx_irq_drv_exit(void)
  72. {
  73. }
  74. #endif
  75. #endif