summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYue Ma <yuem@codeaurora.org>2016-01-26 18:25:07 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:16:42 -0700
commit791a6a69a5b11a2dc8244d0bd7d2d37fabcb4ed3 (patch)
tree95dfc10983e6da97317e05760814f76db7bc327b /include
parentf590819cdec826e1f1b72b34534d2738f4a2fa22 (diff)
net: icnss: Add snapshot of icnss driver
This is a snapshot of the icnss driver and associated files as of msm-3.18 commit: e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of kernel.lnx. 3.18-151201.) Signed-off-by: Yue Ma <yuem@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/soc/qcom/icnss.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/include/soc/qcom/icnss.h b/include/soc/qcom/icnss.h
new file mode 100644
index 000000000000..d1d677f6eaf5
--- /dev/null
+++ b/include/soc/qcom/icnss.h
@@ -0,0 +1,95 @@
+/* Copyright (c) 2015, 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 _ICNSS_WLAN_H_
+#define _ICNSS_WLAN_H_
+
+#include <linux/interrupt.h>
+
+#define ICNSS_MAX_IRQ_REGISTRATIONS 12
+
+struct icnss_driver_ops {
+ char *name;
+ int (*probe)(struct device *dev);
+ void (*remove)(struct device *dev);
+ void (*shutdown)(struct device *dev);
+ int (*reinit)(struct device *dev);
+ void (*crash_shutdown)(void *pdev);
+ int (*suspend)(struct device *dev, pm_message_t state);
+ int (*resume)(struct device *dev);
+};
+
+
+struct ce_tgt_pipe_cfg {
+ u32 pipe_num;
+ u32 pipe_dir;
+ u32 nentries;
+ u32 nbytes_max;
+ u32 flags;
+ u32 reserved;
+};
+
+struct ce_svc_pipe_cfg {
+ u32 service_id;
+ u32 pipe_dir;
+ u32 pipe_num;
+};
+
+struct icnss_shadow_reg_cfg {
+ u16 ce_id;
+ u16 reg_offset;
+};
+
+/* CE configuration to target */
+struct icnss_wlan_enable_cfg {
+ u32 num_ce_tgt_cfg;
+ struct ce_tgt_pipe_cfg *ce_tgt_cfg;
+ u32 num_ce_svc_pipe_cfg;
+ struct ce_svc_pipe_cfg *ce_svc_cfg;
+ u32 num_shadow_reg_cfg;
+ struct icnss_shadow_reg_cfg *shadow_reg_cfg;
+};
+
+/* driver modes */
+enum icnss_driver_mode {
+ ICNSS_MISSION,
+ ICNSS_FTM,
+ ICNSS_EPPING,
+ ICNSS_WALTEST,
+ ICNSS_OFF,
+};
+
+struct icnss_soc_info {
+ void __iomem *v_addr;
+ phys_addr_t p_addr;
+ u32 version;
+};
+
+extern int icnss_register_driver(struct icnss_driver_ops *driver);
+extern int icnss_unregister_driver(struct icnss_driver_ops *driver);
+extern int icnss_register_ce_irq(unsigned int ce_id,
+ irqreturn_t (*handler)(int, void *),
+ unsigned long flags, const char *name);
+extern int icnss_unregister_ce_irq(unsigned int ce_id);
+extern int icnss_wlan_enable(struct icnss_wlan_enable_cfg *config,
+ enum icnss_driver_mode mode,
+ const char *host_version);
+extern int icnss_wlan_disable(enum icnss_driver_mode mode);
+extern void icnss_enable_irq(unsigned int ce_id);
+extern void icnss_disable_irq(unsigned int ce_id);
+extern int icnss_get_soc_info(struct icnss_soc_info *info);
+extern int icnss_ce_free_irq(unsigned int ce_id, void *ctx);
+extern int icnss_ce_request_irq(unsigned int ce_id,
+ irqreturn_t (*handler)(int, void *),
+ unsigned long flags, const char *name, void *ctx);
+extern int icnss_get_ce_id(int irq);
+
+#endif /* _ICNSS_WLAN_H_ */