Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3089C6FD1D for ; Mon, 6 Mar 2023 11:52:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbjCFLwE (ORCPT ); Mon, 6 Mar 2023 06:52:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbjCFLwA (ORCPT ); Mon, 6 Mar 2023 06:52:00 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF0A428D2A; Mon, 6 Mar 2023 03:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678103519; x=1709639519; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=+vJI7YuA2cKvI0b1Mt8oP5n5z7Z9J/WAV96Z+3jwwp0=; b=YoR/0BlFufDt82EfuDw+8VenkZw7/aP8F2rQgNG1Y1jqAtXN+/iJOEA8 iwFUoJNXeAr6YBE5Nl5KS5bIIa3TrnALEjSyae3+/JWHpqpelDFeRfCrm XAQt868omreiOIlKahzP+Ql+SlgW2tmUbIKGPJEG31ywXY/xDLDkZRGXJ 1pZ4PTIQwFjodZpqDTPM7QbyUlMI3ObU9+PhqVEGzROUTlqgMghtzzClL 1qsRkYuJvJkM4sel2E2oKvUD/rxVWiBCGP/lMK/ovMC6MOkLvyVq2jQwl l2mBHkHko99bmVNTbIddUD3QbZuDgrytROykC9rcgwiwBF+g5Gr8HqCrP w==; X-IronPort-AV: E=McAfee;i="6500,9779,10640"; a="421805982" X-IronPort-AV: E=Sophos;i="5.98,236,1673942400"; d="scan'208";a="421805982" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 03:51:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10640"; a="678444901" X-IronPort-AV: E=Sophos;i="5.98,236,1673942400"; d="scan'208";a="678444901" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP; 06 Mar 2023 03:51:48 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pZ9NY-00GKgD-22; Mon, 06 Mar 2023 13:51:44 +0200 Date: Mon, 6 Mar 2023 13:51:44 +0200 From: Andy Shevchenko To: Pin-yen Lin Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Prashant Malani , Benson Leung , Guenter Roeck , Xin Ji , Javier Martinez Canillas , Lyude Paul , linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?iso-8859-1?Q?N=EDcolas_F_=2E_R_=2E_A_=2E?= Prado , Marek Vasut , Hsin-Yi Wang , devicetree@vger.kernel.org, Allen Chen , dri-devel@lists.freedesktop.org, Thomas Zimmermann , Stephen Boyd , linux-acpi@vger.kernel.org, Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH v13 05/10] drm/bridge: anx7625: Check for Type-C during panel registration Message-ID: References: <20230303143350.815623-1-treapking@chromium.org> <20230303143350.815623-6-treapking@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230303143350.815623-6-treapking@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 03, 2023 at 10:33:45PM +0800, Pin-yen Lin wrote: > The output port endpoints can be connected to USB-C connectors. > Running drm_of_find_panel_or_bridge() with such endpoints leads to > a continuous return value of -EPROBE_DEFER, even though there is > no panel present. > > To avoid this, check for the existence of a "mode-switch" property in > the port endpoint, and skip panel registration completely if so. ... > + port_node = of_graph_get_port_by_id(np, 1); > + count = typec_mode_switch_node_count(&port_node->fwnode); Do you need to drop reference count here? (I don't know myself, so, please check this) If no, patch LGTM. > + if (count) > + return 0; -- With Best Regards, Andy Shevchenko