Merge "Add support to vote for SMPS"

This commit is contained in:
qctecmdr 2021-06-30 05:37:35 -07:00 • committed by Gerrit - the friendly Code Review server
commit d9d62284f5
2 changed files with 19 additions and 11 deletions

View file

@ -32,12 +32,6 @@
#endif
#include <linux/fs.h>
#define PWR_SRC_STATUS_SET(index, status) do { \
if (index >= PWR_SRC_INIT_STATE_IDX && index < BT_POWER_SRC_SIZE) { \
bt_power_src_status[index] = (int) status; \
} \
} while (0)
#define PWR_SRC_NOT_AVAILABLE -2
#define DEFAULT_INVALID_VALUE -1
#define PWR_SRC_INIT_STATE_IDX 0
@ -76,9 +70,24 @@ enum power_src_pos {
BT_VDD_RFA_0p8_CURRENT,
BT_VDD_RFACMN_CURRENT,
BT_VDD_IPA_2p2,
BT_VDD_IPA_2p2_CURRENT
BT_VDD_IPA_2p2_CURRENT,
/* The below bucks are voted for HW WAR on some platform which supports
* WNC39xx.
*/
BT_VDD_SMPS,
BT_VDD_SMPS_CURRENT,
/* New entries need to be added before PWR_SRC_SIZE.
* Its hold the max size of power sources states.
*/
BT_POWER_SRC_SIZE,
};
#define PWR_SRC_STATUS_SET(index, status) do { \
if (index >= PWR_SRC_INIT_STATE_IDX && index < BT_POWER_SRC_SIZE) { \
bt_power_src_status[index] = (int) status; \
} \
} while (0)
// Regulator structure for QCA6174/QCA9377/QCA9379 BT SoC series
static struct bt_power_vreg_data bt_vregs_info_qca61x4_937x[] = {
{NULL, "qcom,bt-vdd-aon", 928000, 928000, 0, false, false,
@ -116,6 +125,8 @@ static struct bt_power_vreg_data bt_vregs_info_qca6xx0[] = {
static struct bt_power bt_vreg_info_wcn399x = {
.compatible = "qcom,wcn3990",
.vregs = (struct bt_power_vreg_data []) {
{NULL, "qcom,bt-vdd-smps", 984000, 984000, 0, false, false,
{BT_VDD_SMPS, BT_VDD_SMPS_CURRENT}},
{NULL, "qcom,bt-vdd-io", 1700000, 1900000, 0, false, false,
{BT_VDD_IO_LDO, BT_VDD_IO_LDO_CURRENT}},
{NULL, "qcom,bt-vdd-core", 1304000, 1304000, 0, false, false,
@ -125,7 +136,7 @@ static struct bt_power bt_vreg_info_wcn399x = {
{NULL, "qcom,bt-vdd-xtal", 1700000, 1900000, 0, false, false,
{BT_VDD_XTAL_LDO, BT_VDD_XTAL_LDO_CURRENT}},
},
.num_vregs = 4,
.num_vregs = 5,
};
static struct bt_power bt_vreg_info_qca_auto = {

View file

@ -89,7 +89,4 @@ int btpower_get_chipset_version(void);
#define TCS_CMD_IO_ADDR_OFFSET 0x4
/* total number of power src */
#define BT_POWER_SRC_SIZE 30
#endif /* __LINUX_BLUETOOTH_POWER_H */