rfkill-gpio.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2011, NVIDIA Corporation.
  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 as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef __RFKILL_GPIO_H
  19. #define __RFKILL_GPIO_H
  20. #include <linux/types.h>
  21. #include <linux/rfkill.h>
  22. /**
  23. * struct rfkill_gpio_platform_data - platform data for rfkill gpio device.
  24. * for unused gpio's, the expected value is -1.
  25. * @name: name for the gpio rf kill instance
  26. * @reset_gpio: GPIO which is used for reseting rfkill switch
  27. * @shutdown_gpio: GPIO which is used for shutdown of rfkill switch
  28. * @power_clk_name: [optional] name of clk to turn off while blocked
  29. * @gpio_runtime_close: clean up platform specific gpio configuration
  30. * @gpio_runtime_setup: set up platform specific gpio configuration
  31. */
  32. struct rfkill_gpio_platform_data {
  33. char *name;
  34. int reset_gpio;
  35. int shutdown_gpio;
  36. const char *power_clk_name;
  37. enum rfkill_type type;
  38. void (*gpio_runtime_close)(struct platform_device *);
  39. int (*gpio_runtime_setup)(struct platform_device *);
  40. };
  41. #endif /* __RFKILL_GPIO_H */