cnss: Provide API to CLD Driver to control SPDT GPIO

Antenna Sharing GPIO need to be toggled between QCA PCIe and SDIO
devices based on the requirement. If SDIO device is to be operational,
this GPIO should be turned ON high.

Expose API to CLD Driver to control this GPIO for dual-wifi platforms.

CRs-Fixed: 1013494
Change-Id: I271ba273a4c70717f066d219ff02e8f0f56e2ac3
Signed-off-by: Komal Kumar <kseelam@codeaurora.org>
This commit is contained in:
Komal Seelam 2016-05-10 14:36:50 +05:30 committed by Gerrit - the friendly Code Review server
parent 9e5835025b
commit 3136a40d03
2 changed files with 12 additions and 2 deletions

View file

@ -49,8 +49,6 @@
#define CNSS_DUMP_NAME "CNSS_WLAN"
#define CNSS_PINCTRL_SLEEP_STATE "sleep"
#define CNSS_PINCTRL_ACTIVE_STATE "active"
#define PINCTRL_SLEEP 0
#define PINCTRL_ACTIVE 1
struct cnss_sdio_regulator {
struct regulator *wlan_io;
@ -673,6 +671,15 @@ static int cnss_set_pinctrl_state(struct cnss_sdio_data *pdata, bool state)
pinctrl_select_state(info->pinctrl, info->sleep);
}
int cnss_sdio_configure_spdt(bool state)
{
if (!cnss_pdata)
return -ENODEV;
return cnss_set_pinctrl_state(cnss_pdata, state);
}
EXPORT_SYMBOL(cnss_sdio_configure_spdt);
/**
* cnss_sdio_wlan_register_driver() - cnss wlan register API
* @driver: sdio wlan driver interface from wlan driver.

View file

@ -19,6 +19,8 @@
#ifdef CONFIG_CNSS
#define CNSS_MAX_FILE_NAME 20
#define PINCTRL_SLEEP 0
#define PINCTRL_ACTIVE 1
enum cnss_bus_width_type {
CNSS_BUS_WIDTH_NONE,
@ -244,4 +246,5 @@ extern int cnss_common_set_wlan_mac_address(struct device *dev, const u8 *in,
extern u8 *cnss_common_get_wlan_mac_address(struct device *dev, uint32_t *num);
extern int cnss_power_up(struct device *dev);
extern int cnss_power_down(struct device *dev);
extern int cnss_sdio_configure_spdt(bool state);
#endif /* _NET_CNSS_H_ */