diff options
| author | Andy Gross <agross@codeaurora.org> | 2014-07-14 22:52:04 -0500 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:21:22 -0700 |
| commit | 7a045fd0fddb918d369555a1d0aec0349a36c291 (patch) | |
| tree | 25b15dd26dd5b4b5987ccad83785fcade6de6c5d /include/linux | |
| parent | 665fc9f340c4381353a7669ca70416e738d95f97 (diff) | |
misc: Add snapshot of QPNP misc driver
This patch adds a snapshot of the QPNP misc driver as of msm-3.14
commit:
e016c39467094409c9c872b02ec619164913054a (Merge "msm: thermal:
Fix compilation issue when THERMAL_MONITOR is disabled")
CRs-Fixed: 972331
Change-Id: I48dc9857379c388ddff86b20320cdfa23bb22af8
Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/qpnp-misc.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/qpnp-misc.h b/include/linux/qpnp-misc.h new file mode 100644 index 000000000000..ab3302f6ea78 --- /dev/null +++ b/include/linux/qpnp-misc.h @@ -0,0 +1,38 @@ +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __QPNP_MISC_H +#define __QPNP_MISC_H + +#include <linux/errno.h> + +#ifdef CONFIG_QPNP_MISC +/** + * qpnp_misc_irqs_available - check if IRQs are available + * + * @consumer_dev: device struct + * + * This function returns true if the MISC interrupts are available + * based on a check in the MISC peripheral revision registers. + * + * Any consumer of this function needs to reference a MISC device phandle + * using the "qcom,misc-ref" property in their device tree node. + */ + +int qpnp_misc_irqs_available(struct device *consumer_dev); +#else +static int qpnp_misc_irqs_available(struct device *consumer_dev) +{ + return 0; +} +#endif +#endif |
