03_gpio_switches 743 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. nanostation-m)
  10. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
  11. ;;
  12. nanostation-m-xw)
  13. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
  14. ;;
  15. cpe210|\
  16. cpe510|\
  17. wbs210|\
  18. wbs510)
  19. ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
  20. ;;
  21. rb-912uag-2hpnd|\
  22. rb-912uag-5hpnd)
  23. ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "52" "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. esac
  32. board_config_flush
  33. exit 0