From patchwork Tue Feb 5 10:25:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10797257 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 435D014E1 for ; Tue, 5 Feb 2019 10:26:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EA872B5E6 for ; Tue, 5 Feb 2019 10:26:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22FA02B613; Tue, 5 Feb 2019 10:26:44 +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 D00102B5E6 for ; Tue, 5 Feb 2019 10:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729100AbfBEKZy (ORCPT ); Tue, 5 Feb 2019 05:25:54 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35719 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729070AbfBEKZx (ORCPT ); Tue, 5 Feb 2019 05:25:53 -0500 Received: by mail-wm1-f66.google.com with SMTP id t200so3039131wmt.0 for ; Tue, 05 Feb 2019 02:25:52 -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=3EpyubzHmpBYIwWB1kg4OB1nrghXCzVSBiVe35BMGlw=; b=RSbmwGTBNDzgAS9Lt5lvqih71f9/sSFeCPyK4eSrPS/tAUmSE0BmxWJCL8iRsztWa2 N7Ey0QqNAJhyEeCLmi75nu9eEOqEjoEG5FevLevCJl1b2OVPUxoPEM2eyBrIrDbN1H0W 0Ru8fiaYlFq9ExKOYyTigL4V73NED9/XzLSrl/vUT6d9szov+BqWikXT6kP8sXQ5SCIX ZcXaTp3S3O745Pm/38VvFntkDoOAqG7WnAGlYE1EqszR0ArSnWRZcadksSZTJ7SMCpmz 7WyIHZiKwtdqx/e/Ndmjz8UcCWYJbQ8H/jwC2TmZMVMz9rDQU+ZgWTENIh2McrH0dvvK 6UMg== 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=3EpyubzHmpBYIwWB1kg4OB1nrghXCzVSBiVe35BMGlw=; b=DfbWHoWIeN4c3V0Iw1a2p0O1LUd57CDiFtKGLv1PfO4bhj4CTqeIS9UvZvYovqBmPY oBxFK5rvce848LnWxg170F4n3rF7Ivlc1kEf1Gdrl1gFMuVEToySVUqQy2981etjg/Ok eSGf7RhnLqbuUYomIVVdxb7owFVH15tvmOuuZU3sRLiWgtW8XIa3LJ6GqZ3yAKkJ765d dl1aob2y7ZkwATGlr4YDlF7vTD953e7VYxJj+0o1342BMlb8mC7U7cN40GyQhpsDRQI8 CoMPQVqKW4DwIRa1PJ7d4fT3+HJsfrH9IVfisPcKcCM3G6eZJekW2KogG+y54WDYWztE q8Ig== X-Gm-Message-State: AHQUAubDL5WmTePviSbUZrEQgrxwU8v8UWuD5LWqIS4faTXPIj83sGoY Olk+VDdqxuUk/yPulRRoS0cMoQ== X-Google-Smtp-Source: AHgI3IavTgvkr8R3vGnWMQgauROLW65WfKaGxIbsFxWdWDcT0vKa4XoS0uCH6ylybl6tTZuKkciMew== X-Received: by 2002:a1c:a851:: with SMTP id r78mr3118795wme.120.1549362351739; Tue, 05 Feb 2019 02:25:51 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r11sm5132396wrx.75.2019.02.05.02.25.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 02:25:51 -0800 (PST) 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, Linus Walleij , Bartosz Golaszewski Subject: [PATCH 1/8] usb: ohci-da8xx: add a new line after local variables Date: Tue, 5 Feb 2019 11:25:39 +0100 Message-Id: <20190205102546.29457-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205102546.29457-1-brgl@bgdev.pl> References: <20190205102546.29457-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 This improves the coding style. Signed-off-by: Bartosz Golaszewski --- 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 Tue Feb 5 10:25:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10797251 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 B2B7913BF for ; Tue, 5 Feb 2019 10:26:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1DB32B5E6 for ; Tue, 5 Feb 2019 10:26:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95BD32B613; Tue, 5 Feb 2019 10:26:38 +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=unavailable 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 8B5122B5F8 for ; Tue, 5 Feb 2019 10:26:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729131AbfBEKZ4 (ORCPT ); Tue, 5 Feb 2019 05:25:56 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53924 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729089AbfBEKZz (ORCPT ); Tue, 5 Feb 2019 05:25:55 -0500 Received: by mail-wm1-f66.google.com with SMTP id d15so2976534wmb.3 for ; Tue, 05 Feb 2019 02:25:53 -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=K28XEDucrkZ5vgvjZiASy101nZ1AxRRv73xLLYx8KTo=; b=ekRvCqVm+xtU74RrKwAd41IXAQxFSUFWlIaLg+6J5y6MeIV8O0g8TlaAW2Eov0XQQm y/HjVMN0gITr/hb4ExYPvvq1spFo7qSblVl89fVAdjiaXYZOHZ2biaQ2mCmHDlUCJMKO ziNuBragCMqI+Ly6/ni8rdUm3AUkiSm2YaHwJGzSrzyaoI1yqR1mAalt0oQH36iIXWz1 5t4awRrARZsiUJLbULx47sKoVI+hwQMwH0+C+BtKRaLfhP8auKY0BWqv9Y8UgKlcnSGT hgAwAzx4ES6MbvLyHyYJuYlXIHWEuqfWdOvWUuzE+ZFVFUiYX/U58UGXWV5pjxwNZk1r 5Bow== 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=K28XEDucrkZ5vgvjZiASy101nZ1AxRRv73xLLYx8KTo=; b=EM90CJ15mqTqoSqIOuhBR2hqdtLZ1fcDj1niwgMlinPmYOnmUfiFowIGmBFJI4LGgJ IdWX1xhuSpJxdt1toIh0wEMZ96I2bPhG0+U1oE3OyuLxhrAaoI6+FM7Hs/FaXJfnB/aQ omCA2jVpmUyO1rH0kGWwwCKAfgLVTjH/CtRLITAgRFmlIyg2espqwX8hgY665THzSb5N M+znHFflATjKQwjTs9qvIeD9Tv1xVarGgUqGd7Gj0kNj3T+syy5FdpEMkWGmnX0RkjyA 0Ij6fHNG113kUQO4u6ARt0YiTdq3JmfsneZMf7gGUI7971X3ipVw6uiHMVQnoXMxUFJe 2gOg== X-Gm-Message-State: AHQUAuZWaJawvD6IVwy4HKvNeqYt10FYOZMwdAo/Dulqtm7wj8bPRVHp avXRvXvmd68a1Dr9/VzbkK8tNA== X-Google-Smtp-Source: AHgI3Ib4vgR76sqHah7iOtB1dwjhpJLu9RRaSYtef1Gl8/yjMFKLzYEFWOGmumqju+OJB5OeNt9X9A== X-Received: by 2002:a7b:c5d1:: with SMTP id n17mr3113741wmk.152.1549362352910; Tue, 05 Feb 2019 02:25:52 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r11sm5132396wrx.75.2019.02.05.02.25.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 02:25:52 -0800 (PST) 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, Linus Walleij , Bartosz Golaszewski Subject: [PATCH 2/8] usb: ohci-da8xx: add a helper pointer to &pdev->dev Date: Tue, 5 Feb 2019 11:25:40 +0100 Message-Id: <20190205102546.29457-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205102546.29457-1-brgl@bgdev.pl> References: <20190205102546.29457-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 This improves readability by removing all the &pdev->dev dereferencing. Signed-off-by: Bartosz Golaszewski --- 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 Tue Feb 5 10:25:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10797253 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 3B3A517FB for ; Tue, 5 Feb 2019 10:26:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2800A2B5E6 for ; Tue, 5 Feb 2019 10:26:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 194DB2B613; Tue, 5 Feb 2019 10:26:39 +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 BBCB32B5E6 for ; Tue, 5 Feb 2019 10:26:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729118AbfBEKZ4 (ORCPT ); Tue, 5 Feb 2019 05:25:56 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37106 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729108AbfBEKZz (ORCPT ); Tue, 5 Feb 2019 05:25:55 -0500 Received: by mail-wm1-f65.google.com with SMTP id g67so3007652wmd.2 for ; Tue, 05 Feb 2019 02:25:54 -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=27fRyiWZ0ynKcoArUhLUGUmMVLR0Snw6wALdX/O3/sY=; b=pLsvjfhe2Sy72wpGSTZbBewjTkEl0VspBE+T+E1szo5SGxX/EqNhmaSDxa3VaAqpk9 iY2q1k1tvbYR0+FRyPooAuFg0g0K8hhpfw4nM1OANWTI71KI9xXCCo9nBal3lNDDgF6r HZ+sITobg8KTheefnAdWQ9ZdtUct49EseHmWHNHmeowUg7BwLt+ipykYCYmspsbo1zdk ka8b7/Jqgyf3vrDLet67yeyIvSmvtKHUr/CoKABmShP7IjSq0sVDZZIZOiB4z0kH9Oph GHUQgHiP8LWxqWEho9Y79r69uOk/mtB6Gu90H9poeiMKKX/ygxY+E+28X+OtMsZlosAI seUA== 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=27fRyiWZ0ynKcoArUhLUGUmMVLR0Snw6wALdX/O3/sY=; b=Gj7S1ycUmz+L0yeyH5RX9DG2f158QKr5t2aT2upYnoP4SxwfKED3s4Opm7QLwckbIj ARMtd71frb4Td+J3JN8yBgLtru/xkFP72f5kVCoT/57jPCKGKc3Nfo/EPpCoXdsJAr0M 2HBpr++2HV3haTqSl2b6PUOUw30rEHWTtldn1ThxNkJo1nAz840tlhOuQ4AsF83sRTdo Zzm3VayU/WcppitX0qWU46XQZLfOJ2yPIPdg0Bv3bOGhQXxNfIlS2relyLqOVkC+KfLF 3pLkT+qCk7mcOaqUGH4JpcMECj3WII3YIdDb8MTTNqG9oXjOSa1DCWHFzucRIfhGP/Kf sAGQ== X-Gm-Message-State: AHQUAubukSvCQ4XW1+2fk2S63bStHnY5n6c2vbkBgIsBf7jbx7Ynaugm +w+n0NLE/xzTzggmlZutBHxnqXzeYfw= X-Google-Smtp-Source: AHgI3Ib//l3NPzOtNoGwt14htmcBcVhmPw9WtBzSknykhyhvUWdPbFvZ/ophHf3xBiYQnoYsUR1X9w== X-Received: by 2002:a7b:cc86:: with SMTP id p6mr3022054wma.19.1549362354011; Tue, 05 Feb 2019 02:25:54 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r11sm5132396wrx.75.2019.02.05.02.25.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 02:25:53 -0800 (PST) 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, Linus Walleij , Bartosz Golaszewski Subject: [PATCH 3/8] ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios Date: Tue, 5 Feb 2019 11:25:41 +0100 Message-Id: <20190205102546.29457-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205102546.29457-1-brgl@bgdev.pl> References: <20190205102546.29457-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 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 Tue Feb 5 10:25:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10797247 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 8B1F414E1 for ; Tue, 5 Feb 2019 10:26:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 796E72B5E6 for ; Tue, 5 Feb 2019 10:26:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DA422B613; Tue, 5 Feb 2019 10:26: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=-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 1C5AD2B5E6 for ; Tue, 5 Feb 2019 10:26:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729146AbfBEKZ6 (ORCPT ); Tue, 5 Feb 2019 05:25:58 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38335 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729067AbfBEKZ4 (ORCPT ); Tue, 5 Feb 2019 05:25:56 -0500 Received: by mail-wm1-f65.google.com with SMTP id m22so3014606wml.3 for ; Tue, 05 Feb 2019 02:25:55 -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=nLOzCbKWD80mlDEOSPNdWjjwiH1Ipwg9Oy8HlbpRsTU=; b=vAP2BenTdlZm0orJT9mvE5UCY8UMTRZWEauOeamJFuOW/jGj8fV0mV5qFzFJewGLbd JFvmy55LgY64QP96lKrxdgpMGk5FKq/S/1k87WiFOUlqOhikHS5rlh1d0xd85+lVSiN2 6XbSQGqrFt6QE09vtEoqi1amlddpYzcJUvbAeWNelZlMH950txMHvgmu5vuzZ9/7mTFU QuA8YIzd8l+XEnXIuky08t/ZDyZXHQ7xC5ht7UH+YjMNQsBmBqh/pOiEqzpnY9ME/1by vwWnckJ7Qpl80NXD+g/CAHh/uTr8xhTMeCKO4AOrmo0L33jELUp2X54CUdkWM1zyOkqA 9+CQ== 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=nLOzCbKWD80mlDEOSPNdWjjwiH1Ipwg9Oy8HlbpRsTU=; b=TLiPUy9+221SDjbjiUNdx8M+8OrnvAUfRc2Cc/dQKQ9fkCs9AvQou4dxz1Du0QkJuL VAydRGB517gJmepbX0VaAdrPFo/g0Bfojn1vrxP9eIIPfAc3/vJowIahwwyl64gMcMEq kIgBp8W/Wyg4k84qA0MeCAOTl04dGgSBvcqboEpaiTPY7wCSRy7Y1tSEAnZ7Ywgv5mIl FXp7WkH3I/LQrTWB5aW3xC23uhD5DGd+sfFBnH1gTVwj3Ehf3yNfUl+Ms9laBKkVZMX2 LuuAvsJitPngrIlfPe14rDcx34Ogl0j0B/BBFQBRUlBSaWmvxQY1nusuNrcaCtTZzfAg C8RA== X-Gm-Message-State: AHQUAuYDjQqysqFmE/SF2nA3KjCS/5TxqbMAKoklP9yKbACVZ7ABWXq7 Gmb0HsUUCaUPqErn/gYhOtFpoQ== X-Google-Smtp-Source: AHgI3IaAs81CZZtfteh3BPxtLJAaLsBYbc/ux/lHNRGTT8q5dKsCcDlFmHXEK/CTWJ+bO9cLbgRPNg== X-Received: by 2002:a1c:c2d4:: with SMTP id s203mr3088898wmf.3.1549362355078; Tue, 05 Feb 2019 02:25:55 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r11sm5132396wrx.75.2019.02.05.02.25.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 02:25:54 -0800 (PST) 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, Linus Walleij , Bartosz Golaszewski Subject: [PATCH 4/8] ARM: davinci: da830-evm: use gpio lookup entries for usb gpios Date: Tue, 5 Feb 2019 11:25:42 +0100 Message-Id: <20190205102546.29457-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205102546.29457-1-brgl@bgdev.pl> References: <20190205102546.29457-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 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 Tue Feb 5 10:25:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10797249 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 3D07514E1 for ; Tue, 5 Feb 2019 10:26:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27B6D2B5E6 for ; Tue, 5 Feb 2019 10:26:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C6352B649; Tue, 5 Feb 2019 10:26:38 +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 EC4102B5E6 for ; Tue, 5 Feb 2019 10:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729297AbfBEK0f (ORCPT ); Tue, 5 Feb 2019 05:26:35 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38339 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729089AbfBEKZ6 (ORCPT ); Tue, 5 Feb 2019 05:25:58 -0500 Received: by mail-wm1-f65.google.com with SMTP id m22so3014730wml.3 for ; Tue, 05 Feb 2019 02:25:57 -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=u/GL6TAVsAWMWv6rIhzwoCCzzRgo3ZMIcqFR/djAd6I=; b=d3WKo8eB3yRzuClYyGTdXU0QVvC+8MO/2cTApJ7QNZr4Q89dri92jyiteAPtxwYxpf 7fv1gKogUJUyjhhc2yl6yXHClcOWPspuYPDwzIKER+Qr2LBm0TKG2SKYsxZGl+gyqnuc S6em5tcP0q3QFCLhEiu+tMWLM3Md+zUNaTFok2erBYb/I8hrthWdu2e4unrHW6yQHAqE o3r1uVTYVTnWnLyTpbXcgH/Wz0L3OQY9uHGHSD4Yw0gf5nsnjGOpSQffaIN4i4VdUu7X AhoalZvbCJ6dfzbOeHakNo/Z0Z/a84r1eqpFDi7/kwIfCKxa53/QYGgpqiUfq7F699/I dWIA== 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=u/GL6TAVsAWMWv6rIhzwoCCzzRgo3ZMIcqFR/djAd6I=; b=QJRjTnV2HLUn0h5C8YRPWN86kEyN+Zw0nnPQ+N+g2En/bMDl0SDV47w355T6hqieAn rt3h/FBW0kD31iemzBmv5C7YA48XGGKwjBd+ePysrZ/qgqjFzEK99yYhHblDejD8Pu5+ KidFT7MDeIzjsX4JvYkbln0xx/CXopSaQge+2H2PoMF5IJZgGwrQjoZ+oumkyPvIBF+f ZiSz+0w/IjG4HRBms74koTAftxNc0hJZeyGDFnFmDWQWyAAURM4LQvrEriC35Nc//t0i 8L3NhHjWh38loxxp0hYGGHtz6mW4ykjQdrf6NmefBYfH1kcBJI9JLUl+fiqIBz2PzK+F TYug== X-Gm-Message-State: AHQUAuYLu8p5Bq5ez3YUBpN1/vuHHVdOO5FWSvMxfiSIdtXdevToFb+A hlp+M9buhK34G7ElZcnqbch3Vg== X-Google-Smtp-Source: AHgI3IboT4sJytApBlOT4oNjPmPFzKoGAT3aHPsK5SJ3CRAsX2jkrXCefUsNtMGSfW7Xr+RwMGtSOA== X-Received: by 2002:a1c:e345:: with SMTP id a66mr3070901wmh.12.1549362356311; Tue, 05 Feb 2019 02:25:56 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r11sm5132396wrx.75.2019.02.05.02.25.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 02:25:55 -0800 (PST) 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, Linus Walleij , Bartosz Golaszewski Subject: [PATCH 5/8] usb: ohci-da8xx: add vbus and overcurrent gpios Date: Tue, 5 Feb 2019 11:25:43 +0100 Message-Id: <20190205102546.29457-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205102546.29457-1-brgl@bgdev.pl> References: <20190205102546.29457-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 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 --- 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..a4aa0c473c4f 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_cansleep(da8xx_ohci->oc_gpio)) + gpiod_set_value_cansleep(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 Tue Feb 5 10:25:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10797245 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 6C47213BF for ; Tue, 5 Feb 2019 10:26:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B5442B5E6 for ; Tue, 5 Feb 2019 10:26:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FB9F2B613; Tue, 5 Feb 2019 10:26:33 +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 DECFA2B5E6 for ; Tue, 5 Feb 2019 10:26:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729294AbfBEK0c (ORCPT ); Tue, 5 Feb 2019 05:26:32 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35993 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729144AbfBEKZ7 (ORCPT ); Tue, 5 Feb 2019 05:25:59 -0500 Received: by mail-wr1-f66.google.com with SMTP id z3so3004051wrv.3 for ; Tue, 05 Feb 2019 02:25:58 -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=MoAHwcxemgeMFWMQt4IdehE/7Fdw7yCzsmTWpDEnr1CEQQbs/ddD4vX93WWur3pRVT 9KvEXV+cxsw9u+g3n0+IzpCObafCXqv4aKzH/I8wez8C/0suiYi9VR2pfRix+uaQ/jSJ QHuClehNjVoP0tEtdK4/khhrZ3Icej2tk2LLBc1VmAAD1UYDLuW75GXX0cvH1qKvN9EH b1xHsIL2PxLzW0gEeZ63b6xJQZdRBSGZ1uZGto0pyimuwKgbcym/pObsPUS89u9EYHTJ puT3NdlfRn03FTs9PcGu+2IICupyTvSEYAcoNW6ej/M+R6cKoK5xie9TZkGj1bQzN4MQ eTCw== 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=kRXxSnAwS5U6/404nFDX/MPxJl8UXtnN5PjvonSYSgbAPvTqQ76sKEc38/Vc9/r+mw fNZ9XUyehN6MhbdEe07eJZOe3UttOKtbfz0e3H3CAcPKcb7d6FUhAue86stpUsM81zUE rLVUwoY6reFhXb745r7JkYfg9LJm8qU7R+oWJ+UAsFYxHfOW70QxzQJW8UoCgnfvejSg kaHm+g4gJf4MQ93CeGLypMnsrLW1oj3HQjB8JvstcN7ZS997A5UD9ChWFfU3EpJPpxbr Zjv1UzNxw+WeiDPXi+LIhGdY2K33nhA6LDity6Df9PnbtrKqk8TDvItdlQQQ3j+z/wM1 0ebg== X-Gm-Message-State: AHQUAuanjMJmwo/ciXgw5727hX1HWGljy1CfaoLVE5uEVLsyS/VixyXf +o0OVlRXhsKlc9W7bZJEVYjGUQ== X-Google-Smtp-Source: AHgI3IbX4VJ9GcfVZ5wpdRdpWJ4nD2fAZBEhplwdWN3bhxqRzFHpzwHkY3dH9afTxW0lezeUb6XNUQ== X-Received: by 2002:adf:a28d:: with SMTP id s13mr3247348wra.100.1549362357530; Tue, 05 Feb 2019 02:25:57 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r11sm5132396wrx.75.2019.02.05.02.25.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 02:25:56 -0800 (PST) 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, Linus Walleij , Bartosz Golaszewski Subject: [PATCH 6/8] ARM: davinci: omapl138-hawk: remove legacy usb helpers Date: Tue, 5 Feb 2019 11:25:44 +0100 Message-Id: <20190205102546.29457-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205102546.29457-1-brgl@bgdev.pl> References: <20190205102546.29457-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 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 Tue Feb 5 10:25:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10797243 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 3B79B14E1 for ; Tue, 5 Feb 2019 10:26:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A43D2B5E6 for ; Tue, 5 Feb 2019 10:26:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E1842B613; Tue, 5 Feb 2019 10:26:32 +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 B0AEF2B5E6 for ; Tue, 5 Feb 2019 10:26:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729267AbfBEK0Y (ORCPT ); Tue, 5 Feb 2019 05:26:24 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33019 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729168AbfBEK0A (ORCPT ); Tue, 5 Feb 2019 05:26:00 -0500 Received: by mail-wr1-f68.google.com with SMTP id a16so3025113wrv.0 for ; Tue, 05 Feb 2019 02:25:59 -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=1acO/TzaTS03s9bceKurSqbS0vnd6Wsw05XIWMfb6Q2TUUfpvFDveRnfJ2Kzk4em+l OjQL9v8R1DrfVaeDQKUkF8JOrVbqpzOgHmFXnRmTr92FWfHKpJddgbQc7TQmC4ztVaS5 tPZtuw7wux1ULY4TvoZEMToU38yEeWQi9Twg+kDMuTrCEdw6plCxpJX2C0ihtxWe2TC6 ey5twDj3VC8lUzf9lCYzwyIdbiMb3NrQ6rd5Od4Kic4x+LZIisPDbAi9+PTCNgdbFcCQ zQ0kEbnp3QIochiozQP6p8/PQ1IU5+yylC87Xie+1IvcLeEG7kztOVefqgvRU2moGjaG 0ruQ== 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=bI2ZTRhwVI1M7dOxk4PfhLISZdSJZwHbnxBS/dkH4k0fC9oknYQf2TZHnFSHYAQ+rO 75d+4h3V519Lgt8FLV33VQDhqqqUDGyKk5wX/ZOTlNzQt003/6kGFFAXGBWFP7ALxdTo cmreE9e1M+w5Lf42YU/S4YMECbeYLc/3fkzWBZ45NqiZz+QQZJK9yMR5KGDpK/hxuuCP wB8hnD+IBvA4/QoOJXyY+ODQi1wq/OpjXTOHAQ86YWdyQIHCplD9dv5xQVrLE7TIrf8/ XBRq3PscE/sP1lmykcGq9sjfhPRjdNGgbrIQ25p4knr9MtwKK0u3WXnsT/QaHz9cuQX7 ED8g== X-Gm-Message-State: AHQUAuaGd8Os3HJItXG0D/HYCm3mdT8G3L7igdgF0pwAC7zOP0cdpC4l 902ESYHWBwVJmrlJ0dppa+Re2Q== X-Google-Smtp-Source: AHgI3IaJHGNe/jeXwZM5GgTrUi1I/64CzT56Inrtp+00XAI6g8YCac9ynWVLI2Q0xYU6hZq2/Weg2A== X-Received: by 2002:adf:dd06:: with SMTP id a6mr3225217wrm.2.1549362358789; Tue, 05 Feb 2019 02:25:58 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r11sm5132396wrx.75.2019.02.05.02.25.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 02:25:58 -0800 (PST) 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, Linus Walleij , Bartosz Golaszewski Subject: [PATCH 7/8] ARM: davinci: da830-evm: remove legacy usb helpers Date: Tue, 5 Feb 2019 11:25:45 +0100 Message-Id: <20190205102546.29457-8-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205102546.29457-1-brgl@bgdev.pl> References: <20190205102546.29457-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 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 Tue Feb 5 10:25:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10797239 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 920F313BF for ; Tue, 5 Feb 2019 10:26:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F6D72B5E6 for ; Tue, 5 Feb 2019 10:26:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 731D52B613; Tue, 5 Feb 2019 10:26:21 +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 224702B5E6 for ; Tue, 5 Feb 2019 10:26:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729251AbfBEK0P (ORCPT ); Tue, 5 Feb 2019 05:26:15 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:40340 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729176AbfBEK0B (ORCPT ); Tue, 5 Feb 2019 05:26:01 -0500 Received: by mail-wm1-f68.google.com with SMTP id f188so2973308wmf.5 for ; Tue, 05 Feb 2019 02:26:00 -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=YI7lGj6dJe+1jKSiIdUHdLpV0CJALW0y9vtqdcoWmhk=; b=iWoQrZmyEXVVLnvOIwM5PQVAvKBfwG5luEZW9f/zDaI2O4VZYwnJCOCGzKO1drdajw Jdlx8uDUelkhDw43lxxSIyJGcXjRLaiQDOH9BVqwz0RpcCMstHnysgTHdOqNqVw7AKIR AYv0VaP/sxhn1yM5VsVReX1iSJUPvHn5MqhZW0KyemDeSCMwk+S15yELF9t7Tt7yK3Jr WQUqzNXLO8AeVqz5eIKSAmPVxMtgP/Wb+mK4pL+g/BSJcq27apRzQkMo1J1ikntkZjzO 2iD3KHv2uD8Tx3sY+stWfw78sW5kiMD14wUO1UtIlMU1qjIiHrUzGkrACEJoH+1RkFOt 5+pg== 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=YI7lGj6dJe+1jKSiIdUHdLpV0CJALW0y9vtqdcoWmhk=; b=fph00Z58Ue0ZG0L/XwH6PvyrGrCyQB21/LI15/W+DCvuvyYYiHWtDSSWkmEZO/U9JT 6tVn6aFwp+mdfQawLLq9pGKZv/KVvUPMgy1p7lm/nsXF++UCiWFY6suKRUO9OOXdGh/O lXBxCcT1HLtSOwVc+tD2h6yjRTE//0tnbKda1u8Wffn0/hXybqjbpBmAJs6GsH+644N/ fLsisuK8YKFf5C+ZmoP75RNCI1sVnl64GWf+Ji82hvsIZjEBLJT4KaZp0sYQ2Y/1i6P0 uhdbBdRjYrzTYXyVFTQ+PrgAOFzlmiawVFUXcExXImaLGJY0vTsJDeetHDaqvBSD2NzV GAeA== X-Gm-Message-State: AHQUAubPxNDOlYFLXIx7uuwhMd1ZhDcDDWEUAm+ZV9AwOlVA5NHkTokZ slEgPUj1kuZEEwkcWZKfujEksXBqeIU= X-Google-Smtp-Source: AHgI3IZ4nPR1E+2u8hkBsTrLXyxyY8xsYuSmFe0pJpeHIc2QhG7pGS242qb/Zai3zg/pyR/6JexZLQ== X-Received: by 2002:a1c:ab87:: with SMTP id u129mr3137760wme.104.1549362359927; Tue, 05 Feb 2019 02:25:59 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id r11sm5132396wrx.75.2019.02.05.02.25.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 02:25:59 -0800 (PST) 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, Linus Walleij , Bartosz Golaszewski Subject: [PATCH 8/8] usb: ohci-da8xx: remove unused callbacks from platform data Date: Tue, 5 Feb 2019 11:25:46 +0100 Message-Id: <20190205102546.29457-9-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190205102546.29457-1-brgl@bgdev.pl> References: <20190205102546.29457-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 There are no more users of these callbacks. Signed-off-by: Bartosz Golaszewski --- 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; };