Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4021276imm; Sat, 25 Aug 2018 07:28:08 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdaut4aooR01uza08ZBqM7AwumWeQYSgArdbsek5tUevC2ikIR9TZAJPWNqysKSjVUh1YibX X-Received: by 2002:a63:dc17:: with SMTP id s23-v6mr6004906pgg.40.1535207288365; Sat, 25 Aug 2018 07:28:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535207288; cv=none; d=google.com; s=arc-20160816; b=xBUu6RGpjJYkDUZ4jwnDo3UurLHxOHUN/bTvYQnANkhLba74z/oXrqERM3nuWZTead wdPQ2MRtimqoWo2LtRqU3hpplhkxU+HRjaMbF3mj6c08RFV2/bB7JR1H1BiN2QyZzETA Ds3fbk7ZwIqIEM6TkGe+HJo6JEvyaZnjKo1hJXD6BibHpzgUzaY66zvnBdHw0+lHSwHo 3O1m0G93yEvQmzwBSSvl6z1y0fHFYDzFbilcjL5+r1Cxz7tzhAzty0XqAxtbxqLB6zJF WYvA7TtRkd15RBR7fo2CTXPh9XnbpVTTJTlvo52/I6+KZ3+PyIOx2LuZfMc74Iw0SNfV zDlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:from :references:cc:to:subject:arc-authentication-results; bh=BAQ9yfPkgmfbM6Op3LFiAc2Q1wUi5kQUcGRZ+TFOpzc=; b=CICWfEdinzvuTGyUI750N6SRreuBeVGNrRfxUBtmWiA/4buq9gC6EXH7xLGL/I32i4 bQCmEP1q29RsRh7jzqKYdYEkp/AiroAIilwrxVrKJ8M76cjC+/tDwfiBkPg8t7qXLg3o xID0r492MVvqai8anKrpeaHajUjr+G1XaYawva2uYNmFnPV7nWTXQMnBHnheOkiRR1HB m44nFrOf+/OHXXesst8bbzLJuJFtFnKg1cOm75lXAKh7sFr0pKyDlj/b8wOW5dS4ICW4 YRtKgRqKYoXyQivjAfP7RPRWb1xGBKFOdIqW+SFYQ8qrpa7fIAoJu5RtcK0DvMCvhwz7 Dgxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4-v6si10306795pgk.630.2018.08.25.07.27.50; Sat, 25 Aug 2018 07:28:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbeHYSFu (ORCPT + 99 others); Sat, 25 Aug 2018 14:05:50 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:47984 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbeHYSFu (ORCPT ); Sat, 25 Aug 2018 14:05:50 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 4239E48CB5; Sat, 25 Aug 2018 16:26:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id wRpLuhN9WlgT; Sat, 25 Aug 2018 16:26:39 +0200 (CEST) Subject: Re: [PATCH] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3 To: Tuomas Tynkkynen , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org References: <20180819192023.18463-1-tuomas.tynkkynen@iki.fi> From: Hauke Mehrtens Message-ID: <8b81db2e-050f-c467-04b5-d81244f2f500@hauke-m.de> Date: Sat, 25 Aug 2018 16:26:38 +0200 MIME-Version: 1.0 In-Reply-To: <20180819192023.18463-1-tuomas.tynkkynen@iki.fi> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/19/2018 09:20 PM, Tuomas Tynkkynen wrote: > Setting GPIO 21 high seems to be required to enable power to USB ports > on the WNDR3400v3. As there is already similar code for WNR3500L, > make the existing USB power GPIO code generic and use that. > > Signed-off-by: Tuomas Tynkkynen I didn't runtime tested this and didn't checked the board, but this looks good. Acked-by: Hauke Mehrtens > --- > arch/mips/bcm47xx/workarounds.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/arch/mips/bcm47xx/workarounds.c b/arch/mips/bcm47xx/workarounds.c > index 1a8a07e7a563..46eddbec8d9f 100644 > --- a/arch/mips/bcm47xx/workarounds.c > +++ b/arch/mips/bcm47xx/workarounds.c > @@ -5,9 +5,8 @@ > #include > #include > > -static void __init bcm47xx_workarounds_netgear_wnr3500l(void) > +static void __init bcm47xx_workarounds_enable_usb_power(int usb_power) > { > - const int usb_power = 12; > int err; > > err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power"); > @@ -23,7 +22,10 @@ void __init bcm47xx_workarounds(void) > > switch (board) { > case BCM47XX_BOARD_NETGEAR_WNR3500L: > - bcm47xx_workarounds_netgear_wnr3500l(); > + bcm47xx_workarounds_enable_usb_power(12); > + break; > + case BCM47XX_BOARD_NETGEAR_WNDR3400_V3: > + bcm47xx_workarounds_enable_usb_power(21); > break; > default: > /* No workaround(s) needed */ >