diff --git a/Documentation/devicetree/bindings/cnss/cnss-sdio-wlan.txt b/Documentation/devicetree/bindings/cnss/cnss-sdio-wlan.txt new file mode 100644 index 000000000000..d662b6e5af75 --- /dev/null +++ b/Documentation/devicetree/bindings/cnss/cnss-sdio-wlan.txt @@ -0,0 +1,13 @@ +* Qualcomm Technologies Inc Connectivity SubSystem Platform Driver + +This platform driver adds support for the CNSS subsystem used for SDIO +based Wi-Fi devices. The main purpose of this device tree entry below +is to invoke the CNSS SDIO platform driver. + +Required properties: +- compatible : "qcom,cnss_sdio" + +Example: + qcom,cnss-sdio { + compatible = "qcom,cnss_sdio"; + }; diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index b78d2f9c4203..739b57bfb930 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -311,6 +311,17 @@ config CNSS This driver also adds support to integrate PCIe WLAN module to subsystem restart framework. +config CNSS_SDIO + tristate "Flag to enable platform driver for SIDO based wifi device" + depends on MMC_SDHCI + depends on MMC_SDHCI_MSM + ---help--- + This module specifies whether CNSS Platform Driver supports SDIO. + This flag needs to be disabled if CNSS platform Driver need to be + supported for other buses. + This Flag is used by CLD Driver to use the SDIO GPL API's through + CNSS Platform Driver. + config CNSS_SECURE_FW bool "Enable/Disable Memory Allocation for Secure Firmware Feature" depends on CNSS diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile index 703f3aa05e07..766a3fbdc35d 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile @@ -60,5 +60,6 @@ obj-$(CONFIG_BRCMSMAC) += brcm80211/ obj-$(CONFIG_LIBRA_SDIOIF) += libra/ obj-$(CONFIG_WCNSS_CORE) += wcnss/ +obj-$(CONFIG_CNSS_SDIO) += cnss/cnss_sdio.o obj-$(CONFIG_CNSS) += cnss/ obj-$(CONFIG_WCNSS_MEM_PRE_ALLOC) += cnss_prealloc/ diff --git a/drivers/net/wireless/cnss/cnss_sdio.c b/drivers/net/wireless/cnss/cnss_sdio.c new file mode 100644 index 000000000000..9ba5603d952c --- /dev/null +++ b/drivers/net/wireless/cnss/cnss_sdio.c @@ -0,0 +1,59 @@ +/* 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. + */ + +#include +#include +#include +#include +#include + +static int cnss_sdio_probe(struct platform_device *pdev) +{ + return 0; +} + +static int cnss_sdio_remove(struct platform_device *pdev) +{ + return 0; +} + +static const struct of_device_id cnss_sdio_dt_match[] = { + {.compatible = "qcom,cnss_sdio"}, + {} +}; +MODULE_DEVICE_TABLE(of, cnss_sdio_dt_match); + +static struct platform_driver cnss_sdio_driver = { + .probe = cnss_sdio_probe, + .remove = cnss_sdio_remove, + .driver = { + .name = "cnss_sdio", + .owner = THIS_MODULE, + .of_match_table = cnss_sdio_dt_match, + }, +}; + +static int __init cnss_sdio_init(void) +{ + return platform_driver_register(&cnss_sdio_driver); +} + +static void __exit cnss_sdio_exit(void) +{ + platform_driver_unregister(&cnss_sdio_driver); +} + +module_init(cnss_sdio_init); +module_exit(cnss_sdio_exit); + +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION(DEVICE "CNSS SDIO Driver");