Ram Mohan Korukonda | 964484e | 2013-04-11 00:52:26 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | */ |
| 14 | |
| 15 | #ifndef __LINUX_BLUETOOTH_POWER_H |
| 16 | #define __LINUX_BLUETOOTH_POWER_H |
| 17 | |
| 18 | /* |
| 19 | * voltage regulator information required for configuring the |
| 20 | * bluetooth chipset |
| 21 | */ |
| 22 | struct bt_power_vreg_data { |
| 23 | /* voltage regulator handle */ |
| 24 | struct regulator *reg; |
| 25 | /* regulator name */ |
| 26 | const char *name; |
| 27 | /* voltage levels to be set */ |
| 28 | unsigned int low_vol_level; |
| 29 | unsigned int high_vol_level; |
| 30 | /* |
| 31 | * is set voltage supported for this regulator? |
| 32 | * false => set voltage is not supported |
| 33 | * true => set voltage is supported |
| 34 | * |
| 35 | * Some regulators (like gpio-regulators, LVS (low voltage swtiches) |
| 36 | * PMIC regulators) dont have the capability to call |
| 37 | * regulator_set_voltage or regulator_set_optimum_mode |
| 38 | * Use this variable to indicate if its a such regulator or not |
| 39 | */ |
| 40 | bool set_voltage_sup; |
| 41 | /* is this regulator enabled? */ |
| 42 | bool is_enabled; |
| 43 | }; |
| 44 | |
| 45 | /* |
| 46 | * Platform data for the bluetooth power driver. |
| 47 | */ |
| 48 | struct bluetooth_power_platform_data { |
| 49 | /* Bluetooth reset gpio */ |
| 50 | int bt_gpio_sys_rst; |
| 51 | /* VDDIO voltage regulator */ |
| 52 | struct bt_power_vreg_data *bt_vdd_io; |
| 53 | /* VDD_PA voltage regulator */ |
| 54 | struct bt_power_vreg_data *bt_vdd_pa; |
| 55 | /* VDD_LDOIN voltage regulator */ |
| 56 | struct bt_power_vreg_data *bt_vdd_ldo; |
| 57 | /* Optional: chip power down gpio-regulator |
| 58 | * chip power down data is required when bluetooth module |
| 59 | * and other modules like wifi co-exist in a single chip and |
| 60 | * shares a common gpio to bring chip out of reset. |
| 61 | */ |
| 62 | struct bt_power_vreg_data *bt_chip_pwd; |
| 63 | /* Optional: Bluetooth power setup function */ |
| 64 | int (*bt_power_setup) (int); |
| 65 | }; |
| 66 | |
| 67 | #endif /* __LINUX_BLUETOOTH_POWER_H */ |