]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blame - arch/mips/bcm47xx/workarounds.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-disco-kernel.git] / arch / mips / bcm47xx / workarounds.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
a2bec078
RM
2#include "bcm47xx_private.h"
3
4#include <linux/gpio.h>
5#include <bcm47xx_board.h>
6#include <bcm47xx.h>
7
8static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
9{
10 const int usb_power = 12;
11 int err;
12
13 err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
14 if (err)
15 pr_err("Failed to request USB power gpio: %d\n", err);
16 else
17 gpio_free(usb_power);
18}
19
20void __init bcm47xx_workarounds(void)
21{
22 enum bcm47xx_board board = bcm47xx_board_get();
23
24 switch (board) {
25 case BCM47XX_BOARD_NETGEAR_WNR3500L:
26 bcm47xx_workarounds_netgear_wnr3500l();
27 break;
28 default:
29 /* No workaround(s) needed */
30 break;
31 }
32}