Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1073695pxb; Thu, 21 Oct 2021 15:18:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsYXEtEBSg0VVI65l23FZk4g5JnOqLQCMACrm8WIJnNZqCCLvkSiCftaRdG4tbdDcDzxOU X-Received: by 2002:a05:6402:510c:: with SMTP id m12mr11638235edd.33.1634854734687; Thu, 21 Oct 2021 15:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634854734; cv=none; d=google.com; s=arc-20160816; b=nxmMOI735fbG1zjsRGBPiiPnc5bpRzgHp3seHmTbXLNblLsgBVlJc2olszg2yZZfO2 HvJVLRzSCCNqXAxd0TPrvxh1NII3H/ebelX7JJGi/oBkNEyRm2DYO/nUyABq1mQXtoXL 76h6Zs5/4Z2AaibcU752JQRC8GW3FaznCx3M4LCyLZMBoGmBaY6pYiFLUNXKm29vWoYG AQwj/GX8Z/BEK81idOo2nHyFAbAZKQ7z5NNcPp4rMPkRhAdUPZ5scMtB7eyV01Qi5e91 IZ3ChQigcim+w55tnrxtuC1O6tRn7Ca72pyWN7BUSj8iN3hTQgeKbU1w5EC3DAdhURM1 6SYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dLgxyq2z9J32T3JJURPdWe9IkKRfduMkAhgFvjRpLQ4=; b=ZI0bcWgc3dORY9fDpWGIy4Rld05MG+Y00Kzpt4kbg473y9obF1gJf8WpBtdqCdHrcG fRYF/L4gH+62C0Q48ypO2OY/8Z6eVEzzxIgakrXbgdjx0KoJkByP2OdwSt+csM95rskU nm3BukuSJTKH5jdhue5bMpGVq9kNXJ8Qa/AClOl40eo9WdpfvD0gSU90ASrRO7Lh7+He ROo5HkRPahDwz7+woBMzEeMnSIhaKtSmxgJOurwPWSf58Npxvhh3h4PL/OcCC8Yev5Kg Z08XajYXRemtfSlNKP7lPhNsUcdsZZuU/zuBw8NNRcqLHIfwhedNPhZ8XqKOD8w/XMmF g+pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=bYc3cG3z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a19si9123525edb.104.2021.10.21.15.18.29; Thu, 21 Oct 2021 15:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=bYc3cG3z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232036AbhJUWQi (ORCPT + 99 others); Thu, 21 Oct 2021 18:16:38 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:61880 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231652AbhJUWQh (ORCPT ); Thu, 21 Oct 2021 18:16:37 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4Hb1wq0xsJz5Y; Fri, 22 Oct 2021 00:14:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1634854459; bh=jb8CLRE8zqbQSvTsN+g6tjnxPfYf6JUnbcaeDcYmEF4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bYc3cG3zcwCYjEL6BKsrl3lUuycBFrUocEaSRSXxaSKRegrF5lgFFmHxk/l7FF7+y oOINatm7SrCu6AwMPC3Y7ANlZeowMCuecDZpVoQlla7mw8ZNROSawo6n7gDFh2XC6b zOfr3fIsoiDOWM1fNYJbn0S+wUF3yigNXUoFwiOioTtiwHP6R7P+H8mg8ajW6UP9Ex wV+dwUF0dTQ6mOlKInfH0168KXmF2aN7kaeBPqoBuHDHCkxSBAAkmu+xJ6Qk8WXqvi xKhOzzozN5egnZwSx6m3AZx4pKoeMKzof4qQjsvGKnOyRcVf30JnpvQmzs694GFwAe +vO8uSokLpW6w== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at mail Date: Fri, 22 Oct 2021 00:14:17 +0200 From: =?iso-8859-2?Q?Micha=B3_Miros=B3aw?= To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Greg Kroah-Hartman , Mathias Nyman , JC Kuo , Nicolas Chauvet , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v1] usb: xhci: tegra: Check padctrl interrupt presence in device tree Message-ID: References: <20211021115501.14932-1-digetx@gmail.com> <29b38423-631e-192e-b006-aa0d258c8030@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <29b38423-631e-192e-b006-aa0d258c8030@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 22, 2021 at 12:46:23AM +0300, Dmitry Osipenko wrote: > 22.10.2021 00:37, Michał Mirosław пишет: > > On Thu, Oct 21, 2021 at 02:55:01PM +0300, Dmitry Osipenko wrote: > >> Older device-trees don't specify padctrl interrupt and xhci-tegra driver > >> now fails to probe with -EINVAL using those device-trees. Check interrupt > >> presence and disallow runtime PM suspension if it's missing to fix the > >> trouble. > > [...] > >> --- a/drivers/usb/host/xhci-tegra.c > >> +++ b/drivers/usb/host/xhci-tegra.c > >> @@ -1454,10 +1454,13 @@ static int tegra_xusb_probe(struct platform_device *pdev) > >> goto put_padctl; > >> } > >> > >> - tegra->padctl_irq = of_irq_get(np, 0); > >> - if (tegra->padctl_irq <= 0) { > >> - err = (tegra->padctl_irq == 0) ? -ENODEV : tegra->padctl_irq; > >> - goto put_padctl; > >> + /* Older device-trees don't specify padctrl interrupt */ > >> + if (of_property_read_bool(np, "interrupts")) { > > > > Does this catch "interrupts-extended"? > > No, Tegra doesn't use interrupts-extended. I believe it is generic and equivalent to "interrupt-parent" + "interrupts" properties, so people might as well put this in the DT to save (or loose) a few bytes. You could just check if of_irq_get() returned -EINVAL instead of matching "interrupts" property. Best Regards Michał Mirosław