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);