vfs: Make __vfs_write() static
[linux/fpc-iii.git] / arch / mips / bcm47xx / workarounds.c
blob46eddbec8d9fdec090ee273e1e5ba3cd573ba612
1 // SPDX-License-Identifier: GPL-2.0
2 #include "bcm47xx_private.h"
4 #include <linux/gpio.h>
5 #include <bcm47xx_board.h>
6 #include <bcm47xx.h>
8 static void __init bcm47xx_workarounds_enable_usb_power(int usb_power)
10 int err;
12 err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
13 if (err)
14 pr_err("Failed to request USB power gpio: %d\n", err);
15 else
16 gpio_free(usb_power);
19 void __init bcm47xx_workarounds(void)
21 enum bcm47xx_board board = bcm47xx_board_get();
23 switch (board) {
24 case BCM47XX_BOARD_NETGEAR_WNR3500L:
25 bcm47xx_workarounds_enable_usb_power(12);
26 break;
27 case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
28 bcm47xx_workarounds_enable_usb_power(21);
29 break;
30 default:
31 /* No workaround(s) needed */
32 break;