wcd9xxx-irq.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #include <linux/types.h>
  13. #include "core.h"
  14. #ifndef __MFD_WCD9XXX_IRQ_H
  15. #define __MFD_WCD9XXX_IRQ_H
  16. bool wcd9xxx_lock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res);
  17. void wcd9xxx_unlock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res);
  18. void wcd9xxx_nested_irq_lock(struct wcd9xxx_core_resource *wcd9xxx_res);
  19. void wcd9xxx_nested_irq_unlock(struct wcd9xxx_core_resource *wcd9xxx_res);
  20. int wcd9xxx_request_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq,
  21. irq_handler_t handler, const char *name, void *data);
  22. void wcd9xxx_free_irq(struct wcd9xxx_core_resource *wcd9xxx_res,
  23. int irq, void *data);
  24. void wcd9xxx_enable_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq);
  25. void wcd9xxx_disable_irq(struct wcd9xxx_core_resource *wcd9xxx_res,
  26. int irq);
  27. void wcd9xxx_disable_irq_sync(struct wcd9xxx_core_resource *wcd9xxx_res,
  28. int irq);
  29. int wcd9xxx_irq_init(struct wcd9xxx_core_resource *wcd9xxx_res);
  30. void wcd9xxx_irq_exit(struct wcd9xxx_core_resource *wcd9xxx_res);
  31. int wcd9xxx_irq_drv_init(void);
  32. void wcd9xxx_irq_drv_exit(void);
  33. #endif