gpio-fan.h 802 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * include/linux/gpio-fan.h
  3. *
  4. * Platform data structure for GPIO fan driver
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #ifndef __LINUX_GPIO_FAN_H
  11. #define __LINUX_GPIO_FAN_H
  12. struct gpio_fan_alarm {
  13. unsigned gpio;
  14. unsigned active_low;
  15. };
  16. struct gpio_fan_speed {
  17. int rpm;
  18. int ctrl_val;
  19. };
  20. struct gpio_fan_platform_data {
  21. int num_ctrl;
  22. unsigned *ctrl; /* fan control GPIOs. */
  23. struct gpio_fan_alarm *alarm; /* fan alarm GPIO. */
  24. /*
  25. * Speed conversion array: rpm from/to GPIO bit field.
  26. * This array _must_ be sorted in ascending rpm order.
  27. */
  28. int num_speed;
  29. struct gpio_fan_speed *speed;
  30. };
  31. #endif /* __LINUX_GPIO_FAN_H */