blob: ee614a4ebf085404ebb2ea593d129cc57225c5f4 [file] [log] [blame]
David Keitel8927ee42013-03-19 17:25:19 -07001/* Copyright (c) 2013, 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#ifndef __QPNP_MISC_H
14#define __QPNP_MISC_H
15
16#include <linux/errno.h>
17
18#ifdef CONFIG_QPNP_MISC
19/**
20 * qpnp_misc_irqs_available - check if IRQs are available
21 *
22 * @consumer_dev: device struct
23 *
24 * This function returns true if the MISC interrupts are available
25 * based on a check in the MISC peripheral revision registers.
26 *
27 * Any consumer of this function needs to reference a MISC device phandle
28 * using the qcom,misc-ref in their device tree node.
29 */
30
31int qpnp_misc_irqs_available(struct device *consumer_dev);
32#else
Hemant Kumar2e16f922013-04-22 16:47:22 -070033static int qpnp_misc_irqs_available(struct device *consumer_dev)
David Keitel8927ee42013-03-19 17:25:19 -070034{
35 return 0;
36}
37#endif
38#endif