2b18741cd93679ff14b5e197c5537fae63049d40
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / etc / board.d / 03_gpio_switches
1 #!/bin/sh
2 #
3 # Copyright (C) 2015 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7 . /lib/ar71xx.sh
8
9 board_config_update
10
11 board=$(ar71xx_board_name)
12
13 case "$board" in
14 nanostation-m)
15 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "8"
16 ;;
17 nanostation-m-xw)
18 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "2"
19 ;;
20 cpe210|\
21 cpe510|\
22 wbs210|\
23 wbs510)
24 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
25 ;;
26 rb-912uag-2hpnd|\
27 rb-912uag-5hpnd)
28 ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "52" "1"
29 ;;
30 rb-750up-r2|\
31 rb-951ui-2nd|\
32 rb-952ui-5ac2nd)
33 ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "45" "1"
34 ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "14"
35 ;;
36 esac
37
38 board_config_flush
39
40 exit 0