03_gpio_switches 581 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2015 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. . /lib/ar71xx.sh
  7. board_config_update
  8. board=$(ar71xx_board_name)
  9. case "$board" in
  10. nanostation-m)
  11. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
  12. ;;
  13. nanostation-m-xw)
  14. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
  15. ;;
  16. cpe210|\
  17. cpe510|\
  18. wbs210|\
  19. wbs510)
  20. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
  21. ;;
  22. rb-912uag-2hpnd|\
  23. rb-912uag-5hpnd)
  24. ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "52" "1"
  25. ;;
  26. esac
  27. board_config_flush
  28. exit 0