bluetooth-power.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. #ifndef __LINUX_BLUETOOTH_POWER_H
  15. #define __LINUX_BLUETOOTH_POWER_H
  16. /*
  17. * voltage regulator information required for configuring the
  18. * bluetooth chipset
  19. */
  20. struct bt_power_vreg_data {
  21. /* voltage regulator handle */
  22. struct regulator *reg;
  23. /* regulator name */
  24. const char *name;
  25. /* voltage levels to be set */
  26. unsigned int low_vol_level;
  27. unsigned int high_vol_level;
  28. /*
  29. * is set voltage supported for this regulator?
  30. * false => set voltage is not supported
  31. * true => set voltage is supported
  32. *
  33. * Some regulators (like gpio-regulators, LVS (low voltage swtiches)
  34. * PMIC regulators) dont have the capability to call
  35. * regulator_set_voltage or regulator_set_optimum_mode
  36. * Use this variable to indicate if its a such regulator or not
  37. */
  38. bool set_voltage_sup;
  39. /* is this regulator enabled? */
  40. bool is_enabled;
  41. };
  42. /*
  43. * Platform data for the bluetooth power driver.
  44. */
  45. struct bluetooth_power_platform_data {
  46. /* Bluetooth reset gpio */
  47. int bt_gpio_sys_rst;
  48. /* VDDIO voltage regulator */
  49. struct bt_power_vreg_data *bt_vdd_io;
  50. /* VDD_PA voltage regulator */
  51. struct bt_power_vreg_data *bt_vdd_pa;
  52. /* VDD_LDOIN voltage regulator */
  53. struct bt_power_vreg_data *bt_vdd_ldo;
  54. /* Optional: chip power down gpio-regulator
  55. * chip power down data is required when bluetooth module
  56. * and other modules like wifi co-exist in a single chip and
  57. * shares a common gpio to bring chip out of reset.
  58. */
  59. struct bt_power_vreg_data *bt_chip_pwd;
  60. /* Optional: Bluetooth power setup function */
  61. int (*bt_power_setup) (int);
  62. };
  63. #endif /* __LINUX_BLUETOOTH_POWER_H */