03_gpio_switches 826 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2015 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. board_config_update
  7. board=$(board_name)
  8. case "$board" in
  9. cpe210|\
  10. cpe510|\
  11. wbs210|\
  12. wbs510)
  13. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
  14. ;;
  15. nanostation-m)
  16. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
  17. ;;
  18. nanostation-m-xw)
  19. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
  20. ;;
  21. rb-912uag-2hpnd|\
  22. rb-912uag-5hpnd)
  23. ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "61" "1"
  24. ;;
  25. rb-750up-r2|\
  26. rb-951ui-2nd|\
  27. rb-952ui-5ac2nd)
  28. ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "45" "1"
  29. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "14"
  30. ;;
  31. rb-750p-pbr2)
  32. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "14"
  33. ;;
  34. esac
  35. board_config_flush
  36. exit 0