Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp528874pxf; Wed, 24 Mar 2021 09:47:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNL9BzGvWbZgEBkO/im+ntDLKHz6XtG47KlHsMMVyOe0vgeD9DA+jSQCPnold5NX0hgRaB X-Received: by 2002:a17:906:1c41:: with SMTP id l1mr4643578ejg.299.1616604438412; Wed, 24 Mar 2021 09:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616604438; cv=none; d=google.com; s=arc-20160816; b=x1NabOyCwniLKrBq0T9JIddWwJxhYyLxs9sPcWNtu0heTPH9Y0n8NR4SxEP7r15VBG RAeKd9m3Pd+GYaiulqbIxeiu47yL3RDP8Z2KB33vqMVA19zJkTI2yb0jxaqaksvTch1n sn6/FG7MQPxN00v9uOWoECJDdYu/vRnNqZsYWa+uPNO9V4YkYl/g2ODnond8pdfKxyUv XAx/ndAVtVUtedgVmzk8RItG4RMnJ0vCOLWiM3xtrKZtWfn7/uDCW61aWX07biCAVW0Y S2Z10pO3fwIJjB5ApBIEFytBjoZ8M22H2/lNvbCF+GOea2z4zTfpyU+3tTLFTQgViv4U NKZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+9O1CPg876qgLaa0sGHQfx07ix3wrsSEF+pCirIbZc8=; b=oxiTCIOA976zDmAjIQMQOqjbrAtzYwOFQTMG4zXXu9Z9tfJYGnYUU25LYLn6CzlPVV vYAfoNAb25P3RTJWmBTIFhHT236DBOr86ohJp4DGN4laq1yWtGOJBMX+0h0CWY0R+M9j vsuOtct8WORLbT0jKBaVimUGHLWhoDGKieb6gmTHD3iAvwCX1P4G/x1NqBafIso7kXWM KL32QfFtWu6Hbm+DbS/lowGwJachJLOAVvQ2pREA55X7VBKG6Z9+9QRLUZgHGxpZ7cRb Df6EFFVWr3vyRwqBc91sYR/sdHSHDeP5RnhnhHrOO9YXuKgkDyTKu/ciS/6EF75bCxM6 V+iw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e15si2170293edz.11.2021.03.24.09.46.55; Wed, 24 Mar 2021 09:47:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235579AbhCXQlm (ORCPT + 99 others); Wed, 24 Mar 2021 12:41:42 -0400 Received: from gloria.sntech.de ([185.11.138.130]:35622 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233671AbhCXQl1 (ORCPT ); Wed, 24 Mar 2021 12:41:27 -0400 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lP6ZO-0001QD-TS; Wed, 24 Mar 2021 17:41:22 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Johan Jonker , gregkh@linuxfoundation.org, balbi@kernel.org Cc: robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/8] usb: dwc3: of-simple: bail probe if no dwc3 child node Date: Wed, 24 Mar 2021 17:41:22 +0100 Message-ID: <1861638.PYKUYFuaPT@diego> In-Reply-To: <20210209192350.7130-2-jbx6244@gmail.com> References: <20210209192350.7130-1-jbx6244@gmail.com> <20210209192350.7130-2-jbx6244@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, Felipe, Am Dienstag, 9. Februar 2021, 20:23:44 CET schrieb Johan Jonker: > For some of the dwc3-of-simple compatible SoCs we > don't want to bind this driver to a dwc3 node, > but bind that node to the 'snps,dwc3' driver instead. > The kernel has no logic to decide which driver to bind > to if there are 2 matching drivers, so bail probe if no > dwc3 child node. > > Signed-off-by: Johan Jonker It looks like this patch fell through the cracks? I.e. I can see patches 1+6 adding the devicetree bindings in 5.12-rc but haven't found this patch there. And looking at https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/log/drivers/usb/dwc3/dwc3-of-simple.c?h=usb-next I also didn't find it. From what I gathered that was somehow mandated from the Devicetree side as the dwc3-subnode system merely is some Linux-specific thingy and should not be enforced if not explicitly needed. I guess Johan can provide pointers to the previous discussion. So could you look at applying this patch to some usb-tree? Thanks Heiko > --- > drivers/usb/dwc3/dwc3-of-simple.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c > index e62ecd22b..347b4d384 100644 > --- a/drivers/usb/dwc3/dwc3-of-simple.c > +++ b/drivers/usb/dwc3/dwc3-of-simple.c > @@ -38,6 +38,10 @@ static int dwc3_of_simple_probe(struct platform_device *pdev) > > int ret; > > + /* Bail probe if no dwc3 child node. */ > + if (!of_get_compatible_child(dev->of_node, "snps,dwc3")) > + return -ENODEV; > + > simple = devm_kzalloc(dev, sizeof(*simple), GFP_KERNEL); > if (!simple) > return -ENOMEM; >