From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7304C10F0E for ; Fri, 12 Apr 2019 12:37:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E2EB2186A for ; Fri, 12 Apr 2019 12:37:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iEXd5pzZ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="YG7aeotx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E2EB2186A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=QFGJFhiRyXNSc4/Jne0r9OF3vEF39AIM6SUJ1Tjq0e4=; b=iEXd5pzZhn8beC fCTeM4xjIPVRg+vAUKoZXMeAqtEzG0NhP0xWwJm9/DqqTdZtDdYvjUwqV9UvtrNW9/fXtzHEOcC32 vQH40kukhq4fdVrB3a9MkD19zqqz6T/pt3mZiErF6qFyVxU/Mh52UEFI6bKgA48uvwBTjOA4G0A1l rQ6EJbB6iJfXrJ9+KXm8sXO6edg7eTkQxgV1Ti+5i4yWmygacRy2CUfP/0idEssmKXSrFnMBFMMkz 0x3rRQHIPIRk8KKcuxlm+1/SMq5ssKb1YVbJbmBpwZFfCD7Q+XhAwfaeDqnAGbNkqBDbWeDsCyTy7 XHzcLSVc1pb27tRWUmzw==; 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 1hEvRG-0005h0-8B; Fri, 12 Apr 2019 12:37:50 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEvQK-0004S1-1v for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2019 12:36:57 +0000 Received: by mail-wr1-x443.google.com with SMTP id k11so11753179wro.5 for ; Fri, 12 Apr 2019 05:36:51 -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=h/Q4Spim9Fjjy6MSB+oYYlQqYCUhED1m+pmPurYYc2Y=; b=YG7aeotx3icHw05FTScZXtz6eI0WzRmPR9r6FmonoBSpKAOTJdRkCgx5hYrJ4ueMTy 5jFE2sXMf9uyzDRvuLEzYgDWkJ4kXk6M3eIPBacFPpfE3nrH+0PjH6fRHsxA6p8iUpq2 NsEBllK/RvsUb0h2tR79J0X3h5918f7qm3OUWmjN1jfK7aWhJD3CX9+u4OJogs44XfU9 gLQ5pXtlIVpuVend1DdiQ9as/umwvNamToRP/2cAPtLCpat2QWYQqAwSw4ZzvjazMVo9 XHELA+ILZQuO3XfWbLq1KSP/ag+jz9r+AXXwUKElxgOCphUpxpA3hs4B+GyVwUcAE8z4 76cg== 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=h/Q4Spim9Fjjy6MSB+oYYlQqYCUhED1m+pmPurYYc2Y=; b=RtuHLOJxPgBoVKxOLXFK5j58VVI0x7o4Xkz1/VJzYWgvHCC/R9Qwqq+ZqIw8JUvSKr KSXFqndSa++QQDHt7SXE2nRpr2Qt3y94dXW3LM3SBwAq3OT8jP/BgZ7ctMTFCByOTC69 flogG9eW0ZRIh1jAqcTD6cAcKpTDacwDcqxlHsXyPwdOdQcOyOWogkls9BRCyMOw9Mov e9E85z53qLG6wPydLmL/RVMvC0R8i6shB2QoOrRwHpG64yRE/EccJs35Jh7//oG2L+5L uJbn77EsQ4pEbpt8L6Wa+Igw86qMvbhyLPCHjHQ6ngradKop+1jiCA3KTRnBRVdrE3Nh l2Zg== X-Gm-Message-State: APjAAAXQElNVeN3fq50ikraCrF2kSvA8BesGSwbjIpDx9yXJk3asuE72 vOjFKSgjoHYNK9BfLbiCXHUNYYw3T0c= X-Google-Smtp-Source: APXvYqxUp4JTFAHxNl36SNcbXMkjwbVgonN366UairP79cquPxow05ayhQbaEoIG/Mmfw/Uo1FkIAA== X-Received: by 2002:adf:f1ce:: with SMTP id z14mr35525249wro.152.1555072610418; Fri, 12 Apr 2019 05:36:50 -0700 (PDT) Received: from localhost.localdomain (aputeaux-684-1-35-248.w90-86.abo.wanadoo.fr. [90.86.90.248]) by smtp.gmail.com with ESMTPSA id v190sm12384030wme.18.2019.04.12.05.36.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 05:36:49 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v5 6/6] usb: ohci-da8xx: drop the vbus GPIO Date: Fri, 12 Apr 2019 14:36:40 +0200 Message-Id: <20190412123640.11437-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190412123640.11437-1-brgl@bgdev.pl> References: <20190412123640.11437-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_053652_449759_3DE275E5 X-CRM114-Status: GOOD ( 14.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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index f69b339d45e5..38183ac438c6 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; @@ -208,16 +196,11 @@ static irqreturn_t ohci_da8xx_oc_thread(int irq, void *data) struct device *dev = da8xx_ohci->hcd->self.controller; 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) { - ret = regulator_disable(da8xx_ohci->vbus_reg); - if (ret) - dev_err(dev, - "Failed to disable regulator: %d\n", - ret); - } + if (gpiod_get_value_cansleep(da8xx_ohci->oc_gpio) && + da8xx_ohci->vbus_reg) { + ret = regulator_disable(da8xx_ohci->vbus_reg); + if (ret) + dev_err(dev, "Failed to disable regulator: %d\n", ret); } return IRQ_HANDLED; @@ -431,11 +414,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; -- 2.21.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel