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