blob: dfe0b929a84ba3780d9fadae3b22d87fa9b9851b [file] [log] [blame]
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +05301/* 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
13#include <linux/types.h>
Laxminath Kasam605b42f2017-08-01 22:02:15 +053014#include "core.h"
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +053015
16#ifndef __MFD_WCD9XXX_IRQ_H
17#define __MFD_WCD9XXX_IRQ_H
18bool wcd9xxx_lock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res);
19void wcd9xxx_unlock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res);
20void wcd9xxx_nested_irq_lock(struct wcd9xxx_core_resource *wcd9xxx_res);
21void wcd9xxx_nested_irq_unlock(struct wcd9xxx_core_resource *wcd9xxx_res);
22int wcd9xxx_request_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq,
23 irq_handler_t handler, const char *name, void *data);
24
25void wcd9xxx_free_irq(struct wcd9xxx_core_resource *wcd9xxx_res,
26 int irq, void *data);
27void wcd9xxx_enable_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq);
28void wcd9xxx_disable_irq(struct wcd9xxx_core_resource *wcd9xxx_res,
29 int irq);
30void wcd9xxx_disable_irq_sync(struct wcd9xxx_core_resource *wcd9xxx_res,
31 int irq);
32
33int wcd9xxx_irq_init(struct wcd9xxx_core_resource *wcd9xxx_res);
34void wcd9xxx_irq_exit(struct wcd9xxx_core_resource *wcd9xxx_res);
35int wcd9xxx_irq_drv_init(void);
36void wcd9xxx_irq_drv_exit(void);
37#endif