Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp513888imn; Tue, 26 Jul 2022 01:57:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tZVG9vx43r0oAoX3QgBlQG2lx4cDI69lq/1r5r1gDfDYBwDRJOAHk5EedDNcNl3IGc0kCY X-Received: by 2002:a17:903:2406:b0:16d:6b7a:57c6 with SMTP id e6-20020a170903240600b0016d6b7a57c6mr10378634plo.149.1658825850444; Tue, 26 Jul 2022 01:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658825850; cv=none; d=google.com; s=arc-20160816; b=0JVbW3QZuPBKvK+X50BacC0WVmimsPaewKRwSXlanGO32F144bZeCqBmERnqphjZir do4XIgge3JOSnlAKbMfdxeJ1xpapscghpoEpokx1I/OvAYraVk6MHuXW0YRVKh+gzrOE 8ow7rOddDbMKuUzUmezVqFPxbbkNpB13MeKoGzsXvCssoYJzS9lolEzbw5/rV5jaL29X 7GYwUM0dgbwhQYJ1qrGJtADLKdC15IwK/Gfk342ZNdn7a5hyzXGTC9llAb8U/bweNExu AtcSPWgfpBwFsuOFSnKHCFbEvKrfoXiRIBzJpN7qYHmXtOJxw+6yIoRUlnS7hNNMeSG0 Pd9w== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :dkim-signature:message-id; bh=yD6J9+EMDhlIvQH/fOjXmBnE7hatp6aEjqieXmg3knA=; b=TidH4PpGCDYgCfsschPG8FHANpcvHDoRGrlOmpiaZxsMK1ZIRUGBzwu1ZCO3mHQ9M5 S4HRUCxAbbI5xfKqBF+FyQDxiuc5rW+lNlgGANsV7fqtWpqhqnSgQqBRZ/H6DDZoGyVj TBIQpup7Yvpy2MPI9J95q+4FSM45N0g28VQMyDRv0edVLarTaqonOgdqJWruAePrU18Q VEsXeKEua3tqk7EDudvyL0Xr51zWQZ45oanVHS8dgXbxtgz7aOzzdDuBPj+Vw/toNuT5 P0szQYH3COC8USzdAE/74Gu0TtultIOROzuJjcY6XuWGxNAwNRfl6sqDHHk9AVHUuxcb o5iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@puri.sm header.s=comms header.b=uQNT73Q6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a630907000000b0041998725e16si17346442pgj.508.2022.07.26.01.57.14; Tue, 26 Jul 2022 01:57:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@puri.sm header.s=comms header.b=uQNT73Q6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238614AbiGZIou (ORCPT + 99 others); Tue, 26 Jul 2022 04:44:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230093AbiGZIot (ORCPT ); Tue, 26 Jul 2022 04:44:49 -0400 Received: from comms.puri.sm (comms.puri.sm [159.203.221.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD01527CC4; Tue, 26 Jul 2022 01:44:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 7EA1CDF985; Tue, 26 Jul 2022 01:44:48 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sQd45dya_6k8; Tue, 26 Jul 2022 01:44:47 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1658825087; bh=VI+Psrn6/lqx/JXqOOuObKZPj/CHv9mceM1I37Xzr90=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=uQNT73Q6Sqv3QwdqWqhZ7ljFLJRetQ/z0V/qzrrw2t7twT0DO/Aemf0/IHRATScIj met2zqdcVGzfA4SLyh4tYf8AU71PpS8OhY/3hBgsg46qQsjqgc9+r2W3v03anndbWH TUAMiJWvaOQCTHcO89Q8tXqRKjq7iT2vrMg7HhUVX3DAEhjhOQGMtWGQlK4b71K+2n Yv0GXDzFBeAmYIbuZB5Yn4VHDxq+HMFmNMPgzkI5afw5vi8zt/RH7oJKJGxx5w8Hqa G8jXcECsKxq2j5bFbA2weLAdjLNC/giUfnwzWJ0+3k2EhAZF8OGooSzxAlptIMm+Sv iJsW9BFQ+vrFw== Subject: Re: [PATCH v2] usb: typec: tipd: Don't block probing of consumer of "connector" nodes From: Martin Kepplinger To: Saravana Kannan , Angus Ainslie Cc: grandmaster@al2klimov.de, gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com, rjw@rjwysocki.net, kernel@puri.sm, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Android Kernel Team Date: Tue, 26 Jul 2022 10:44:49 +0200 In-Reply-To: References: <20210714061807.5737-1-martin.kepplinger@puri.sm> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, dem 21.07.2022 um 16:06 -0700 schrieb Saravana Kannan: > On Tue, Jul 13, 2021 at 11:18 PM Martin Kepplinger > wrote: > > > > Similar as with tcpm this patch lets fw_devlink know not to wait on > > the > > fwnode to be populated as a struct device. > > > > Without this patch, USB functionality can be broken on some > > previously > > supported boards. > > > > Fixes: 28ec344bb891 ("usb: typec: tcpm: Don't block probing of > > consumers of "connector" nodes") > > Signed-off-by: Martin Kepplinger > > --- > > > > revision history > > ---------------- > > v2: (thank you Saravana) > > * add a code-comment why the call is needed. > > > > v1: > > https://lore.kernel.org/linux-usb/20210713073946.102501-1-martin.kepplinger@puri.sm/ > > > > > > > >  drivers/usb/typec/tipd/core.c | 9 +++++++++ > >  1 file changed, 9 insertions(+) > > > > diff --git a/drivers/usb/typec/tipd/core.c > > b/drivers/usb/typec/tipd/core.c > > index 938219bc1b4b..21b3ae25c76d 100644 > > --- a/drivers/usb/typec/tipd/core.c > > +++ b/drivers/usb/typec/tipd/core.c > > @@ -629,6 +629,15 @@ static int tps6598x_probe(struct i2c_client > > *client) > >         if (!fwnode) > >                 return -ENODEV; > > > > +       /* > > +        * This fwnode has a "compatible" property, but is never > > populated as a > > +        * struct device. Instead we simply parse it to read the > > properties. > > +        * This breaks fw_devlink=on. To maintain backward > > compatibility > > +        * with existing DT files, we work around this by deleting > > any > > +        * fwnode_links to/from this fwnode. > > +        */ > > +       fw_devlink_purge_absent_suppliers(fwnode); > > + > > Hey Martin, > > As part of a series I'm working on, I'm looking into deleting > fw_devlink_purge_absent_suppliers() and having the driver core figure > this out automatically. > > So I was making sure all the current uses of > fw_devlink_purge_absent_suppliers() would automatically be handled by > driver core. But when I looked at this usage of > fw_devlink_purge_absent_suppliers(), I didn't see any "compatible" > property in the "connector" child node. So, I'm confused how you had > a > problem without this patch. > > fw_devlink would have created fwnode links > between typec_pd and usb_dwc3_0, figured out it's a cycle and have > stopped enforcing the "remote-endpoint" dependencies. > > Can you give me more details please on why you were having a problem > without this patch? > > I'm looking at arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi as > an > example because you listed it in your v1 patch. > > -Saravana It's downstream. I'm very sorry about that. The patch that adds the compatible string ( https://source.puri.sm/martin.kepplinger/linux-next/-/commit/3d887ea76158851ae50f192094d7865cc3f4da9d ) sits in our tree ( https://source.puri.sm/martin.kepplinger/linux-next/-/commits/5.19-rc7/librem5__integration ) and I'll make sure it'll be sent out after I'm back from vacations in a few weeks. Sorry for the confusion! martin > > >         tps->role_sw = fwnode_usb_role_switch_get(fwnode); > >         if (IS_ERR(tps->role_sw)) { > >                 ret = PTR_ERR(tps->role_sw); > > -- > > 2.30.2 > >