03_gpio_switches 735 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. rb-951ui-2nd)
  27. ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "45" "1"
  28. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "14"
  29. ;;
  30. esac
  31. board_config_flush
  32. exit 0