Function driver can register for card removal notifications.
Before removing the card, let function driver notify the same
and allow it to cleanup.
Change-Id: I5d423807277bdd7476a6ea7d6a7c9ef71c0725f5
Signed-off-by: Pavan kumar <pavan@codeaurora.org>
Add an API to enable/disable interrupts from the chip.
This API uses func0 SDIO_CCCR_IENx register to enable/disable
interrupts from the chip.
Change-Id: I2da8d569511aeff0409744a90e7daf4704fff91d
Signed-off-by: Pavan kumar <pavan@codeaurora.org>
In case of LOGP recovery Wifi is soft reset. During soft reset,
observe that regulator_get() is not called for all regulators.
This is leading to null pointer dereference by kernel when
regulator_put() is called while turning of Wifi.
Change-Id: Icff3713bf429566cd013349b60f601f98d9fb5da
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
The WLAN driver votes for whatever the current it requires from
8901_s4.As it just loads L0 and LVS1, 60mA should be fine.
CRs-fixed: 328478
Change-Id: Ie180e03a92715c7b01fc88584f11244b24523b78
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
In 8660 wifi is using 8901 regulators. Once wifi is enabled and disabled
back, these regulator does not go in LPM mode and causing the device to
draw more current in suspend state. Hence put these regulator in LPM mode.
CRs-Fixed: 328481
Change-Id: Iedb05498af9f89b57e96eebee9ca74460ddb4963
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
Wifi and BT have shared voltage regulator. So if both
needs to be enabled, there is a voltage level conflict
between them. In case of older vreg implementation
there is no such sanity check regarding the voltage
levels, hence no conflict.
But in case of regulator API's, it has a sanity check for
previously voted voltage for a particular regulator. Hence
in this case we need to pass the minimum & maximum voltage
range for both BT & WIFI, so that regulator framework will
internally set the common voltage level for both devices.
Change-Id: I48cc70ffe78407dc1013ac09da4cddfcda0ab2cf
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
Set BT regulator voltage level in bluetooth_switch_regulator function.
It is used to make correct voltage level for BT, everytime BT is
turned off/on. Also set regulator voltage level for wifi for everytime
wifi is turned off/on.
Change-Id: I086785664f0e858e9b6c300e7f6563f408b97d60
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
Combine rpm-regulator.c and rpm-regulator-8960.c so that only a
single file named rpm-regulator.c contains the RPM regulator
driver logic. This will initially support both 8660 and 8960.
The data needed to capture the configuration of the RPM regulator
driver on different platforms will be added in platform specific
files.
Change-Id: I57982e73aa7cb30425912b5ff4b90871419e1f8a
Signed-off-by: David Collins <collinsd@codeaurora.org>
Convert all consumers of vreg.c on 7x27a to use the regulator API.
vreg.c should be considered DEPRECATED on 7x27a.
Signed-off-by: Justin Paupore <jpaupore@codeaurora.org>
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
For stable use of WCN1314 WLAN chip, WLAN Reset pin should be deasserted
only after all the regulators have been enabled.
CRs-fixed: 301629
Acked-by: Viral Modi <viralm@qca.qualcomm.com>
Signed-off-by: Yunsen Wang <yunsenw@codeaurora.org>
WLAN vregs are put in LPM with A0_XO_EN. It doesn't disable
the vreg anymore.Capacitive charging Current Spikes are
seen if the vreg is disabled, instead of putting in LPM.
Signed-off-by: Santosh Sajjan <ssajjan@codeaurora.org>
A0 clock is turned OFF when WLAN module is removed
and turned ON/Pin controlled when WLAN module is inserted.
GPIO is configured to input-low while removing module to minimize
current consumption.
Signed-off-by: Santosh Sajjan <ssajjan@codeaurora.org>
WLAN LDO's are configured to be pin controlled
to minimize power consumption during dtim sleep period.
CRs-fixed: 296937,295848
Signed-off-by: Santosh Sajjan <ssajjan@codeaurora.org>