From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3040D2FF172; Fri, 24 Oct 2025 08:08:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761293296; cv=none; b=hPLXJQpbJbt4gvlhkXtdOclX1mR8sIgZhqdckXZpxxxZV+gtjhWATcYVeTVXl58Dt8t0Yb35Sbzadt5xneDiiD1sBrW3MJAgZeSjWl3cpyaZ1QMbktS765Z3WWj+RIo0vKPS1Q4ZSEFzVBZxBatx+ctLBiOBm5pMCWB0bycWhUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761293296; c=relaxed/simple; bh=iVIHEI/6GYiyKQtjDs+G9MH3NzfvOwU3yM+TuMzlGF8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mGJquH9XFfcW0sVxDdPL5xE9EBRIHz3IkOWxHwl/bpHhw7cqPcbmesCyJOyEKXABfe1SCFWJofmCZnKIvagjmCYD3y6j8IjBobva9RzEhJo6s/U24ZjoeJnzncarOMHkssI4WxEVlduwpVtyp+ijy8+ViPwDePACjRdpNc03GJg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=hGOe4dR/; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hGOe4dR/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761293295; x=1792829295; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=iVIHEI/6GYiyKQtjDs+G9MH3NzfvOwU3yM+TuMzlGF8=; b=hGOe4dR/6u7K6DA+1Aj7AS1Ubv13iH5Mw7b8Su8pWbDJfCW0IMKrvIWJ qkJpyniQe354a9pM5VTYzoRs5/0L++cKYekiDm1UjKP7qdqEflCbAW7MZ SlSjZ8dpLEXqoDhxy6X4XmZtmU7k//ihIvsngvfbLgsYcrtvNxpHhi5f1 XOnyee8MpPhfpphRYGWz8Jx2x+ls6UPmaYAfI0b12sI4T6CcVM4sYrcJG woLo2Ebc3moptDcNYyOuVrAhnAnf2j2VzSVSyQyvJeBmqP2p4wr4Rkj7V RZiGEMUeqkdM/kcED9EboAB/+9ijAIgkTdbEjnHWGNvPpwxxcfhAG5jf4 w==; X-CSE-ConnectionGUID: dIM8z/WURvSwyury3MRpOw== X-CSE-MsgGUID: /0e8sSxTQeSokBi4xLNwMw== X-IronPort-AV: E=McAfee;i="6800,10657,11586"; a="63378613" X-IronPort-AV: E=Sophos;i="6.19,251,1754982000"; d="scan'208";a="63378613" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa111.fm.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> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4fddba9a-b073-4bca-bd13-64a415f4bc47@rock-chips.com> 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(): > > > > > > ``` > > > > > >     /* The partners are bind to drivers */ > > >     if (is_typec_partner(parent)) > > >         alt->adev.dev.bus = &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.  The partner altmode device appears too late for > DRM device, as it only shows up after the corresponding DP device is inserted. 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