Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp111619pxv; Tue, 13 Jul 2021 23:21:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoe9Bt9meGEocdM+yYoUQRQ4dHG8hrQVpZyGd0ZJL9v//nHPAOWnjCU2834L9n0+R/GQoJ X-Received: by 2002:a05:6402:1d37:: with SMTP id dh23mr11166123edb.360.1626243691080; Tue, 13 Jul 2021 23:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626243691; cv=none; d=google.com; s=arc-20160816; b=BbIXcGcW0u5D801pBYRGUCtbKw2uacKX84Q7k9/FXMotdqa8H37EcMFXFesWxgTMlY 0H/yc9dQ7Km9O+DVKBS9Q+Dlhvu8Lpz9vE+b72tbDDZQRoiqAvMmKZh0DsYAStnULwVH VKkC2fioYUTb6px1BeHwuGW719rW5Acmbr0W7NCp5AQaU2ELqbgKw2Smv78WWBGuKeTr U4y1IN5somPhfGp91xOavXDAXxJawzT7ArMRVMs9KlaeYY5fpOZXZWAoH05Ps8xBaod3 y1tPZNNYIKXLLeGGN6Mh8mEBHe2stPydNfTJN5FLAP0OcI9899CaJkukC+exn3yrtmoF Weqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:date :subject:cc:to:from; bh=7tgNt1s8lwRZwYQpOzkW8HQEoFW+o73G4IXaEnZ8hSE=; b=JcGQnNR21Dk8GGldoqheZikMwUhkCbexl3FEt+O5WLYOUKmvMX0BRocMfdcxDDJ4ee Vn21D01GaXPPc58Ln27JlDmHahX+5XKClijLu0hb/Hvh/ynRi2M/UOHJSeK6/z3da5Ll lb6T9IjeoDHJCmezRAZfMExIMzfSYZQsd1aT4tlqsJ+u4u31lnq4+j9TLvWg7yhPMKDq 8EK8g2b8PQsp+IlinlPWdJM5Op/mfYXue0zZKji/RpzEF3sS0e4OZyvhHv6DHHzuGRQ0 UEucTurMq7/ATJTNVcwPSSFgIJffGsr2MaHWjhnmugkpPJz+UmUx0s4C6M71z5vCiZA7 q9ZA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si1506769ejx.293.2021.07.13.23.21.07; Tue, 13 Jul 2021 23:21:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238052AbhGNGVj (ORCPT + 99 others); Wed, 14 Jul 2021 02:21:39 -0400 Received: from comms.puri.sm ([159.203.221.185]:52022 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237948AbhGNGVj (ORCPT ); Wed, 14 Jul 2021 02:21:39 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id E9A2DE0092; Tue, 13 Jul 2021 23:18:17 -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 r9lEnboJPJ-W; Tue, 13 Jul 2021 23:18:16 -0700 (PDT) From: Martin Kepplinger To: saravanak@google.com, grandmaster@al2klimov.de, gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com, rjw@rjwysocki.net Cc: kernel@puri.sm, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, martin.kepplinger@puri.sm Subject: [PATCH v2] usb: typec: tipd: Don't block probing of consumer of "connector" nodes Date: Wed, 14 Jul 2021 08:18:07 +0200 Message-Id: <20210714061807.5737-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); + tps->role_sw = fwnode_usb_role_switch_get(fwnode); if (IS_ERR(tps->role_sw)) { ret = PTR_ERR(tps->role_sw); -- 2.30.2