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