From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40642CCD1AB for ; Fri, 24 Oct 2025 08:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AfrAxnjPM3927lMKnVQ4wMj6/oHcH8FIUGjDfzELZ1s=; b=hw7PhA+rfDzKzW MHzGEwTIb4Y2gSZ2ZXOTf3Lw/seSQzENbEPOZbiw7fqjUgGtCGzmi77X/BoBmFRhaTbZ8J1Smg8Fg YfnTMVxXacl66ok/bpFswxpm5UJv4uBYEKFnhypltJTVX3k8PCmgd6RqumDjFMtRCATpIjVxMkf3f /ck/v/pmfqQohmZjx9eyoFTIyaIhDVAUGwP0kikWfLlesyjAmm83txAt29XMkOCNq8L/7TszDkl1j RY6Je9IOoSU/1/sSLqqXcNFY6lFHtboFL+IR2d8wf12OGPwZEprJ94xVKiXFTM6cASeq1mUiUV+Dz f6PO01AkmoobZO7pl20g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vCCqQ-00000008cxI-3TMX; Fri, 24 Oct 2025 08:08:18 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vCCqO-00000008cvi-0jKx; Fri, 24 Oct 2025 08:08:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761293296; x=1792829296; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=iVIHEI/6GYiyKQtjDs+G9MH3NzfvOwU3yM+TuMzlGF8=; b=iEAwYakOSOD8gOL+ax8AME35ICY8UENzW2xdSqXQS+eHR3l3KKJ6m7Z6 cOVYwzQt2B8ushtBbAc6F3bZ1JZyBiuQnbnkJ+PEZGucBck1bebUIuzd0 8eKeW1i4vDkV2GUu0NAdd7U1hpHdD67ur3V4DvYdhTijzZX7rOTIFpdww ewQASw2xMrknZDGutghWeefIjHqpCn+6vYt8dHTJr3XzVJ4TPXzCoqyn6 aFL62QG6Ad8jblTXigKSWHh+VXsRtLTmaj9W6PmGy5TKmjrVwQ5lWHe7j 7zXwQ6cMvClsdO10vUPe6qpqEd9VHejaBLTmY16xCVdwXOYoqRT3fcVFZ g==; X-CSE-ConnectionGUID: twTgrbeiSIqcggA1rZYAIQ== X-CSE-MsgGUID: /NiIfzYIS/2ydY3pXdigfQ== X-IronPort-AV: E=McAfee;i="6800,10657,11586"; a="86102765" X-IronPort-AV: E=Sophos;i="6.19,251,1754982000"; d="scan'208";a="86102765" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2025 01:08:14 -0700 X-CSE-ConnectionGUID: ShAhcC5rRm+Zk2meUFiqQQ== X-CSE-MsgGUID: Y+ylwr1ITe6V3fw6sAb20w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,251,1754982000"; d="scan'208";a="221572594" Received: from mjruhl-desk.amr.corp.intel.com (HELO kuha.fi.intel.com) ([10.124.221.255]) by orviesa001.jf.intel.com with SMTP; 24 Oct 2025 01:07:58 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Fri, 24 Oct 2025 11:07:56 +0300 Date: Fri, 24 Oct 2025 11:07:56 +0300 From: Heikki Krogerus To: Chaoyi Chen Cc: Chaoyi Chen , Greg Kroah-Hartman , Dmitry Baryshkov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Sandy Huang , Andy Yan , Yubing Zhang , Frank Wang , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Amit Sunil Dhamne , Dragan Simic , Johan Jonker , Diederik de Haas , Peter Robinson , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v7 1/9] usb: typec: Add notifier functions Message-ID: References: <20251023033009.90-1-kernel@airkyi.com> <20251023033009.90-2-kernel@airkyi.com> <3a24bd7f-c247-4541-8cf5-c1e66e2af5a0@rock-chips.com> <4fddba9a-b073-4bca-bd13-64a415f4bc47@rock-chips.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4fddba9a-b073-4bca-bd13-64a415f4bc47@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251024_010816_246267_054309CD X-CRM114-Status: GOOD ( 20.20 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On Fri, Oct 24, 2025 at 03:59:50PM +0800, Chaoyi Chen wrote: > Hi Heikki, > = > On 10/24/2025 3:43 PM, Heikki Krogerus wrote: > > > I noticed the following statement in typec_register_altmode(): > > > = > > > ``` > > > = > > > =A0 =A0 /* The partners are bind to drivers */ > > > =A0 =A0 if (is_typec_partner(parent)) > > > =A0 =A0 =A0 =A0 alt->adev.dev.bus =3D &typec_bus; > > > = > > > ``` > > > = > > > If the condition is not met, the bus will not be set, which means bus= _notify() > > > won't be able to take effect. Did I miss something? > > Right, that would be the condition that I was talking about. Only > > partner altmodes are used in the bus. > > = > > Hold on! Do you need the port altmode instead of the partner altmode? > > If that's the case, then we can't use the bus notifier. So we'll need > > the separate notifier chain after all. > = > Yes, we need port altmode.=A0 The partner altmode device appears too late= for > DRM device, as it only shows up after the corresponding DP device is inse= rted. Got it. So just move the declaration of the typec_notify_event() to drivers/usb/typec/bus.h and this patch is OK by me. Sorry again about the misunderstanding. thanks, -- = heikki -- = linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy