Files
android_kernel_fxtec_sm6115/include/linux/bluetooth-power.h
Mahesh Kumar Sharma 992c24f46d bluetooth: Add bluetooth power on/off kernel drivers
-Includes BT power on/off driver.
-Update SPDX license.

Change-Id: I1401a25b768ece59bbcd465349e7a9a78abf0c95
Signed-off-by: Mahesh kumar sharma <smahesh@codeaurora.org>
2019-01-12 11:47:43 -08:00

81 lines
2.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
*/
#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;
/* current level to be set */
unsigned int load_uA;
/*
* 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;
};
struct bt_power_clk_data {
/* clock regulator handle */
struct clk *clk;
/* clock name */
const char *name;
/* is this clock enabled? */
bool is_enabled;
};
/*
* Platform data for the bluetooth power driver.
*/
struct bluetooth_power_platform_data {
/* Bluetooth reset gpio */
int bt_gpio_sys_rst;
struct device *slim_dev;
/* 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;
/* bluetooth reference clock */
struct bt_power_clk_data *bt_chip_clk;
/* Optional: Bluetooth power setup function */
int (*bt_power_setup)(int id);
};
int bt_register_slimdev(struct device *dev);
#define BT_CMD_SLIM_TEST 0xbfac
#define BT_CMD_PWR_CTRL 0xbfad
#endif /* __LINUX_BLUETOOTH_POWER_H */