diff options
author | Sarada Prasanna Garnayak <sgarna@codeaurora.org> | 2017-10-16 15:41:25 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-11-29 01:33:36 -0800 |
commit | f89e708410fef0219603072ad606b42b7632b73a (patch) | |
tree | 11fc012ec0fb612825a7c66804725579392fe690 /include/soc | |
parent | 5ae2acd95cfb47d0b301cb0fc86b1ac7c7d895d2 (diff) |
icnss: Add dev to all export APIs in ICNSS
Add device pointer in all export symbol to
add support for numerous WLAN module.
CRs-Fixed: 2138446
Change-Id: I981155c165e4e5c2794b778afe647f8a588dd860
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
Diffstat (limited to 'include/soc')
-rw-r--r-- | include/soc/qcom/icnss.h | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/include/soc/qcom/icnss.h b/include/soc/qcom/icnss.h index 78ca0f4bbd08..7915841b17ea 100644 --- a/include/soc/qcom/icnss.h +++ b/include/soc/qcom/icnss.h @@ -13,10 +13,15 @@ #define _ICNSS_WLAN_H_ #include <linux/interrupt.h> +#include <linux/device.h> #define ICNSS_MAX_IRQ_REGISTRATIONS 12 #define ICNSS_MAX_TIMESTAMP_LEN 32 +#ifndef ICNSS_API_WITH_DEV +#define ICNSS_API_WITH_DEV +#endif + enum icnss_uevent { ICNSS_UEVENT_FW_READY, ICNSS_UEVENT_FW_CRASHED, @@ -40,6 +45,8 @@ struct icnss_uevent_data { struct icnss_driver_ops { char *name; + unsigned long drv_state; + struct device_driver driver; int (*probe)(struct device *dev); void (*remove)(struct device *dev); void (*shutdown)(struct device *dev); @@ -105,28 +112,34 @@ struct icnss_soc_info { char fw_build_timestamp[ICNSS_MAX_TIMESTAMP_LEN + 1]; }; -extern int icnss_register_driver(struct icnss_driver_ops *driver); -extern int icnss_unregister_driver(struct icnss_driver_ops *driver); -extern int icnss_wlan_enable(struct icnss_wlan_enable_cfg *config, +#define icnss_register_driver(ops) \ + __icnss_register_driver(ops, THIS_MODULE, KBUILD_MODNAME) +extern int __icnss_register_driver(struct icnss_driver_ops *ops, + struct module *owner, const char *mod_name); + +extern int icnss_unregister_driver(struct icnss_driver_ops *ops); + +extern int icnss_wlan_enable(struct device *dev, + 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, +extern int icnss_wlan_disable(struct device *dev, enum icnss_driver_mode mode); +extern void icnss_enable_irq(struct device *dev, unsigned int ce_id); +extern void icnss_disable_irq(struct device *dev, unsigned int ce_id); +extern int icnss_get_soc_info(struct device *dev, struct icnss_soc_info *info); +extern int icnss_ce_free_irq(struct device *dev, unsigned int ce_id, void *ctx); +extern int icnss_ce_request_irq(struct device *dev, 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); -extern int icnss_set_fw_log_mode(uint8_t fw_log_mode); +extern int icnss_get_ce_id(struct device *dev, int irq); +extern int icnss_set_fw_log_mode(struct device *dev, uint8_t fw_log_mode); extern int icnss_athdiag_read(struct device *dev, uint32_t offset, uint32_t mem_type, uint32_t data_len, uint8_t *output); extern int icnss_athdiag_write(struct device *dev, uint32_t offset, uint32_t mem_type, uint32_t data_len, uint8_t *input); -extern int icnss_get_irq(int ce_id); +extern int icnss_get_irq(struct device *dev, int ce_id); extern int icnss_power_on(struct device *dev); extern int icnss_power_off(struct device *dev); extern struct dma_iommu_mapping *icnss_smmu_get_mapping(struct device *dev); @@ -138,7 +151,7 @@ extern int icnss_get_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 *ch_count, u16 buf_len); extern int icnss_wlan_set_dfs_nol(const void *info, u16 info_len); extern int icnss_wlan_get_dfs_nol(void *info, u16 info_len); -extern bool icnss_is_qmi_disable(void); +extern bool icnss_is_qmi_disable(struct device *dev); extern bool icnss_is_fw_ready(void); extern int icnss_set_wlan_mac_address(const u8 *in, const uint32_t len); extern u8 *icnss_get_wlan_mac_address(struct device *dev, uint32_t *num); |