summaryrefslogtreecommitdiff
path: root/btpower.c
AgeCommit message (Collapse)Author
2023-02-22btpower: Set enable_irq_wake when BT turn onVic Huang
Set enable_irq_wake when BT turn on Set disable_irq_wake when BT turn off Bug: 267961645 Bug: 265610362 Test: 1. Basic functions test PASS 2. BCST PASS 3. Power automation test PASS 4. Manual power measurement PASS 5. SDS stability test PASS 6. Issue verified PASS Change-Id: I58839b7999dd46f6ac3a7047239a88ca850731de (cherry picked from commit 1ad11a6b83f97229ef34e527e21e3ef096df3875)
2022-07-21Bluetooth: Get idle IP right after GPIO initializedandroid-13.0.0_r0.93android-gs-felix-5.10-android13-d3Cheney Ni
We initialize the idle IP state with RFKILL probing, so have to get the idle IP before that. Bug: 238163307 Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: Ie28d70b24d703715e0849ff90daaf9458c2c9b26
2022-07-08Bluetooth: Check power state before changing the HOST_WAKE IRQCheney Ni
Bug: 238163307 Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: Ibb0d045208c64ecb88b72488bdf0581426419200
2022-07-07Bluetooth: Using logbuffer in btpower driver to enhance debuggingCheney Ni
Record useful driver messages in the logbuffer cache, and dump them via device node /dev/logbuffer_btpower once vendor HAL detecting errors. Bug: 229691092 Change-Id: Ifbcdaf4f5bfcec7826f7a35b79a0f34291b03bb8 Signed-off-by: Cheney Ni <cheneyni@google.com>
2022-04-20btpower: mechanism to handle OOBS flip and release carefullyCheney Ni
We remember previous HOST_WAKE gpio state, so can compare with the IRQ value if it changes quickly. The vendor HAL uses this information to fine-control OOBS state. This change also adds the release operation for unregistering OOBS control. Bug: 202091533 Bug: 203079726 Change-Id: I6ea5f27aca2f4bba0625f04160037e26b2aa027a Signed-off-by: Cheney Ni <cheneyni@google.com>
2022-04-20OOBS enhancement changes for Bluetooth DriverGirish BN
- Handling GPIO and UART clock throw State machine. CRs-fixed: 3123484 Change-Id: I9b10b15f2150c51823e5eb670954d5b6a97a606e Signed-off-by: Girish BN <quic_gbn@quicinc.com> Signed-off-by: Cheney Ni <cheneyni@google.com>
2022-04-19Add out of band sleep support to bluetooth driverBalakrishna Godavarthi
This change adds out of band sleep support to bluetooth power driver. This feature will be enabled when macro CONFIG_MSM_BT_OOBS is define. Change-Id: I74b231956ad0884528b17720cbfa3639281af9a3 Signed-off-by: Balakrishna Godavarthi <quic_bgodavar@quicinc.com> Signed-off-by: Cheney Ni <cheneyni@google.com>
2022-03-02btpower: apply Bucks pinctrl default stateCheney Ni
Initialze the state of GPIO pin which controls BT Buck. Bug: 220142775 Bug: 214321488 Bug: 216250741 Test: Pass Bluetooth ON / OFF tests Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: I97077b52b821303c3e93245f6e1b7f9fe43d8433
2022-02-18btpower: apply preferred BT pinctrl stateCheney Ni
Configure our power GPIO pins while probing to prevent from unexpected hardware errors. Bug: 220142775 Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: I390e02c402250f7d52f7dc0188e2eecdf51154ef
2021-12-22btpower: control GPIO to enable BUCK for BT AONCheney Ni
Enable the BUCK while Bluetooth is enabled, and keep it as ON. Bug: 202098667 Test: manually Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: I3bd36762f34e21c213edfdecb17510e33f2d5051
2021-12-11btpower: Report idle state to platform peripheral busCheney Ni
This holds the UART resource when BT is running, and must refine with the OOBS solution. Bug: 202113218 Bug: 202091533 Test: manually Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: Ibcfe8c39cbb68463bf555535bbdd6fb04ecc8374
2021-12-11btpower: Being compatible with WCN6740Cheney Ni
Bug: 202113218 Test: manually Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: I5e60598d4ca8bac774b0f424a2a6f23d30cab03d
2021-12-11btpower: acquire GPIO while probingCheney Ni
Allocate all necessary GPIO pins specified at the device tree while this driver probing, error out if any failure, and release them while removing the driver. There are two macro helpers for setting and getting GPIO values. Bug: 202113218 Test: manually Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: Ie0fbe12352eb73d983cf1a6fe4bddd74d5b55b00
2021-12-08btpower: Embeds cdev within driver data structureCheney Ni
In order to access driver data inside file ioctl calls, this CL embeds the cdev within the driver data structure, and converts to the whole driver data while file opening. The global driver data is no longer used. Bug: 202113218 Test: manually Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: I45ebda47d04d44ed1ea02262a14f7723b33b675b
2021-12-08btpower: align the coding styleCheney Ni
Bug: 202113218 Test: manually Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: I62ed08093815f29f17e1bf69e9fa40a8a845d4f2
2021-11-20Bluetooth: Add format specifierBalakrishna Godavarthi
This patch adds format specifier corresponding to arguments passed to print debug logs. Change-Id: Iff586dd827037cca3419e1c3c9822d2637ef94aa Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org> Signed-off-by: Cheney Ni <cheneyni@google.com>
2021-11-16btpower: Initialize QTI Bluetooth power driverCheney Ni
Kernel AU Tag: AU_LINUX_KERNEL.PLATFORM.1.0.R1.00.00.00.000.046 Bug: 202113218 Test: manually Signed-off-by: Cheney Ni <cheneyni@google.com> Change-Id: Iedb5bab63f04410a4da25a9b2334c454d71d4dea