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)