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: 10805499 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 3C08417E0 for ; Mon, 11 Feb 2019 10:38:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AC4029E33 for ; Mon, 11 Feb 2019 10:38:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E9F829F50; Mon, 11 Feb 2019 10:38:00 +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 C480E29E33 for ; Mon, 11 Feb 2019 10:37:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727172AbfBKKh6 (ORCPT ); Mon, 11 Feb 2019 05:37:58 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55452 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbfBKKhJ (ORCPT ); Mon, 11 Feb 2019 05:37:09 -0500 Received: by mail-wm1-f67.google.com with SMTP id r17so16680166wmh.5 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=H9eBEcIC3yisZpceKZ94abmeKrZtTB0Qtv3ITINMFy4V6wZ+Ng0zHdpWWTvZiABOKr p6Hg3Yp1l+ejwSteIbNh5spSj5OE8JBzLZ/ot7NQsHsWsMu8NfR/Noc+X5CogjKREM73 yi/RMxu4U3dQ0q1lb+NM3GrVoeFiTo7p13Cmdmuk+tHYwXPF/i7nVshSpxw2T4Q6vt09 ykzCOS7ZMVRrwpLCtVpaqAEJ1TYBjKB99UyuHzVCWGVdwbZk3l/bapBbUve79Hg0qTWa yw9+I36zFDwbCjJfzVtrVkRMv7tWO8Z7bzfxckhFWb4JjaGCiWbvxJV3ZlLoOGIoCG1j JsKQ== X-Gm-Message-State: AHQUAuZGbz+VwzXcAmIlWyJ5rDDZIOtlUey2uY2+BLny3+nyeJqt5Piq h0lvDPgMv7Z4qdS0JQTzXYagE7L3W5U= 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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 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 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: 10805497 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 369D96C2 for ; Mon, 11 Feb 2019 10:37:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 261A329E33 for ; Mon, 11 Feb 2019 10:37:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AC2C29F50; Mon, 11 Feb 2019 10:37:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-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 BAA0929E33 for ; Mon, 11 Feb 2019 10:37:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726819AbfBKKhM (ORCPT ); Mon, 11 Feb 2019 05:37:12 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53286 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfBKKhL (ORCPT ); Mon, 11 Feb 2019 05:37:11 -0500 Received: by mail-wm1-f65.google.com with SMTP id d15so16811212wmb.3 for ; Mon, 11 Feb 2019 02:37:09 -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=WYa1oQHX9VdXoC9pHuddM8KxAdEI0boSdtfSwJfdD2sHizfQJ3ftcgcdpq9Ru0SVWp 6dVHqGqNyeRFhrkVyJrEer8w8OWHnMduiRJEbc5fwL98bvunlj+BRCC8RorNUkPx14O2 ypqmlLuM20JVTNPtyYLD4FvI3DeDtDZ4GOrfP89QmqquxbKyba46pgb5nJ5tlULaRMSk 3KSvBPcfMfUDQEJeHCv3oJK+/hVSHQ2ItUGHwSfTisef7dKkc11sUhxi1H8SpkOV6VvC Fmt2ZYiXAi4LQll35lXUSXeBybzmrtuu84VT7L868Kno5r8FjQRo6Ped7vw9mA0dQIYh cTUw== X-Gm-Message-State: AHQUAuZ+xyxnVl68pS8qnq3hhnyeWg/o4PWyB48ZJAuOLoAvhyIekdy8 Qzetlh+uZ1J1zq45qwMnXHdE+Q== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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 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 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: 10805501 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 0530117E0 for ; Mon, 11 Feb 2019 10:38:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE97029E33 for ; Mon, 11 Feb 2019 10:38:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE4D529F50; Mon, 11 Feb 2019 10:38:00 +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 5984929E33 for ; Mon, 11 Feb 2019 10:38:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727171AbfBKKh6 (ORCPT ); Mon, 11 Feb 2019 05:37:58 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38535 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbfBKKhL (ORCPT ); Mon, 11 Feb 2019 05:37:11 -0500 Received: by mail-wm1-f66.google.com with SMTP id v26so16308474wmh.3 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=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=JJdc355nqz7A7WEYEtx6e3uI61o2cLRQXvqJAfJVY4khnHZNY2Cd2bD63WE/0j6HDc wfe2M1Ea96kclJ7DWtaitGTDaIeobGedxK1voYfv759PLWpIA5j38Xr/uWHZNDQJ4l9i DvKlT2oICVKUJ69qYOuuQdHVTt10fZwxw29RM1POC5BMGIyQXqcynaC6wOBTIIVN7vGM ZBvVWGbPJXnjQVRL1NGUOna36o1kJQvz54R1zCyUPsbjH3MJKnaXFp0zjw9X4GsBSQGi d2noSqMWKek5mkQnwMjFJTVN+yjMFx9DCVaJCwl5X/FhhcwyHBErFPr5ntT3K5r8kD7K yTgQ== X-Gm-Message-State: AHQUAuaF7c/J2iDd8V9S7EdxkJBUJcqPGsyF+OPk0lqhppxdnx4V56SA pMiw6M+cigl8v9ws5d4cpkd6Nw== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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 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 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: 10805495 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 6A7AE6C2 for ; Mon, 11 Feb 2019 10:37:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5927A29E33 for ; Mon, 11 Feb 2019 10:37:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CF9229F50; Mon, 11 Feb 2019 10:37:57 +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 EDAC529E33 for ; Mon, 11 Feb 2019 10:37:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727170AbfBKKhz (ORCPT ); Mon, 11 Feb 2019 05:37:55 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37313 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbfBKKhN (ORCPT ); Mon, 11 Feb 2019 05:37:13 -0500 Received: by mail-wm1-f68.google.com with SMTP id x10so10932390wmg.2 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=I1iICrnreVghrsX3+24Ook2slp/NRpuMwhys5lrU/hTnKdRz5aClQ8ZYyNHx4RQnWG qCrtDK4XmI9gflmrMVjopYsBsYP/t/quI67V9bNdNqylOZpy02pHkKWB2PKFYtafFjCw zGY5XhI1rh8cUUV0k0GH5iqj9V6i7GrzPeFZbQJjSELqqh6yEOkQtl+PBsOXel9OJIk6 oxkhidCoExQZWDB045jW603Vk+9E4+mPFUjVX2Yfyzgluwy7rB1xR0ftKQKRcftNdI/J gew0UuuP3oRc6N1/F57brz5LhoOxoN8rBIyl3oiD6SKACYGX/wtjPR3K0SRdGBpoqhQg MKRw== X-Gm-Message-State: AHQUAubjWso+BQOKfqqnvoFWodXR2RzNXA37An8IvkF2d5VE9S9fiwDH tCFtVtVMwg1zVRF0PKpd+uEprw== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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 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 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: 10805491 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 087A617E0 for ; Mon, 11 Feb 2019 10:37:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAA4629E33 for ; Mon, 11 Feb 2019 10:37:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEB1B29F50; Mon, 11 Feb 2019 10:37:51 +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 8616629E33 for ; Mon, 11 Feb 2019 10:37:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727123AbfBKKhj (ORCPT ); Mon, 11 Feb 2019 05:37:39 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36842 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726860AbfBKKhP (ORCPT ); Mon, 11 Feb 2019 05:37:15 -0500 Received: by mail-wm1-f68.google.com with SMTP id j125so1350265wmj.1 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=iV7SH/kANmNMV/gVhg/Hi0vlfzo7j19SlxGC/RZlbUg7elQaGcD42e9fzzA35sfepV IWVaKRYtFjofRFhq53sFdfk2PeGgeDlzln7OtLM/vRU+xhi3nraTeclewUzHXMCuctYf lkO6miEki+q+cX7pnMfNEYZD/dh02F/g8dBtrreYF/y1q6pMXyf13u6VxXQF/29cvLMT DLhtt//N7ZqzXY5EHwvDP/8tf3hnYV1QG5HfVtlBLdq/DSn7rVyg56HKg5jc1+JPr+yW 1m+bkit/ZY/UHcO+VUlbv+Jsa14BEmHNUeJyYRVQHzJVxnCiY0HoF0Y5qMMi2ldu+i+f IIDw== X-Gm-Message-State: AHQUAuZvLTCzYAxV0OUIyZAQOkiKKct9fJktnnDUIEt6HSKAcKQFHcFK eTwbd93g7p8NAytHU6IpG4lnVQ== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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 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 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: 10805481 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 7EAB217E0 for ; Mon, 11 Feb 2019 10:37:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D6D229E33 for ; Mon, 11 Feb 2019 10:37:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6117B29F4D; Mon, 11 Feb 2019 10:37:18 +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 E228B29E33 for ; Mon, 11 Feb 2019 10:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727018AbfBKKhQ (ORCPT ); Mon, 11 Feb 2019 05:37:16 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55473 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbfBKKhP (ORCPT ); Mon, 11 Feb 2019 05:37:15 -0500 Received: by mail-wm1-f66.google.com with SMTP id r17so16680964wmh.5 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=GNrPGWAMMYBQoCyUb3VfhczsdDb3nwlz95sckkcLhCHvGZdgXUGCb/QQmF4sLqFcK+ o7R+Mz4RdFI4WNrNBnjqqJK/qlGhiJs4uPqKMUhov3mtR5nkFOsXydbJzSLS0JwWrLdV 9PYD3mdSCVfwxC1RjgKekDVSVUsFyy8yt0P+zpDvCfFRfCFbHNzHAS+fD/2pMegFJPMH C1ZBhgNhCuM1SSZ46BrpzV7wSylX/9lOMBUSCvCQFrylU96dTftY/P2ijlnvIx2ZKqMs cRr4W1oY7rJdIKYmYmpibkq5BVFX0GJ/BfpgfqVWiY2ZLpoj7BSfULEymymq4Y6xoDAT Wc0g== X-Gm-Message-State: AHQUAuYZeerG+X8fe/om08ta4Mo1n63/JA3geIbIGw4tUOjjgksZjGK+ J9xZ+ZP+j5AEbB0o5auHiNzgUA== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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 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 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: 10805487 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 D652017E0 for ; Mon, 11 Feb 2019 10:37:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C57F329E33 for ; Mon, 11 Feb 2019 10:37:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B960B29F4D; Mon, 11 Feb 2019 10:37:37 +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 4932629E33 for ; Mon, 11 Feb 2019 10:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726756AbfBKKha (ORCPT ); Mon, 11 Feb 2019 05:37:30 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:51446 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726985AbfBKKhQ (ORCPT ); Mon, 11 Feb 2019 05:37:16 -0500 Received: by mail-wm1-f67.google.com with SMTP id b11so16818749wmj.1 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=lSWpdE45JRTJZZJRUZhSOkIuNrcZc9sFUbClx7e+uMK2F9YKydfBeeieXqFtvxkh5R xXXPqIz7C+DjCdbnF1TXvBijdNgblb4D4q2sKIRqBOho89oPMK2uOji8yqcZanQHW9wv LTOpIISNbPvKlx9sGj2UNC0Rk67pGLrXp4XST3HS8EoNhHRhLyoWGiVhFRmWqGsHSXg9 2mvKxRwbg3Oie7YiygAbXcM08uCb6krP9gSmoPbMQwKLa5TG9d2xpVoqD8K0zGS+qsVT /CDPuKDxLVgKt2cXV5u2B1wnrngXjgQQntunPYU50/2a3rPqDG6mAvTTaabes6VQjSMd BFUg== X-Gm-Message-State: AHQUAuaqwW741jb+ONI5RdZOaOBlbUuG1pC8eEcsPFj/cBRO+awZbQU9 s+wTUuy+cVnfHxAsZZKVmS13BA== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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 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 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: 10805485 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 EA9F917E0 for ; Mon, 11 Feb 2019 10:37:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D975F29E33 for ; Mon, 11 Feb 2019 10:37:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBF9929F4D; Mon, 11 Feb 2019 10:37:29 +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 758F229E33 for ; Mon, 11 Feb 2019 10:37:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727021AbfBKKh2 (ORCPT ); Mon, 11 Feb 2019 05:37:28 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38566 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbfBKKhR (ORCPT ); Mon, 11 Feb 2019 05:37:17 -0500 Received: by mail-wm1-f65.google.com with SMTP id v26so16309183wmh.3 for ; Mon, 11 Feb 2019 02:37:16 -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=E3gSD5P9mccgfl8Vm8MCydIoXUlpMD/6BfzkN5EoadtU1wfFEyCsXU1Irvid2JS9ea lfFw/4frZz5VIP+VAASasFnp+IP8oXDRvn/89y9nH5DYhXZditXLDHQMhDHiq0QdEv2w Xsw9wOzU+hh1rL2VD85iF5CZE9NrJzpqihIXXaTSKduX2xfmxbHxjZ/1+qNoUlR2p6ZD pKroiO1gN38D4yE7EbmMNmwydtGoKI9+eOXEtYhGHyex6eqbftCeNCss7j5wZLs1NS9X 1xXR0pk2l8Mj6q8M134nFrfyZcJiUNdfN8I5sK+O6a9lZihW6zVL93crGAAsAyuto2+5 7TpQ== X-Gm-Message-State: AHQUAua5ZCQ83V4DmlPJcMOp0SUfaQQjDoSM9Lw1J1BP4HYQh4P5OAyD CfOJSoK/QshAcEFXdeBHv5QlmA== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Linus Walleij , Bartosz Golaszewski 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 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 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; };