From patchwork Tue Apr 9 08:28:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10890693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D13EE17E6 for ; Tue, 9 Apr 2019 08:29:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBCA028814 for ; Tue, 9 Apr 2019 08:29:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B020C2881A; Tue, 9 Apr 2019 08:29:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4439228814 for ; Tue, 9 Apr 2019 08:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726849AbfDII3R (ORCPT ); Tue, 9 Apr 2019 04:29:17 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33268 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbfDII3I (ORCPT ); Tue, 9 Apr 2019 04:29:08 -0400 Received: by mail-wr1-f65.google.com with SMTP id q1so19704856wrp.0 for ; Tue, 09 Apr 2019 01:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p38pAuvIEjPOoMJmacPqD0dwSx+AzVUQhdkwsmJTYSE=; b=MBfSNNswpjRwqServDNjI2/BOiIcx9EC0oB1tqAD7fGW2Oowkm0RWHTlbKrCzhvsix 0qy6xl8hhcUflELsLM2TQ9euS4q4Vr74Z6VlpX7DMAsRWqpl57h3aQb8CODjQLwmIqt7 mwUIr3o4CyVQNSLQEG1To6NiOhVCR27Bz/jrjfAY7Psvg5ilDPHaXnKoUjaOt0zzT0RY 9btINSJ2H3Cf3/0FzIlZLr0yrYn3Lmj3TvvY5gCaExsktVo5MHRwlIzQPUAPq17lmzES lScDYTVOZ43XjZMugEZTS4swgXx/G2dqXLWTX2gHboK4RdWYYpxTA1u/oodqSkk2AKlx 3D3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p38pAuvIEjPOoMJmacPqD0dwSx+AzVUQhdkwsmJTYSE=; b=UurIh6bDtFBMGASrz3uFSfhiKqf/mfRNgGOkfBTcKC1SThfv09BTLdeGQ8pihVqqrN e31/yKJhNtk/6ovZa0AwAkEsdat4p1ZYjW7wgFzvmine8hin74S8dCSsettmlkXfD1ZU MCYavOdnKp+tGicsSftqwJ7L5IbQR9o7o2sosioUDlEKWvhE/0dBTFYisgoQuItanhpy k2Bm+HYjbhW9ozmVHwnujPtBlfpn+ZHibGHKhZZl/EwNTiHcBG0e3I+w4AuBhQogMQy/ uBUyYXJv7MO0IxbmpNF4hcTqpeV7UYhQwPOSYJMdcZT9Vc5gx2Fna/tTmWIr21AF4LP5 XvQA== X-Gm-Message-State: APjAAAXu/UgaUNky7cC8s7h5FBaY2l2nNGqW481Zp8VAbnfedq5Ni3ME 1AWTgjLMOvlx9fXYjSGodrDKoQ== X-Google-Smtp-Source: APXvYqwuqt0Q4a6XDmiEQ2O+wNjRnHQZTa83jRtPmEs026IXU9oxqaWK/TDBjMKzdwmzTeqqwOu5EQ== X-Received: by 2002:adf:fec3:: with SMTP id q3mr22158011wrs.173.1554798547426; Tue, 09 Apr 2019 01:29:07 -0700 (PDT) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id c20sm59968651wre.28.2019.04.09.01.29.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Apr 2019 01:29:06 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 6/6] usb: ohci-da8xx: drop the vbus GPIO Date: Tue, 9 Apr 2019 10:28:55 +0200 Message-Id: <20190409082855.15373-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190409082855.15373-1-brgl@bgdev.pl> References: <20190409082855.15373-1-brgl@bgdev.pl> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski All users now setup a fixed regulator for the vbus supply. We can drop the vbus GPIO code. Signed-off-by: Bartosz Golaszewski Acked-by: Alan Stern --- drivers/usb/host/ohci-da8xx.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index 108fe0a1b962..9d1157beb508 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -40,7 +40,6 @@ struct da8xx_ohci_hcd { struct phy *usb11_phy; struct regulator *vbus_reg; struct notifier_block nb; - struct gpio_desc *vbus_gpio; struct gpio_desc *oc_gpio; }; @@ -91,11 +90,6 @@ static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) struct device *dev = hcd->self.controller; int ret; - if (da8xx_ohci->vbus_gpio) { - gpiod_set_value_cansleep(da8xx_ohci->vbus_gpio, on); - return 0; - } - if (!da8xx_ohci->vbus_reg) return 0; @@ -120,9 +114,6 @@ static int ohci_da8xx_get_power(struct usb_hcd *hcd) { struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); - if (da8xx_ohci->vbus_gpio) - return gpiod_get_value_cansleep(da8xx_ohci->vbus_gpio); - if (da8xx_ohci->vbus_reg) return regulator_is_enabled(da8xx_ohci->vbus_reg); @@ -155,9 +146,6 @@ static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) { struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); - if (da8xx_ohci->vbus_gpio) - return 1; - if (da8xx_ohci->vbus_reg) return 1; @@ -209,9 +197,7 @@ static irqreturn_t ohci_da8xx_oc_thread(int irq, void *data) int ret; if (gpiod_get_value_cansleep(da8xx_ohci->oc_gpio)) { - if (da8xx_ohci->vbus_gpio) { - gpiod_set_value_cansleep(da8xx_ohci->vbus_gpio, 0); - } else if (da8xx_ohci->vbus_reg) { + if (da8xx_ohci->vbus_reg) { ret = regulator_disable(da8xx_ohci->vbus_reg); if (ret) dev_err(dev, @@ -432,11 +418,6 @@ static int ohci_da8xx_probe(struct platform_device *pdev) } } - da8xx_ohci->vbus_gpio = devm_gpiod_get_optional(dev, "vbus", - GPIOD_OUT_HIGH); - if (IS_ERR(da8xx_ohci->vbus_gpio)) - goto err; - da8xx_ohci->oc_gpio = devm_gpiod_get_optional(dev, "oc", GPIOD_IN); if (IS_ERR(da8xx_ohci->oc_gpio)) goto err;