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 84B99C05027 for ; Mon, 6 Feb 2023 12:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230127AbjBFMLe (ORCPT ); Mon, 6 Feb 2023 07:11:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjBFML1 (ORCPT ); Mon, 6 Feb 2023 07:11:27 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B973640F3; Mon, 6 Feb 2023 04:11:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675685486; x=1707221486; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Buxqumc71tPCMU+/bMMfLWufol4wdbFjIc0pfWlajJk=; b=YXviQME297C/H6VbIFdx+nFzpVeSauoPTnuFsnwQD/VCTNo3sAfbutND aDyaG+jOzC46jJJnc5KxdgeqrzYVOGIgdKDi7DyOQW0SMSvaRSDBukpIx I49dxpstGuubezcMws78mcS5SwSx3xZg1yDcVPLipdAnPf3ThAhr1Sjz4 ClROni/v9qabM1FYZ28xpN2FeIvBqE8yTnANpln4a3q0c1kCUwNxJ07oJ v5NmkDyy1oFQ0yKklk7IqfJyIkvpBoRj4Vq/nL0crJrleJhLk+nYi+xGN j9cKx0rXRMHxcvzUV0gVs8Njdyg+sD2SB40mM+OsN0kmC8KpQzoW5CS5D A==; X-IronPort-AV: E=McAfee;i="6500,9779,10612"; a="393788590" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="393788590" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2023 04:11:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10612"; a="911902820" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="911902820" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP; 06 Feb 2023 04:11:11 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pP0Ky-003AEF-1G; Mon, 06 Feb 2023 14:11:08 +0200 Date: Mon, 6 Feb 2023 14:11:08 +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 , linux-kernel@vger.kernel.org, =?iso-8859-1?Q?N=EDcolas_F_=2E_R_=2E_A_=2E?= Prado , Hsin-Yi Wang , devicetree@vger.kernel.org, Allen Chen , Lyude Paul , linux-acpi@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , Xin Ji , Stephen Boyd , AngeloGioacchino Del Regno , Thomas Zimmermann , Javier Martinez Canillas , chrome-platform@lists.linux.dev, Chen-Yu Tsai , =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= Subject: Re: [PATCH v11 5/9] drm/bridge: anx7625: Check for Type-C during panel registration Message-ID: References: <20230204133040.1236799-1-treapking@chromium.org> <20230204133040.1236799-6-treapking@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230204133040.1236799-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 Sat, Feb 04, 2023 at 09:30:36PM +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. ... > + /* > + * Don't bother finding a panel if a Type-C `mode-switch` property is > + * present in one of the endpoints. > + */ > + for_each_endpoint_of_node(np, sw) { > + if (of_property_read_bool(sw, "mode-switch")) { Might be that the same helper can be used here. Dunno if the endpoint traverse should be used for the other driver as well. > + of_node_put(sw); > + return 0; > + } > + } -- With Best Regards, Andy Shevchenko