rfkill-regulator.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * rfkill-regulator.c - Regulator consumer driver for rfkill
  3. *
  4. * Copyright (C) 2009 Guiming Zhuo <gmzhuo@gmail.com>
  5. * Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. */
  12. #ifndef __LINUX_RFKILL_REGULATOR_H
  13. #define __LINUX_RFKILL_REGULATOR_H
  14. /*
  15. * Use "vrfkill" as supply id when declaring the regulator consumer:
  16. *
  17. * static struct regulator_consumer_supply pcap_regulator_V6_consumers [] = {
  18. * { .dev_name = "rfkill-regulator.0", .supply = "vrfkill" },
  19. * };
  20. *
  21. * If you have several regulator driven rfkill, you can append a numerical id to
  22. * .dev_name as done above, and use the same id when declaring the platform
  23. * device:
  24. *
  25. * static struct rfkill_regulator_platform_data ezx_rfkill_bt_data = {
  26. * .name = "ezx-bluetooth",
  27. * .type = RFKILL_TYPE_BLUETOOTH,
  28. * };
  29. *
  30. * static struct platform_device a910_rfkill = {
  31. * .name = "rfkill-regulator",
  32. * .id = 0,
  33. * .dev = {
  34. * .platform_data = &ezx_rfkill_bt_data,
  35. * },
  36. * };
  37. */
  38. #include <linux/rfkill.h>
  39. struct rfkill_regulator_platform_data {
  40. char *name; /* the name for the rfkill switch */
  41. enum rfkill_type type; /* the type as specified in rfkill.h */
  42. };
  43. #endif /* __LINUX_RFKILL_REGULATOR_H */