From patchwork Mon Feb 11 10:36: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: 10805483 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 022DD6C2 for ; Mon, 11 Feb 2019 10:37:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4D8629E33 for ; Mon, 11 Feb 2019 10:37:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D646729F4D; Mon, 11 Feb 2019 10:37:24 +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=ham 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 77B3229E33 for ; Mon, 11 Feb 2019 10:37:24 +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=ntiGG97f43KkXNNLQVbBtOrJ1DuPXg7ICS065ynklPo=; b=bedcx73Lk99Ulz wExOhHK+nYOxPO7QdWT7JZRXOAFj7IHA5SCWEAEanDdbpE0Ac5URgiEpbRx62y1YjGNqW76AW+O68 ddkTzfwchmXkyUi/3nvMLP4yg+T7C5uRtKyA5TL7TlXI0n0cWZLe2E9Et4Tk/yRbhComDlLWnTs2A FVdbxlmx0WZbZBKD7xxQooOIfE7jWqRslayhJ1rZV+YUeBMZBiDNtGVTKvYXoOXnMYgLqV1iJ2t5f uoCIQmCreQ/PEJLUCa/uY/JSuuDyb+c9LXRDcEl0wbv1YM1Wj3jLm1Z2TdUT0oDDOhK+mIsfxCVaX QJj59xaYy8BriMWFsw0Q==; 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 1gt8xn-0006jc-1C; Mon, 11 Feb 2019 10:37:23 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gt8xZ-0006Uz-7G for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 10:37:16 +0000 Received: by mail-wm1-x341.google.com with SMTP id x10so10931913wmg.2 for ; Mon, 11 Feb 2019 02:37:08 -0800 (PST) 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=ZNwPEUUTlCKX5Tqu2ze2gsmyzvW07YJCGJtag7575fc=; b=TCld4ftq4o8gIrjIznjZq3jxcUZNeaxWAv8Iw0vN33auSy+j/cBSUURcWRlCrpTsyB tB+fj7UL22HKjx+Ez8cDvi2t/KERMJRTsbklW1HGgHSJawHsbCHqsTNlyEh68oJ5YwGW jKDoDC9+w9yhuGPmx8JFssA9SnzFQFrNdddUGUy7z3gmrkEYjtBilyoWErP5Vou+xDFN in+55gJWdO7Og5X6ajvsiIYxeZMrJ7pwhoJ/VAWYdoZ2vzs/Vqd7YRZJfmxczpC3/gFM uN4O6lx7oRlSqsvABBtqy+GH+FEpQ7ZZuQOQUY2xjZpup6KoFrI8SSasJxw9hI/uFcjP WLoA== 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=ZNwPEUUTlCKX5Tqu2ze2gsmyzvW07YJCGJtag7575fc=; b=I3EHSaVdhiS5mz0AFp5zj/ASknCFbchqfRg5DPiOjasmQjYcNblJSzPvVWXB4+BMxd VvWygpWPO+Nbk1xOEywdF4epNKBGbbpnlkerudux0vqXhyDuIrCLbzuES4S/Fb9ZZbjn zEQskCifE7LGT2PvoakI4D6dqg31i2L9fEmZIwzyA+RipPsvzCGSjmxt3Jna1SXZ9ael oo1nL1DN3af2+dAcPbNTBSQwIOCO9K00IJZsGPMgaLTCB9Iut1f1w0+SISuI4SR5gBtw NKYReRxg19P6dcSFEIrwssRvVZT71xHyFHKBw1sTvdWj0X2EYClnh2h3bkcA52J8QFA0 goBA== X-Gm-Message-State: AHQUAuZju79JOjDszR7xT8VNQwgIUkRriBpeUbktkcKuIer51phJsMDH aZUgpN26PrIqVPneKfZHK4/aSA== X-Google-Smtp-Source: AHgI3IapcLHP60sKSGdnr6I8oTwK59n+VObCekkqjdq2A/HslDpU3Tujq3LohKnrjKJC+aDBWpfZVg== X-Received: by 2002:a1c:7a18:: with SMTP id v24mr8376506wmc.107.1549881427522; Mon, 11 Feb 2019 02:37:07 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id i192sm11121275wmg.7.2019.02.11.02.37.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 02:37:06 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 1/8] usb: ohci-da8xx: add a new line after local variables Date: Mon, 11 Feb 2019 11:36:55 +0100 Message-Id: <20190211103702.4277-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211103702.4277-1-brgl@bgdev.pl> References: <20190211103702.4277-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_023709_885403_60BC1613 X-CRM114-Status: GOOD ( 11.72 ) 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 , Linus Walleij , 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 Add a new line after local variables. This improves the coding style. Signed-off-by: Bartosz Golaszewski Acked-by: Alan Stern --- drivers/usb/host/ohci-da8xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index a55cbba40a5a..c492c7e6f746 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -405,6 +405,7 @@ static int ohci_da8xx_probe(struct platform_device *pdev) struct usb_hcd *hcd; struct resource *mem; int error, irq; + hcd = usb_create_hcd(&ohci_da8xx_hc_driver, &pdev->dev, dev_name(&pdev->dev)); if (!hcd) From patchwork Mon Feb 11 10:36:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10805493 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 9ADF26C2 for ; Mon, 11 Feb 2019 10:37:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8841A29E33 for ; Mon, 11 Feb 2019 10:37:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BAA729F50; Mon, 11 Feb 2019 10:37:56 +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=ham 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 191AD29E33 for ; Mon, 11 Feb 2019 10:37:56 +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=VPbB/yCTgLFSG8CONnEMGTNFRk3hOvE+CJobMZkkFaw=; b=VQcuuoI4Vvi7Fv 4dVAcDSgbEc09bDS/RMMAPnKCfRxB0OEJhWi5s5mfSbi9dlHkM05cRRxquPvsRi9yXrtmYLQLKX42 cuUKwiKI4QgSPHLljbz39FHfVekbnE1m/Cwi3ABuCPnxbpuGcxrfKKfYW0Ba0mtfFTy6edLDrrcJv opQeW5C0uw5K6sOcfa9aHinZlMLKfAcpJUvQbgoDRwBluj8IYnRXOF8JzOh7rZitYQ06U1OjCRDSr rqq5sX0JFA6losFeBdEbEaf+8VDsjExjQtRilGBaPiehwKxssnsm1Kpt+oYTbKz0VVRV1eyqbdfiE 0biAnhIGemi2ZaI7sAKQ==; 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 1gt8yH-0007D3-Dz; Mon, 11 Feb 2019 10:37:53 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gt8xa-0006WP-Ej for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 10:37:17 +0000 Received: by mail-wm1-x343.google.com with SMTP id x10so10932060wmg.2 for ; Mon, 11 Feb 2019 02:37:10 -0800 (PST) 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=ORsjA8hmqOYVa1A6z58C/tpqF85yI2kmPo177hZON40=; b=uLye05mHf5U4mdu8gXtjfTR+N3aOWDgsG2T1ERC4B3Socyqgmm/3fxEawS5ubPSdFG B/ugTQ69/ccJCN00HR4Lcd5V4LlAZZKtW1s8Og3uVxvxvXrVJyE11GUsT9OsoPTGzUHM KuzWsf48SBy2Y5Bus0/mXAoubrViDagkXNF2DHWvAg8468CqDAeNXfahxXHfjuX+acWV v+sU48xODUB6NESxzJW5iJF4xcMRX9IPNV7u8mxCsTi/tTgI90a5scml1fnBDrVw1L4i fdXYERqFuxqjpOg1epP/K3xE6iVPojWA+jj910LrTB/6BG8TRWFPJwSHGeuqSaBOuHeZ Djyw== 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=ORsjA8hmqOYVa1A6z58C/tpqF85yI2kmPo177hZON40=; b=fU5mUPj3pJp47th7UDIn/fMg6eQjefEzOfF52GRDJt8IzBYB7dR8PYaZaWfSGb6VCk GxH0FSbYqqugJHDFV96raFC9lwBlFEyPwnIyRlnONeJBKO3KtSltbAbJstwEzpw9r+vX I5htRLVldlRa2ixJbGogSQAIT1xlyMjunNh13kbpP+ilNJUWAmtsYWuVYDjFF2+kp79f NqtGl33l/WZtGNdr7D7PTG+SiWevcwZSKc9VtLG+H3fNlNXmec9JI2PG5+nf0rz1hy0d 1/z1bjlAcFmWlAXZdc9iG3xV+3/Ie1tGCvUHsAm9pqRJsyMWPTxJjCczw6AN113Hz9h8 ulVA== X-Gm-Message-State: AHQUAuay46pyMthTPar6Pnd7BKx0iBYnbM+a0vw5X2SlXPD0nIyQ9HB7 FH0wEtw9j95aZKi8qBEdgR5uJQ== X-Google-Smtp-Source: AHgI3Ib/RRpS7Aag0oclwa7+AqIq9+WfvoGs3rvHUtSqAKvhDoU0qM6dtbyLVU0XyAbi8y51UGZqXw== X-Received: by 2002:a1c:2408:: with SMTP id k8mr8550037wmk.110.1549881428735; Mon, 11 Feb 2019 02:37:08 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id i192sm11121275wmg.7.2019.02.11.02.37.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 02:37:08 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 2/8] usb: ohci-da8xx: add a helper pointer to &pdev->dev Date: Mon, 11 Feb 2019 11:36:56 +0100 Message-Id: <20190211103702.4277-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211103702.4277-1-brgl@bgdev.pl> References: <20190211103702.4277-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_023710_927823_99D64315 X-CRM114-Status: GOOD ( 13.16 ) 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 , Linus Walleij , 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 Add a helper pointer to &pdev->dev. This improves readability by removing all the &pdev->dev dereferencing. Signed-off-by: Bartosz Golaszewski Acked-by: Alan Stern --- drivers/usb/host/ohci-da8xx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index c492c7e6f746..e8ede0b5e3f0 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -402,35 +402,35 @@ MODULE_DEVICE_TABLE(of, da8xx_ohci_ids); static int ohci_da8xx_probe(struct platform_device *pdev) { struct da8xx_ohci_hcd *da8xx_ohci; + struct device *dev = &pdev->dev; struct usb_hcd *hcd; struct resource *mem; int error, irq; - hcd = usb_create_hcd(&ohci_da8xx_hc_driver, &pdev->dev, - dev_name(&pdev->dev)); + hcd = usb_create_hcd(&ohci_da8xx_hc_driver, dev, dev_name(dev)); if (!hcd) return -ENOMEM; da8xx_ohci = to_da8xx_ohci(hcd); da8xx_ohci->hcd = hcd; - da8xx_ohci->usb11_clk = devm_clk_get(&pdev->dev, NULL); + da8xx_ohci->usb11_clk = devm_clk_get(dev, NULL); if (IS_ERR(da8xx_ohci->usb11_clk)) { error = PTR_ERR(da8xx_ohci->usb11_clk); if (error != -EPROBE_DEFER) - dev_err(&pdev->dev, "Failed to get clock.\n"); + dev_err(dev, "Failed to get clock.\n"); goto err; } - da8xx_ohci->usb11_phy = devm_phy_get(&pdev->dev, "usb-phy"); + da8xx_ohci->usb11_phy = devm_phy_get(dev, "usb-phy"); if (IS_ERR(da8xx_ohci->usb11_phy)) { error = PTR_ERR(da8xx_ohci->usb11_phy); if (error != -EPROBE_DEFER) - dev_err(&pdev->dev, "Failed to get phy.\n"); + dev_err(dev, "Failed to get phy.\n"); goto err; } - da8xx_ohci->vbus_reg = devm_regulator_get_optional(&pdev->dev, "vbus"); + da8xx_ohci->vbus_reg = devm_regulator_get_optional(dev, "vbus"); if (IS_ERR(da8xx_ohci->vbus_reg)) { error = PTR_ERR(da8xx_ohci->vbus_reg); if (error == -ENODEV) { @@ -438,13 +438,13 @@ static int ohci_da8xx_probe(struct platform_device *pdev) } else if (error == -EPROBE_DEFER) { goto err; } else { - dev_err(&pdev->dev, "Failed to get regulator\n"); + dev_err(dev, "Failed to get regulator\n"); goto err; } } mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hcd->regs = devm_ioremap_resource(&pdev->dev, mem); + hcd->regs = devm_ioremap_resource(dev, mem); if (IS_ERR(hcd->regs)) { error = PTR_ERR(hcd->regs); goto err; From patchwork Mon Feb 11 10:36:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10805505 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 716C56C2 for ; Mon, 11 Feb 2019 10:38:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D8E229E33 for ; Mon, 11 Feb 2019 10:38:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 516BE29F50; Mon, 11 Feb 2019 10:38:34 +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=ham 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 C9D3729E33 for ; Mon, 11 Feb 2019 10:38:33 +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=rAYZct9vur1f61n27hUcQw3pd/HU2teNMgG/TRyvULQ=; b=jkr9nu/EpK28hO cponto/eF0qnHMS3RV2s2c1Q2z63xJTX0zAN3AxhXYmE35HNn5ppyc3oZismexMOj4L+Gznc8/U+A KT0tBOhj99ZeMvKN84r1CDdbyve1AhgOhnR8Mu9ZL3HpnNSD+ougd2usb/oDcI8IfgLKMMbkCIjZ3 XRfxZIifQgOKgbWAR4gFmU/Mri7Fj22ZHwo+lb96aODZQQf1E8vWUQD8V4PhLLMRwu7qlM6T5E5mh aNzo1Mr11muy+cAmbtSXTfl9SW3BEi53up0/sOOoXAfbtr+0qQ0u4nUKMwNozHTND7If4fGFqCUzi BoLjb16/U/e5WMlgViPA==; 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 1gt8yp-0007iI-Vz; Mon, 11 Feb 2019 10:38:27 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gt8xc-0006Xw-2c for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 10:37:18 +0000 Received: by mail-wm1-x342.google.com with SMTP id t200so16366482wmt.0 for ; Mon, 11 Feb 2019 02:37:11 -0800 (PST) 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=D/VsXHRwtVGabkOsfPCt+jyBM76WQDq7lQ5hZjyQkII=; b=beupPIhapQPL6ylvBgwwVgVdOaYx4xjqH/zSbKbnraRrx9ToB0FO8C3cPLRquvThrk Hkgcm7hibv2CsXLLletboHoKCjIdzB5/jQO8afldqt6jk2AG1GDgW8Wk8oSnZjLL2J8O x3AGBoChuKPMFbzPU3V+HiLWBCU9Uy7t4fS6G9jNgTxuZmZ3VLoO/F6y7EiTdfLb20N8 0/ukPHZgRw6gtQfR6PHXFw3DBo9couHG7pPggCvluJEFPEBeUeVdBe8butFW0OAb5AWV SrflHxSjn9wrbFDl711nvf8yhDjpDwlwE1ARLzcRsPkx7MxQ49wLojS7O6a0pR3vxdBV 6p9A== 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=D/VsXHRwtVGabkOsfPCt+jyBM76WQDq7lQ5hZjyQkII=; b=lt44HgB5Z90lK+kCwEdNanwIvlzAVuxZFwyQbYwEeWegdRtcB1pgKuj1t9Zy8Kb0TV n/+Lj6rzrEzgjO4xHgBTmEWxi/0AoD8t++cffEWJE4/GBwX5DrymJHpNNZKSicw7JMqL D40HFu3HrroQGIk0HgeGlmBjpUaG6zVEh94a4K81fkXNtQV6edyK9c0Q9clCIV29Tj0M AC6ubSa7ImTYWTvwF+QdwcnEIvAO3dyQHBtDsunfE31ccprxuUjFtaW6NDQyyOzdah0Q abBGairZzTtyi/VnYvhtlEwuPLhu2GNnSIlDiiP8oqSp7U+vtkeqXrKzesKrtTq4F2Qv LQhw== X-Gm-Message-State: AHQUAubcmy+Ea92qpKVUPWfBr2geDvRcbcJAEPskAjdRffGVBIf3SzFJ UnHkcQMwHFhqLer4E+lLRcCgVg== X-Google-Smtp-Source: AHgI3Ia4YHL7VkxiIK9g155puXWkq2+zX2KsPf97SnFlvhBgVTX8tMBPASRi53oK4Rsy8sIPMYtZaw== X-Received: by 2002:a1c:7304:: with SMTP id d4mr6467462wmb.136.1549881429968; Mon, 11 Feb 2019 02:37:09 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id i192sm11121275wmg.7.2019.02.11.02.37.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 02:37:09 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 3/8] ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios Date: Mon, 11 Feb 2019 11:36:57 +0100 Message-Id: <20190211103702.4277-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211103702.4277-1-brgl@bgdev.pl> References: <20190211103702.4277-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_023713_176609_02334FF2 X-CRM114-Status: GOOD ( 13.42 ) 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 , Linus Walleij , 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 Add lookup entries for the vbus and overcurrent gpios for omapl138-hawk. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij --- arch/arm/mach-davinci/board-omapl138-hawk.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 94c4f126ef86..856c5707bae9 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -302,6 +302,14 @@ static const short da850_hawk_usb11_pins[] = { -1 }; +static struct gpiod_lookup_table hawk_usb_gpio_lookup = { + .dev_id = "ohci-da8xx", + .table = { + GPIO_LOOKUP("davinci_gpio", DA850_USB1_VBUS_PIN, "vbus", 0), + GPIO_LOOKUP("davinci_gpio", DA850_USB1_OC_PIN, "oc", 0), + }, +}; + static int hawk_usb_set_power(unsigned port, int on) { gpio_set_value(DA850_USB1_VBUS_PIN, on); @@ -390,6 +398,8 @@ static __init void omapl138_hawk_usb_init(void) goto usb11_setup_oc_fail; } + gpiod_add_lookup_table(&hawk_usb_gpio_lookup); + ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata); if (ret) { pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret); From patchwork Mon Feb 11 10:36:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10805503 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 3D9EA6C2 for ; Mon, 11 Feb 2019 10:38:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2856229E33 for ; Mon, 11 Feb 2019 10:38:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C20929F50; Mon, 11 Feb 2019 10:38:15 +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=ham 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 91F4E29E33 for ; Mon, 11 Feb 2019 10:38:14 +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=AjtmYJBj/egwa8bAuPkiEAaJ7MyGc9szYv+Md295QMg=; b=Pq3UQXzTqKMuma OKBCM6GUYSDhkFSz3vi2YFqyifU11LpdgAJsE5B1IhEHV6fOWiIeQJrGBKCyS0S1LbwVugUsAYJdw PWu6352KPVNm5Xtr+1fiO66qTnxdRwofMuhbMJzccZTpxo1DSUwLEP7pw7LN+pH0OSUeMYlFCbNJh h+bWqRe1KTkQ1hi6jOYF8TV7RSXhWHkBz3rVxy04mKvaqTcMjcavVWuZQ8oL7T6nC76F9bWi5jI+R U4BtOZEqlP3h0DxNH0QOD2liAqgnmdeDLwYvyCVpmLjtBoI0dR9dIVbtcH2xEqmN5cyQofoFBqc/l np9UNWvedBfDz6wATeQw==; 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 1gt8ya-0007UX-93; Mon, 11 Feb 2019 10:38:12 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gt8xc-0006ZI-NL for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 10:37:18 +0000 Received: by mail-wm1-x341.google.com with SMTP id f16so16319964wmh.4 for ; Mon, 11 Feb 2019 02:37:12 -0800 (PST) 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=mDfzI32lULSZi0KPO52EnMBMtQh72KGGsTTNyrojGSQ=; b=oWmZOODHEAixm/1e2wgdfOLsfIc9IDHSjpG1BwW0YuPn2nUl/ttK9oOzgpCPJtzS6N DuKSO+zvN/upV89PdkHuedTqjSJX/AJKkafNhPrmdRpOmO1jF1kEMkGhz7k/bYyb1scx g340TQM7jblbGE5aPe6knXbPMrpCnYwGDzun+BWgwjNA3JuIxo/+6RTTA6jHztqlUFK7 yOZs0jo0M6VVIN7EEHP5uELpGpDhFAa895/GyEqymT8PaIXDmd0eIwTOX+ob0Ie2F0/U 3ZoZDJJrWQ9OKcRWjUijSWeduUbFFA3mdqWdutGDLfO5hlNdlHuRsyh9ebelNVyDgA3o PcKg== 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=mDfzI32lULSZi0KPO52EnMBMtQh72KGGsTTNyrojGSQ=; b=qc78d0010Q70hZC+O0/z9cb2tVe2E5Z7h5gWcyf2ZsuR4eKQSpbEkPBJswWWd4nsiZ +lvD9hICSK1Snz2gMINF52dgA/kCVFFLukl5Z2RFTwqIy5iWMM6/Znh7ppPdsKa+hA1+ Ku+skSOK+Z3Aut1u6eHFsHoO4tiJGKDKWWh9C1zvDzRBaxvnEtaUaVKY2+yhQ+odcBkf 8Q/HrwE36vR7kk3OcUAiTbQl2KV2T/OyBpQW7itexNjKuXpj8ypmUcKbR9utaNbf4OT9 KhXPGlcFqjVL6l6YUkYTT5TALTM1Wc6RFj0aB8Tn6O5tarpJvCQBVyhD1dVK4rLT9Efq 2g1Q== X-Gm-Message-State: AHQUAuYoxZRn9u+Jr7yKsaOcWJh9xEYLBzma7cs+OiV1hvPA/2EtZk+E HsADYdcnJAn2gYL8j8r75P2cXw== X-Google-Smtp-Source: AHgI3IYXhpG/oxXOdIneaSd3s3Pky+0wz1hkzYaJnd5e3gipZIWhNMei/K1g/PlCdRxJnupjWMrGxg== X-Received: by 2002:a5d:4e8c:: with SMTP id e12mr17674777wru.21.1549881431259; Mon, 11 Feb 2019 02:37:11 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id i192sm11121275wmg.7.2019.02.11.02.37.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 02:37:10 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 4/8] ARM: davinci: da830-evm: use gpio lookup entries for usb gpios Date: Mon, 11 Feb 2019 11:36:58 +0100 Message-Id: <20190211103702.4277-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211103702.4277-1-brgl@bgdev.pl> References: <20190211103702.4277-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_023713_690851_EF43A6A1 X-CRM114-Status: GOOD ( 12.78 ) 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 , Linus Walleij , 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 Add lookup entries for vbus and overcurrent gpios for da830-evm. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij --- arch/arm/mach-davinci/board-da830-evm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index c4da635ee4ce..0712a37153a8 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -54,6 +54,14 @@ static const short da830_evm_usb11_pins[] = { static da8xx_ocic_handler_t da830_evm_usb_ocic_handler; +static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = { + .dev_id = "ohci-da8xx", + .table = { + GPIO_LOOKUP("davinci_gpio", ON_BD_USB_DRV, "vbus", 0), + GPIO_LOOKUP("davinci_gpio", ON_BD_USB_OVC, "oc", 0), + }, +}; + static int da830_evm_usb_set_power(unsigned port, int on) { gpio_set_value(ON_BD_USB_DRV, on); @@ -158,6 +166,8 @@ static __init void da830_evm_usb_init(void) } gpio_direction_input(ON_BD_USB_OVC); + gpiod_add_lookup_table(&da830_evm_usb_gpio_lookup); + ret = da8xx_register_usb11(&da830_evm_usb11_pdata); if (ret) pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret); From patchwork Mon Feb 11 10:36:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10805507 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 DC69E6C2 for ; Mon, 11 Feb 2019 10:38:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7D4829494 for ; Mon, 11 Feb 2019 10:38:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B979D29AFB; Mon, 11 Feb 2019 10:38:54 +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 929FB29494 for ; Mon, 11 Feb 2019 10:38:53 +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=Yv2RMkYnGMj99Pz0+3UqTaeapu5Buqo7jFb5UEBq3Q4=; b=jx5MAVTu66NfzO mTjrxtEO89jYHu5HyUdlmwrfimMlcTzFf3Iykj/N2F2785jKOfAkcSYcxQFtHU8zTd/or3f6r/iml LjlgxzgP7lWkcKD3iWEscK4RIM3MyxSPS+Nt7vuyHQ5s++M20FUj3BQIXwk8B7e0cO+hiEtP5ZBBy e72y4VIO8/NzkT+txdbx35wyI5mVYyd/l54S45iWe/HHw5UFqw0CvE7pWZE8UXdr2PLZlaBN4HU0y j2fzs4UV/1gDdIgZK6hD0BTZdGXHzQvoHGO2zKoD7m4zBBSjtqy4kTPNVTBjz8oEgK1iwtOTYFu3g NtHY7qvXhtS8xu/wwngw==; 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 1gt8z7-0007y3-I6; Mon, 11 Feb 2019 10:38:45 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gt8xd-0006bR-Uu for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 10:37:19 +0000 Received: by mail-wm1-x341.google.com with SMTP id q21so16300189wmc.5 for ; Mon, 11 Feb 2019 02:37:13 -0800 (PST) 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=PatZI+PBeu5EDAbtmqHN1dIkr0rFbuYENoq6lvPpAmk=; b=TfE6WQSicMIya7zncLgIUVwcSP+ApnZapuPOWt8UmZEilaAw9/yde+tfzFhyDvVBoP Ydi9eg/ZsfJxOCRBu18lagVlc4Z6vSisfj0/fbVfsRTLti27d63EKr/Vlgb4Yp3AV4n1 Xp5pdkH9tiSrVg4ZBeEw8IDHQ20NUQNxcNCgs1jb6w75o54D7J0B48n235f+jjq/xQbq mHW8JqeH/2lB9ZwQHt2pDzOLScH5pAYKcB4sj8dnoXoEEvaQF1QBtTjXrpv9W5BU/vhV Eif+SkBn0HGBRSGxKUVAaJGjAqIcJKhtVRGTuVL58vyPfdfDvHgP8mAGOq4FZ5zoYPv8 40zA== 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=PatZI+PBeu5EDAbtmqHN1dIkr0rFbuYENoq6lvPpAmk=; b=ewEhPS054HbBidU5Uc6y3t4Qxl4HA9BiFM+8+pYhFyWDx5ud+5rtByfwEnY3/PGNBq D6Ze69WK7GUwQmDHvV7G8gAoxHKozpDazpyheVSBpb3rLK0gfvmBWo6pxvtrdC5tOGUK XcVPAp4XVtJeBxGU28L8qmxnDjlXzVyekFhm+7IjBWvhYf1MXQWDhytrgSIkCeFWzFrO XwZzkzGHKz+qN4XptHcE+hDigoZjai/VDm7hV2/AUAQQogCyerKQkMRVn/dXHo5jig7o GlBJJ/kH2Tb/JfPqMvGYzFmZSuJl+9BIpl9CNTpoz4BaZOWMq5bcRPMW6+AUs/e/b885 KzZg== X-Gm-Message-State: AHQUAuZEfcPw1E24BjmwnTC4YQS5N/fhKtVWm4kq9thQb+Nc6VZmf6gI RIZAdH16wrRl+W1W4SC1XCETBA== X-Google-Smtp-Source: AHgI3IbtH2tOw4AuuQFPW6QFljREQ/DwC011boIisES66MFwobAzARakeG3KjtCHSQeA9KbgGmotjw== X-Received: by 2002:a1c:ef13:: with SMTP id n19mr7203271wmh.70.1549881432486; Mon, 11 Feb 2019 02:37:12 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id i192sm11121275wmg.7.2019.02.11.02.37.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 02:37:11 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 5/8] usb: ohci-da8xx: add vbus and overcurrent gpios Date: Mon, 11 Feb 2019 11:36:59 +0100 Message-Id: <20190211103702.4277-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211103702.4277-1-brgl@bgdev.pl> References: <20190211103702.4277-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_023714_408327_D32AC9F2 X-CRM114-Status: GOOD ( 19.62 ) 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 , Linus Walleij , 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 There are two users upstream which register external callbacks for switching the port power on/off and overcurrent protection. Both users only use two GPIOs for that. Instead of having that functionality in the board files, move the logic into the OHCI driver - including the interrupt handler for overcurrent detection. Signed-off-by: Bartosz Golaszewski Acked-by: Alan Stern --- drivers/usb/host/ohci-da8xx.c | 99 ++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index e8ede0b5e3f0..80c23307fbfe 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -40,6 +41,8 @@ struct da8xx_ohci_hcd { struct regulator *vbus_reg; struct notifier_block nb; unsigned int reg_enabled; + struct gpio_desc *vbus_gpio; + struct gpio_desc *oc_gpio; }; #define to_da8xx_ohci(hcd) (struct da8xx_ohci_hcd *)(hcd_to_ohci(hcd)->priv) @@ -86,12 +89,13 @@ static void ohci_da8xx_disable(struct usb_hcd *hcd) static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) { struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); - struct device *dev = hcd->self.controller; - struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); + struct device *dev = hcd->self.controller; int ret; - if (hub && hub->set_power) - return hub->set_power(1, on); + if (da8xx_ohci->vbus_gpio) { + gpiod_set_value_cansleep(da8xx_ohci->vbus_gpio, on); + return 0; + } if (!da8xx_ohci->vbus_reg) return 0; @@ -119,11 +123,9 @@ static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) static int ohci_da8xx_get_power(struct usb_hcd *hcd) { struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); - struct device *dev = hcd->self.controller; - struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); - if (hub && hub->get_power) - return hub->get_power(1); + 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); @@ -134,13 +136,11 @@ static int ohci_da8xx_get_power(struct usb_hcd *hcd) static int ohci_da8xx_get_oci(struct usb_hcd *hcd) { struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); - struct device *dev = hcd->self.controller; - struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); unsigned int flags; int ret; - if (hub && hub->get_oci) - return hub->get_oci(1); + if (da8xx_ohci->oc_gpio) + return gpiod_get_value_cansleep(da8xx_ohci->oc_gpio); if (!da8xx_ohci->vbus_reg) return 0; @@ -158,10 +158,8 @@ static int ohci_da8xx_get_oci(struct usb_hcd *hcd) static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) { struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); - struct device *dev = hcd->self.controller; - struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); - if (hub && hub->set_power) + if (da8xx_ohci->vbus_gpio) return 1; if (da8xx_ohci->vbus_reg) @@ -173,10 +171,8 @@ static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) static int ohci_da8xx_has_oci(struct usb_hcd *hcd) { struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); - struct device *dev = hcd->self.controller; - struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); - if (hub && hub->get_oci) + if (da8xx_ohci->oc_gpio) return 1; if (da8xx_ohci->vbus_reg) @@ -196,19 +192,6 @@ static int ohci_da8xx_has_potpgt(struct usb_hcd *hcd) return 0; } -/* - * Handle the port over-current indicator change. - */ -static void ohci_da8xx_ocic_handler(struct da8xx_ohci_root_hub *hub, - unsigned port) -{ - ocic_mask |= 1 << port; - - /* Once over-current is detected, the port needs to be powered down */ - if (hub->get_oci(port) > 0) - hub->set_power(port, 0); -} - static int ohci_da8xx_regulator_event(struct notifier_block *nb, unsigned long event, void *data) { @@ -223,16 +206,23 @@ static int ohci_da8xx_regulator_event(struct notifier_block *nb, return 0; } +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)) + gpiod_set_value(da8xx_ohci->vbus_gpio, 0); + + return IRQ_HANDLED; +} + static int ohci_da8xx_register_notify(struct usb_hcd *hcd) { struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); struct device *dev = hcd->self.controller; - struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); int ret = 0; - if (hub && hub->ocic_notify) { - ret = hub->ocic_notify(ohci_da8xx_ocic_handler); - } else if (da8xx_ohci->vbus_reg) { + if (!da8xx_ohci->oc_gpio && da8xx_ohci->vbus_reg) { da8xx_ohci->nb.notifier_call = ohci_da8xx_regulator_event; ret = devm_regulator_register_notifier(da8xx_ohci->vbus_reg, &da8xx_ohci->nb); @@ -244,15 +234,6 @@ static int ohci_da8xx_register_notify(struct usb_hcd *hcd) return ret; } -static void ohci_da8xx_unregister_notify(struct usb_hcd *hcd) -{ - struct device *dev = hcd->self.controller; - struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev); - - if (hub && hub->ocic_notify) - hub->ocic_notify(NULL); -} - static int ohci_da8xx_reset(struct usb_hcd *hcd) { struct device *dev = hcd->self.controller; @@ -403,9 +384,9 @@ static int ohci_da8xx_probe(struct platform_device *pdev) { struct da8xx_ohci_hcd *da8xx_ohci; struct device *dev = &pdev->dev; + int error, hcd_irq, oc_irq; struct usb_hcd *hcd; struct resource *mem; - int error, irq; hcd = usb_create_hcd(&ohci_da8xx_hc_driver, dev, dev_name(dev)); if (!hcd) @@ -443,6 +424,27 @@ 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; + + if (da8xx_ohci->oc_gpio) { + oc_irq = gpiod_to_irq(da8xx_ohci->oc_gpio); + if (oc_irq < 0) + goto err; + + error = devm_request_irq(dev, oc_irq, ohci_da8xx_oc_handler, + IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + "OHCI over-current indicator", da8xx_ohci); + if (error) + goto err; + } + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); hcd->regs = devm_ioremap_resource(dev, mem); if (IS_ERR(hcd->regs)) { @@ -452,13 +454,13 @@ static int ohci_da8xx_probe(struct platform_device *pdev) hcd->rsrc_start = mem->start; hcd->rsrc_len = resource_size(mem); - irq = platform_get_irq(pdev, 0); - if (irq < 0) { + hcd_irq = platform_get_irq(pdev, 0); + if (hcd_irq < 0) { error = -ENODEV; goto err; } - error = usb_add_hcd(hcd, irq, 0); + error = usb_add_hcd(hcd, hcd_irq, 0); if (error) goto err; @@ -481,7 +483,6 @@ static int ohci_da8xx_remove(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); - ohci_da8xx_unregister_notify(hcd); usb_remove_hcd(hcd); usb_put_hcd(hcd); From patchwork Mon Feb 11 10:37:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10805511 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 2506017E0 for ; Mon, 11 Feb 2019 10:39:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 124D229EBA for ; Mon, 11 Feb 2019 10:39:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05DB629EC6; Mon, 11 Feb 2019 10:39: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=-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 9E8BC29EBA for ; Mon, 11 Feb 2019 10:39:22 +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=hvGNndEU9S6ErmU/hKl3EcMaOpr9WcHGEJHlcdxm8HU=; b=tqRHOSqMo47bw9 fC/TRleIM5OsCbOzJm1ZBb/CSkYpI/Nswo5+h/n0U7OIjaSMx8pdVM6IXxOcKkNpBQml05019WeJW 6JPre+ycF5VDarhnGzATagw5Ofhi5iv6IZXVnf4HmxPZuLsX7SPdwFp+C4Y64P3qSEPIabqi8cdrC WgcKLfsEIA7YGR7sgVEs7oRxM+rrJz7GxBf1e3Gq6Xk0ksuBrO5L/OHtq0dYUzbuYt4XoA+9zGAMj oqrqZ61ieNd4QRXaesyhPEVsznRlIR8wiJ41gB04F5UxtwE1Ik4gVgCpup71xZZFUlIDJANHDC8Fh TqLJSXuZaKeK9HRowH7A==; 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 1gt8zf-0008Rr-1C; Mon, 11 Feb 2019 10:39:19 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gt8xe-0006cq-Vc for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 10:37:20 +0000 Received: by mail-wm1-x343.google.com with SMTP id a62so16790118wmh.4 for ; Mon, 11 Feb 2019 02:37:14 -0800 (PST) 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=Z56W91f7fqmIDFSLo4iJF9+SrfI/T8Kx4jtFNkkkjzw=; b=zQKAKx5zLCaIyJYe1hm0ICz57RS4juItNm7pQ+l/pKGcHfA1cpzsoH3JBO1gnbYz97 ovcETZOVvWT1Ccyquku63LHG1Zl7Yx0Spu/YIvcsG6xLO2r+2EMkoT9jzhhHFxqQMehJ JlVFhEo30R/dyUhqD1G+TAfZVlqmtm1nFJVk/2gSRUfo7FtHmbLo7gJdRHWeWfBjdmPm DPciAVRXifK7o6PsRe/LMbjWr65/Fu5dlVj27bBJuuEgDrCUXEn4vTowoFcNNNhdSptw DNqOAUqVqJ5zJtRJIcXTQPP6YaI9zHt3Eo0bxN/+92N3CQJ9eRNi5etVO3f2VqnSnMnl LS9w== 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=Z56W91f7fqmIDFSLo4iJF9+SrfI/T8Kx4jtFNkkkjzw=; b=k/FXkqZXRHfm396M8j1Y9A7xhZiNqTq1syEAe9Z8rFW9ttbw7yMj6/NaHjcdnc6YSv Hqpm/+YIz857ZqUq807Fq6FQvskwFpq9odVZz3HlDf+TaUeeqDFoGgtdtCyCe4OinZi2 DnfPAagLCMRZp1StOWJwc3u/gYV1hnaN4LzE0AvTx5pdY8B6MUmfC2HucXQ3nbOyXclF nZHBtFOznpCcka4uNnENevOsRf8hA359Wi3PK6JyjO1JGmwyikGJlOfqgKpprfRXNn6R tzUuZ3SC1UywCeNB2v69bteeQxPQ6oXvFevd0eTxJ790lcFGYZ3wxmUGpnmtbZCPrYgn pu/g== X-Gm-Message-State: AHQUAubJpg5UTJ4aoCynaUPzsG8gsvm8hWNIGjfNtgrV5g234EzYYIfc Y19ve0d5A8WRD4QRbOiCgYAd/g== X-Google-Smtp-Source: AHgI3IaqtZZIN/H9RqZ5gAnvMDY+UmAo0KBTaI2NvxnknK+IG282wnQAzpD+m61G25BbXjxFwbvBwg== X-Received: by 2002:a7b:c764:: with SMTP id x4mr7468234wmk.47.1549881433564; Mon, 11 Feb 2019 02:37:13 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id i192sm11121275wmg.7.2019.02.11.02.37.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 02:37:12 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 6/8] ARM: davinci: omapl138-hawk: remove legacy usb helpers Date: Mon, 11 Feb 2019 11:37:00 +0100 Message-Id: <20190211103702.4277-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211103702.4277-1-brgl@bgdev.pl> References: <20190211103702.4277-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_023715_317847_B592745F X-CRM114-Status: GOOD ( 15.99 ) 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 , Linus Walleij , 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 The logic implemented by these routines now lives in the da8xx-ohci driver. Remove dead code. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-omapl138-hawk.c | 75 +-------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 856c5707bae9..88a0c62eee86 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -294,9 +294,6 @@ static int omapl138_hawk_register_aemif(void) return platform_device_register(&omapl138_hawk_aemif_device); } -static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id); -static da8xx_ocic_handler_t hawk_usb_ocic_handler; - static const short da850_hawk_usb11_pins[] = { DA850_GPIO2_4, DA850_GPIO6_13, -1 @@ -310,58 +307,11 @@ static struct gpiod_lookup_table hawk_usb_gpio_lookup = { }, }; -static int hawk_usb_set_power(unsigned port, int on) -{ - gpio_set_value(DA850_USB1_VBUS_PIN, on); - return 0; -} - -static int hawk_usb_get_power(unsigned port) -{ - return gpio_get_value(DA850_USB1_VBUS_PIN); -} - -static int hawk_usb_get_oci(unsigned port) -{ - return !gpio_get_value(DA850_USB1_OC_PIN); -} - -static int hawk_usb_ocic_notify(da8xx_ocic_handler_t handler) -{ - int irq = gpio_to_irq(DA850_USB1_OC_PIN); - int error = 0; - - if (handler != NULL) { - hawk_usb_ocic_handler = handler; - - error = request_irq(irq, omapl138_hawk_usb_ocic_irq, - IRQF_TRIGGER_RISING | - IRQF_TRIGGER_FALLING, - "OHCI over-current indicator", NULL); - if (error) - pr_err("%s: could not request IRQ to watch " - "over-current indicator changes\n", __func__); - } else { - free_irq(irq, NULL); - } - return error; -} - static struct da8xx_ohci_root_hub omapl138_hawk_usb11_pdata = { - .set_power = hawk_usb_set_power, - .get_power = hawk_usb_get_power, - .get_oci = hawk_usb_get_oci, - .ocic_notify = hawk_usb_ocic_notify, /* TPS2087 switch @ 5V */ .potpgt = (3 + 1) / 2, /* 3 ms max */ }; -static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id) -{ - hawk_usb_ocic_handler(&omapl138_hawk_usb11_pdata, 1); - return IRQ_HANDLED; -} - static __init void omapl138_hawk_usb_init(void) { int ret; @@ -382,36 +332,13 @@ static __init void omapl138_hawk_usb_init(void) pr_warn("%s: USB PHY registration failed: %d\n", __func__, ret); - ret = gpio_request_one(DA850_USB1_VBUS_PIN, - GPIOF_DIR_OUT, "USB1 VBUS"); - if (ret < 0) { - pr_err("%s: failed to request GPIO for USB 1.1 port " - "power control: %d\n", __func__, ret); - return; - } - - ret = gpio_request_one(DA850_USB1_OC_PIN, - GPIOF_DIR_IN, "USB1 OC"); - if (ret < 0) { - pr_err("%s: failed to request GPIO for USB 1.1 port " - "over-current indicator: %d\n", __func__, ret); - goto usb11_setup_oc_fail; - } - gpiod_add_lookup_table(&hawk_usb_gpio_lookup); ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata); - if (ret) { + if (ret) pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret); - goto usb11_setup_fail; - } return; - -usb11_setup_fail: - gpio_free(DA850_USB1_OC_PIN); -usb11_setup_oc_fail: - gpio_free(DA850_USB1_VBUS_PIN); } static __init void omapl138_hawk_init(void) From patchwork Mon Feb 11 10:37:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10805509 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 9A6F66C2 for ; Mon, 11 Feb 2019 10:39:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8368929494 for ; Mon, 11 Feb 2019 10:39:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 718B629AFB; Mon, 11 Feb 2019 10:39:04 +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 1C8DA29494 for ; Mon, 11 Feb 2019 10:39:04 +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=eSX9sSCR6Bvdl+8rYs7Yg68vjAjgASUsNoDO0S4LL6s=; b=MOcV8ewGXipig8 aSzOg5goKYESkLKbNb222+Z4/OkWSF+mVazI5slKw1wPIVQNVPkr++5w89pLu7wm2ndbSf7y3YRkx kL3dlml/9Ziq2kEH+PDcaNK3OclBxOHmlDoeUUMlwwDIeU7pAC51ogF0lKeUCocjS1BkNLvRLDqp1 QuW3SOFEN+WgFc5kiAqMgbj/xLvkJPxWf0Lgt8SxiYXmUBQMQ+/xvJsLJsso1q8PLY6/L0Z60/BXK xlHSLlLYON7lEIp4QvnIhBwCunwRoO1/Qtf0yHB/ZUjfa1+Y6md0cRcYm9CtjKCRkBwFEWpHtAsRs mo7jXVZ40W5WH9DxmMvQ==; 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 1gt8zN-0008C6-GV; Mon, 11 Feb 2019 10:39:01 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gt8xg-0006eJ-2H for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 10:37:20 +0000 Received: by mail-wm1-x343.google.com with SMTP id m1so16799184wml.2 for ; Mon, 11 Feb 2019 02:37:15 -0800 (PST) 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=bcVd+xaXefW/PkS3D+eVHZxbCvxtmtyCV/GOjJgMVBA=; b=u3Q4zH4InQZAGR7svFMkRl7v89pFKfHGoRrnJFlv5DW9Px1T+nn4Q2VhAPlAPpq9Vc MO+q9mckzodN35P/zXsf2kMs2hUX306418rHNrmmGXyZA2ZoWXhkjisQAY1JyYwkKzHs lB85w49K3cPwbDMTMw0WaLs4xaa11TgDZuie+m/2RZ+8qMprTWEv5+IeJPyaGZRRfD1I MMikG29Rk+LjyyZ+RYXT4XxSMl7qC5CGS32pm2Jjq4CsgecqzVuJ4bzRM9OCIBkK5hDg AuCfBpK5kAE+t5DNYH7bfn5rSQOpkGvKg8k2ASkkrun97VzQ3biLXyYtoVmJHn6geSif j/jw== 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=bcVd+xaXefW/PkS3D+eVHZxbCvxtmtyCV/GOjJgMVBA=; b=iaIJ2v6XvbKMNFsLTn5ZMsdn29kDaJk68lCV846EAt7T/1bYabO52LpK1CEdsA/C7O k8wPhnBIAYU5BeoY2AvmOycbz63C5FBMaqXGW8qJWTsKJNSB/0zkjuWjmKDcb9Do2WND 9SBh+HsuikPsuzngkojoYhSt8BPLeDKgdAJQQx/8tM6w/4bFp4Z/3lVdIEZ1X6FlAzoL qFAh+H8IQjSr/TWlEZByuoHpcWcZ2NtCwhxpMPwXKvLockd5RHaWR70tv7qu1xYe342x wK5XT2pMpUp69BZJg3eyQzGTTSUpdMCufLI8UOt5QnEuil85AH5yTyhD6PsM1PYZDPNr m5Ag== X-Gm-Message-State: AHQUAuaGLEEQArvNJe6A1DzdyZstCzvvJrdKdGVqhYPG9io2XoKcA3FQ 0i+Hp5gPfVvKCuPlU1GI+iLXGA== X-Google-Smtp-Source: AHgI3IZe1dMiumbFFArVH10zKtDOgopWjaSrOZMfbCL3N1BeBwlapJzl5oFuZGmteU62M2T/bQ24Cw== X-Received: by 2002:a7b:c14f:: with SMTP id z15mr8285090wmi.141.1549881434634; Mon, 11 Feb 2019 02:37:14 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id i192sm11121275wmg.7.2019.02.11.02.37.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 02:37:14 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 7/8] ARM: davinci: da830-evm: remove legacy usb helpers Date: Mon, 11 Feb 2019 11:37:01 +0100 Message-Id: <20190211103702.4277-8-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211103702.4277-1-brgl@bgdev.pl> References: <20190211103702.4277-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_023716_337815_C110601B X-CRM114-Status: GOOD ( 13.65 ) 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 , Linus Walleij , 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 The logic implemented by these routines now lives in the da8xx-ohci driver. Remove dead code. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/board-da830-evm.c | 67 ------------------------- 1 file changed, 67 deletions(-) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 0712a37153a8..8d30f68773a0 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -52,8 +52,6 @@ static const short da830_evm_usb11_pins[] = { -1 }; -static da8xx_ocic_handler_t da830_evm_usb_ocic_handler; - static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = { .dev_id = "ohci-da8xx", .table = { @@ -62,60 +60,11 @@ static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = { }, }; -static int da830_evm_usb_set_power(unsigned port, int on) -{ - gpio_set_value(ON_BD_USB_DRV, on); - return 0; -} - -static int da830_evm_usb_get_power(unsigned port) -{ - return gpio_get_value(ON_BD_USB_DRV); -} - -static int da830_evm_usb_get_oci(unsigned port) -{ - return !gpio_get_value(ON_BD_USB_OVC); -} - -static irqreturn_t da830_evm_usb_ocic_irq(int, void *); - -static int da830_evm_usb_ocic_notify(da8xx_ocic_handler_t handler) -{ - int irq = gpio_to_irq(ON_BD_USB_OVC); - int error = 0; - - if (handler != NULL) { - da830_evm_usb_ocic_handler = handler; - - error = request_irq(irq, da830_evm_usb_ocic_irq, - IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, - "OHCI over-current indicator", NULL); - if (error) - pr_err("%s: could not request IRQ to watch over-current indicator changes\n", - __func__); - } else - free_irq(irq, NULL); - - return error; -} - static struct da8xx_ohci_root_hub da830_evm_usb11_pdata = { - .set_power = da830_evm_usb_set_power, - .get_power = da830_evm_usb_get_power, - .get_oci = da830_evm_usb_get_oci, - .ocic_notify = da830_evm_usb_ocic_notify, - /* TPS2065 switch @ 5V */ .potpgt = (3 + 1) / 2, /* 3 ms max */ }; -static irqreturn_t da830_evm_usb_ocic_irq(int irq, void *dev_id) -{ - da830_evm_usb_ocic_handler(&da830_evm_usb11_pdata, 1); - return IRQ_HANDLED; -} - static __init void da830_evm_usb_init(void) { int ret; @@ -150,22 +99,6 @@ static __init void da830_evm_usb_init(void) return; } - ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV"); - if (ret) { - pr_err("%s: failed to request GPIO for USB 1.1 port power control: %d\n", - __func__, ret); - return; - } - gpio_direction_output(ON_BD_USB_DRV, 0); - - ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC"); - if (ret) { - pr_err("%s: failed to request GPIO for USB 1.1 port over-current indicator: %d\n", - __func__, ret); - return; - } - gpio_direction_input(ON_BD_USB_OVC); - gpiod_add_lookup_table(&da830_evm_usb_gpio_lookup); ret = da8xx_register_usb11(&da830_evm_usb11_pdata); From patchwork Mon Feb 11 10:37:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10805513 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 EB0E717E0 for ; Mon, 11 Feb 2019 10:39:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8D5929EC8 for ; Mon, 11 Feb 2019 10:39:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCBA629EDB; Mon, 11 Feb 2019 10:39:35 +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=ham 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 813D729EC8 for ; Mon, 11 Feb 2019 10:39:35 +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=FKKi4gk+lPsT+CsNKnEDRq6DmWNovrIND9zjmPvn7nk=; b=FI6IvBcsT9QUME tLWOOL9OYdbIckaOJdI34QwZVS0z7MISPKdu56x3PvWftC6IwojIuHmrnxx9cxALYVpXwhPXWX1AI jYLCVqlFAgm4Qx22ARl2guXWOY9RXB75m+NuAfNxsnX2jUsyOzftosOdI7Xfk1msCMUAc3bDY00cS XWypyr43fNrNoj7UvdFcoARvvMzifGaAMI7GBTPCSO5AF04eliTXQYinb7+cpYcGrJmVcsOOeZWr0 n8KKvc/6lSAcelNoftIz9gw3MG64SK3+HFRUy5eBxTrfVioWnvb6V0dhHYduEix5ZHfWHNgdiKH+a rQ+O03SWo5LArKfPMcUw==; 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 1gt8zt-0000Ew-W9; Mon, 11 Feb 2019 10:39:34 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gt8xh-0006fK-8A for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 10:37:21 +0000 Received: by mail-wm1-x344.google.com with SMTP id v26so16309169wmh.3 for ; Mon, 11 Feb 2019 02:37:17 -0800 (PST) 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=Tt06UGkm6C60fE3GnCLmVsdN1KETvFT9lYr7KKnVtso=; b=sKVAHfBSGT6IdWdNE5LktbYFBiksZLEdXjYNRPMNh/GHaXkR3ztP+XBnsm2wyoHB2q 3cto1e4KOLLe/rXUPUAGVkHxDVxBs1x6pVtED2SMpSPk7Bv0LogoZQ5B3ea/t96px4ju J1GTy/Rgg3e1E7i/Ofwr0h1+9SWIHY0iGCHYshVVwCZ8uuK5U/bTgmA+0gKdRHndXe1H i6KFuoM7eNHrEqG4cpZIKGPJEfc2QXQdCigw99YbtgpVpnb+0B4qbad+lO+1QHhA2uw1 eRTpomgOFVp6bUdXLqYSFc9+BcvOc3nqtJ/rWFQc2jFpDTEYOiCTgt8ZxBsjZOKClXVP H0hw== 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=Tt06UGkm6C60fE3GnCLmVsdN1KETvFT9lYr7KKnVtso=; b=FQcbZ7UbF3c/VGPjoEdbDYUjKlgWCoto1lmjxk+DU/uGy4eg3N/WNV7Os5foVPwE1K 0gUlEUiPXBcSYlbef0JwtSQISoSlo4G4YoHaeGWb1tV9WMRo4/Cx5+snchwVwVjL0Ky3 J5QDbbr+1X3or2pu6NcH6STOKRDz+KjTKQWQstl/3rAfQKJMU1IqQxIQtQ8HkQtMz+Qw mVjkG/ZsRCO5EcRCQe36DZ7Twy6cviaOnLcbM/l3P7YWHokcJkethkaO5ZJ97nAXYTnj iow1Wkde0Y9CWYcFj0E0aJB73D7CvzgRtTjTq/sEetGYKnvCn3YD4g/7qaogYN0ZRBJx +7Ug== X-Gm-Message-State: AHQUAuYWP0Z3YsGuqlRTaieg+wE5qsLzyK43KNuO8inYybPzvDgr0yuy hqY6SOe55hh6ZxWfHSPnBNhakw== X-Google-Smtp-Source: AHgI3IZDb7JzDbFuJfzdE5f/zY5bCfx61C1chkHlbE9OBlu3hXjXN3Fp4mm2dOAV7e75keLcB04ftw== X-Received: by 2002:a1c:7304:: with SMTP id d4mr6467825wmb.136.1549881435805; Mon, 11 Feb 2019 02:37:15 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id i192sm11121275wmg.7.2019.02.11.02.37.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 02:37:15 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 8/8] usb: ohci-da8xx: remove unused callbacks from platform data Date: Mon, 11 Feb 2019 11:37:02 +0100 Message-Id: <20190211103702.4277-9-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211103702.4277-1-brgl@bgdev.pl> References: <20190211103702.4277-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_023717_707971_04C6A273 X-CRM114-Status: GOOD ( 11.78 ) 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 , Linus Walleij , 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 There are no more users of the platform_data callbacks in ohci-da8xx. Remove them. Signed-off-by: Bartosz Golaszewski Acked-by: Alan Stern --- include/linux/platform_data/usb-davinci.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/linux/platform_data/usb-davinci.h b/include/linux/platform_data/usb-davinci.h index 0926e99f2e8f..879f5c78b91a 100644 --- a/include/linux/platform_data/usb-davinci.h +++ b/include/linux/platform_data/usb-davinci.h @@ -11,22 +11,8 @@ #ifndef __ASM_ARCH_USB_H #define __ASM_ARCH_USB_H -struct da8xx_ohci_root_hub; - -typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub, - unsigned port); - /* Passed as the platform data to the OHCI driver */ struct da8xx_ohci_root_hub { - /* Switch the port power on/off */ - int (*set_power)(unsigned port, int on); - /* Read the port power status */ - int (*get_power)(unsigned port); - /* Read the port over-current indicator */ - int (*get_oci)(unsigned port); - /* Over-current indicator change notification (pass NULL to disable) */ - int (*ocic_notify)(da8xx_ocic_handler_t handler); - /* Time from power on to power good (in 2 ms units) */ u8 potpgt; };