summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSungjun Park <sjpark@codeaurora.org>2016-03-18 13:43:37 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:26:09 -0700
commite297c9b6413bdc082ea1f3134e317ac123f84ee1 (patch)
tree0014bed6511aa1e90250be2446b053bdd5ea4d8b /include/linux
parent2e4ef2d3dc44cc494dd3780abdd00abd2b6c0be7 (diff)
bluetooth: Add snapshot of bluetooth driver
This snapshot is taken as of msm-3.18 commit d580948 (Merge "msm: ipa: fix race condition when teardown pipe") Signed-off-by: Sungjun Park <sjpark@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bluetooth-power.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/include/linux/bluetooth-power.h b/include/linux/bluetooth-power.h
new file mode 100644
index 000000000000..a411520a83b2
--- /dev/null
+++ b/include/linux/bluetooth-power.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2013-2016, 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.
+ *
+ */
+
+#ifndef __LINUX_BLUETOOTH_POWER_H
+#define __LINUX_BLUETOOTH_POWER_H
+
+/*
+ * voltage regulator information required for configuring the
+ * bluetooth chipset
+ */
+struct bt_power_vreg_data {
+ /* voltage regulator handle */
+ struct regulator *reg;
+ /* regulator name */
+ const char *name;
+ /* voltage levels to be set */
+ unsigned int low_vol_level;
+ unsigned int high_vol_level;
+ /*
+ * is set voltage supported for this regulator?
+ * false => set voltage is not supported
+ * true => set voltage is supported
+ *
+ * Some regulators (like gpio-regulators, LVS (low voltage swtiches)
+ * PMIC regulators) dont have the capability to call
+ * regulator_set_voltage or regulator_set_optimum_mode
+ * Use this variable to indicate if its a such regulator or not
+ */
+ bool set_voltage_sup;
+ /* is this regulator enabled? */
+ bool is_enabled;
+};
+
+/*
+ * Platform data for the bluetooth power driver.
+ */
+struct bluetooth_power_platform_data {
+ /* Bluetooth reset gpio */
+ int bt_gpio_sys_rst;
+ /* VDDIO voltage regulator */
+ struct bt_power_vreg_data *bt_vdd_io;
+ /* VDD_PA voltage regulator */
+ struct bt_power_vreg_data *bt_vdd_pa;
+ /* VDD_LDOIN voltage regulator */
+ struct bt_power_vreg_data *bt_vdd_ldo;
+ /* VDD_XTAL voltage regulator */
+ struct bt_power_vreg_data *bt_vdd_xtal;
+ /* VDD_CORE voltage regulator */
+ struct bt_power_vreg_data *bt_vdd_core;
+ /* Optional: chip power down gpio-regulator
+ * chip power down data is required when bluetooth module
+ * and other modules like wifi co-exist in a single chip and
+ * shares a common gpio to bring chip out of reset.
+ */
+ struct bt_power_vreg_data *bt_chip_pwd;
+ /* Optional: Bluetooth power setup function */
+ int (*bt_power_setup)(int);
+};
+
+#endif /* __LINUX_BLUETOOTH_POWER_H */