Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef0d4d69 authored by Balakrishna Godavarthi's avatar Balakrishna Godavarthi Committed by Gerrit - the friendly Code Review server
Browse files

Add support to vote for SMPS



This change will add support to vote for SMPS node if regulator
handle is provided in DTS source.

Change-Id: Ib370fd2fecfe04585cd2ab643f597714ead18a93
Signed-off-by: default avatarBalakrishna Godavarthi <bgodavar@codeaurora.org>
parent 774e9013
Loading
Loading
Loading
Loading
+19 −8
Original line number Diff line number Diff line
@@ -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 = {
+0 −3
Original line number Diff line number Diff line
@@ -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 */