From patchwork Fri Mar 29 09:33:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10876721 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 80852139A for ; Fri, 29 Mar 2019 09:34:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67C77290BB for ; Fri, 29 Mar 2019 09:34:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C12F290D8; Fri, 29 Mar 2019 09:34:58 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0EA17290BB for ; Fri, 29 Mar 2019 09:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V17+3MYBgzo3rk+T3zuYHuqiCQjOXumwLViuSFmY6BQ=; b=szQ3/zd1jtIXb9 E4XpcjP7Cdve2VsiA9kU5orvBKS4KyNFxiRgSo8/zhyhwkav9Zd8z7qrQMVNDDOjOVR1tO1XSR/XG sdRBf802T0nsLRkzcF5J+e/n1JmQlCB6hetrOCrQzq1rKzLAxBBRvzepOgq1NUGbscqWMqL5QJAEg Wn+oYGmt45vnhpLh92yiZl4VjLP+BnTNBX1oArwq0ALdRKJWFIyfDtWYkFrgZW9ZxCKgci7gWE0m6 KBpPRyxzlHSuP8uZzooqCGWV74d2zxNp8vZSlbusc0Uls/Qm50IUXW3XEFGCEc+5xiVnRRT6CxD11 iLo1WsBbWdfIvh/zQaRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9nuZ-0002uT-Ky; Fri, 29 Mar 2019 09:34:55 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9ntW-0001XW-If for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2019 09:33:54 +0000 Received: by mail-wr1-x442.google.com with SMTP id y13so1727051wrd.3 for ; Fri, 29 Mar 2019 02:33:50 -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=GP71nrEz2X3rw8lQrVpt+CoiTCN65NyK/tNcu9jk+HM=; b=dPoePFfuN4kBvyabdGTpC3H2E0TFZ2RIh1sUkDEajwe6gyeyIDKQCtj6SBh8WBjg6q 9g8yAQ7YtC5Zphy68e/UDohmEh50c8yrmgICTE+52kGMLdSKtvCvDqO3Yv5tK/vpMNK8 XNDR9sXOVasozdiRyAiu6+lo++5VdekKialK3tsX17V1Bi/PruMptVBl3UkO9KZbAdGW o3Rm3HEJP43/vPD9T1ODdryZduS7xTX7lZ2V3+LBExU6/Ny6JUE6hbju0+UFq4rVsoEb NS6qHudSnnvDnZjsJBSrZksEUhbmH/X6JVDfb8gafgMAVKxiRTdpvt1z0JsyGiZ9dmq0 a3qg== 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=GP71nrEz2X3rw8lQrVpt+CoiTCN65NyK/tNcu9jk+HM=; b=gXrDQTDVgmckQCncikbrrbzGwGiyZgAA5IomXXjQz30TXn7B5sa6evvdtxIZ1TcDi+ ndEl30pRnXqMOCsxxv1b7/WTCKNJ5V+u8PNTxT/LB5a8OHi52u6YMkoGMpBSWRhOpAFA WghnVs9YrmfCOHBEMF6HjkPwhkr7dUhIMi+r3RNKX8hXLxaoBdOEQEOiAd7Aw1aPM8eI YdkwwLGIyquI2T8Ncs8buBSI7YjAuKe11qMeJ3o45Vo/eL6X+CSYWx/IANvdQ/ooK3rp dCjIPKBpp4L/GhPu+tYjWqLBCy5Ff1V11f0HUqdqVQSKvE+KQTEQFoeZ3KyhdQuaIpI1 23WA== X-Gm-Message-State: APjAAAXccVfpBmYSt5SyVGPFEKDRH6LbdWCitTX5AIzm8pdgK1KIcsZ4 XhtrM0l2aH8SzAcUGweMktsoLw== X-Google-Smtp-Source: APXvYqx2tOQhgDugwDc3oTfArC3GBendxfodPg6UHJto8zVnrsKrIOmsARKO7o8B0TARyoTapdtG5A== X-Received: by 2002:adf:fc0b:: with SMTP id i11mr31002027wrr.145.1553852029302; Fri, 29 Mar 2019 02:33:49 -0700 (PDT) Received: from localhost.localdomain (aputeaux-684-1-29-77.w90-86.abo.wanadoo.fr. [90.86.254.77]) by smtp.gmail.com with ESMTPSA id s12sm1957125wmj.42.2019.03.29.02.33.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Mar 2019 02:33:48 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 6/6] usb: ohci-da8xx: drop the vbus GPIO Date: Fri, 29 Mar 2019 10:33:34 +0100 Message-Id: <20190329093334.3885-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190329093334.3885-1-brgl@bgdev.pl> References: <20190329093334.3885-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190329_023350_724589_06E94035 X-CRM114-Status: GOOD ( 13.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 --- 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 35eb2cb96a8f..ef27f9126cca 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; @@ -207,9 +195,7 @@ static irqreturn_t ohci_da8xx_oc_handler(int irq, void *data) struct da8xx_ohci_hcd *da8xx_ohci = data; if (gpiod_get_value(da8xx_ohci->oc_gpio)) { - if (da8xx_ohci->vbus_gpio) - gpiod_set_value(da8xx_ohci->vbus_gpio, 0); - else if (da8xx_ohci->vbus_reg) + if (da8xx_ohci->vbus_reg) return IRQ_WAKE_THREAD; } @@ -437,11 +423,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;