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