From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C83D20D4E9 for ; Thu, 18 Jun 2026 00:22:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781742139; cv=none; b=MibqpoemdOHUeXuUsWjzgv7h17aeJpce5npcNXPmeTNOPkpYb7VY5nz5MCDjUf09PhIhFJ6c6PeCDlqTlCDlIHee9GGpkmXj15emoqSVrempqdeTgj8qxmH5rrbym5XeoWno4yevpQbGZjLtc/pEDxulz/A4OsuR/uNuBshL7o0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781742139; c=relaxed/simple; bh=SixMGirlMng4LGktkF5cVcWRJJuONy+YaWY/IhZiRQ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RkllCSxLrHvzQWRDQhIt+OyEQ6yWIWYxijquYwq5zzbSAwBV3NjxWMW2F7g+kUIaO6+gltuv8e3RsJd8+dANM7oFrMjqgz5HTWmn9r8Fxpn8iG3c/iymklk+nTLZCC9G+dDnyz73EdWKkUsxt+wQPcjL8JKSozDYTS8vEZ3df7o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=VE/f5Chf; arc=none smtp.client-ip=209.85.215.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VE/f5Chf" Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-c86307c4e6bso183016a12.0 for ; Wed, 17 Jun 2026 17:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781742137; x=1782346937; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=lYpPtSh25gsa1457fRyGH7PTPSfn9PqeD4HQ16ouiG4=; b=VE/f5Chf8zTIMOW3m0vVj0JTxqcCf/HV+TUY1XeanirPGfQh5LQmRExhzW6Aa6ud64 25MC8uPR+Y21dgskSjFs87SuxKqJtH82NQYJgxH1zcvdR8TP6vIz7Yz+KjQjSVOYckxd S//gjcH7lnNqkouscwAwa+r3vmDye4sC6CkSthW7uBbliughoz8TWRlbZDlwg3sx7wxD qG9Ag3zdDTMQhNuZxCCQVBrptftqJt2wXlnaPl0NhE1ppxEB7gOr5fWnt1L9E2jfVCAk GIcPUCLC045wkKrzFtIb14/M/Ux5yQV455HyT0cJ40pG/D1YDtXdEMBgq8un/L1URnlf FzpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781742137; x=1782346937; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lYpPtSh25gsa1457fRyGH7PTPSfn9PqeD4HQ16ouiG4=; b=ai6VfJEs1uGtQdlss9nWVELFJiWyLTDHAlmxr5W7QmuUZVXBPZ7KPBXd5EQY3+ptKV 02cI70mGkZ7ZYgMV6ZiZZ/5Lh0NWIvyAnFmASHz6T2Gmdo0m4jp/7gjKAh+t69q6fGKq TjtxSsSUn9htgbMkG17gpRDYPo5UhibA0M7glUohwgn/NgrGaKCNR7fLmiem1tB3ReT8 KOyHhovJ4pecoOFzHnom9gssxGuxQjq3rfbjvGKbPRf2KmrC0v+9hSR6ECsBAW8PWZ0k hZjhl9NdpSHgWRO4nJumXX5i1V4zp5eB8rTtSgpY5RTAFNurtLO5VLJMFq5YMHJDGvMd 8yaA== X-Forwarded-Encrypted: i=1; AFNElJ9SRjVojW0Z5ALERQ28PlpDX8cwjUDD5pB0TP8bROlE4GDpY5GepmdbkXdNhjdyvNWSnxQBWPESXFKBAtU=@vger.kernel.org X-Gm-Message-State: AOJu0YyuHWBV1RW55+YTprqBQkdA9xi4UIv+EcEmZscge/rocTGAzn5g /R4P9Wfhxza8pT5bFlx/xOi07XkZ7p4P58i3vxz/FvtgtFjbWyITxUhh8jiuygWHXg== X-Gm-Gg: AfdE7cldFj6JAk06Fl6xmtQ/Cmq8Op4XJpw4O6CeemfY8rI8vViuuxsluu74GUL+CZN v8GeucxHYyzyQYz9GJMyhLf/VD/1RYrJyJMKWHgchnDzemlZm52YvLHYLVlnKThlN0kiySPpxfh f9fQzWsXPu9JrDKRnn9S7Xzq2ybXhBeZ+vZC/OpkrDwjW1fuH22RDdoGWJuOjge3zpENH46WE+D U/Vsfk0SWCVk+pONoWxJiAqDaD1/ijPcAKNi3DDBZWiKIvlmkmwn9UnYac3fL6MvTi0/SnI8v8Q pKee34yPQFGtFNsgxXhHb4Atn4Xe+8cM+UmoCZynOCb3mH3NIipKSZx3iOyLSkWWkQwAOx7bVi7 XFkCbOnSDu3/2W+dZUFdTuJL2th43hZ8LRMwCGxNgvoa58xxdYKuepQguebDF5y6ofCtz3W1juR fvIQYZlyVfDNn636krE67mq6wSWxAA141bXOQmycvwlNSISDwV X-Received: by 2002:a17:903:2f81:b0:2c0:f807:9bf3 with SMTP id d9443c01a7336-2c6bc0a6b2cmr57503465ad.10.1781742135993; Wed, 17 Jun 2026 17:22:15 -0700 (PDT) Received: from google.com (211.37.230.35.bc.googleusercontent.com. [35.230.37.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c6be262b06sm33810445ad.77.2026.06.17.17.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2026 17:22:14 -0700 (PDT) Date: Thu, 18 Jun 2026 00:22:11 +0000 From: Benson Leung To: Andrei Kuchynski Cc: Heikki Krogerus , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 3/3] usb: typec: displayport: Check cable altmode support Message-ID: References: <20260611122146.262184-1-akuchynski@chromium.org> <20260611122146.262184-4-akuchynski@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="w+NIav+LPleAVV4B" Content-Disposition: inline In-Reply-To: <20260611122146.262184-4-akuchynski@chromium.org> --w+NIav+LPleAVV4B Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 11, 2026 at 12:21:46PM +0000, Andrei Kuchynski wrote: > Update the probe function to utilize the new > typec_cable_altmode_unsupported() helper. If the cable doesn't support > DisplayPort altmode, don't initialize altmode_ops and prevent altmode > from being activated. > A captive cable shouldn't be checked; it may not provide discoverable > capability information, but it is inherently designed to support the > device's requirements. >=20 Thanks for explaining clearly that this unsupported check only makes sense when the port partner reports it has a receptacle. > Signed-off-by: Andrei Kuchynski Reviewed-by: Benson Leung > --- > drivers/usb/typec/altmodes/displayport.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec= /altmodes/displayport.c > index 263a89c5f3243..5ee33a69b9cf7 100644 > --- a/drivers/usb/typec/altmodes/displayport.c > +++ b/drivers/usb/typec/altmodes/displayport.c > @@ -790,7 +790,6 @@ int dp_altmode_probe(struct typec_altmode *alt) > dp->alt =3D alt; > =20 > alt->desc =3D "DisplayPort"; > - typec_altmode_set_ops(alt, &dp_altmode_ops); > =20 > if (plug) { > plug->desc =3D "Displayport"; > @@ -811,6 +810,10 @@ int dp_altmode_probe(struct typec_altmode *alt) > if (plug) > typec_altmode_set_drvdata(plug, dp); > =20 > + if ((alt->vdo & DP_CAP_RECEPTACLE) && typec_cable_altmode_unsupported(a= lt)) > + return 0; > + > + typec_altmode_set_ops(alt, &dp_altmode_ops); > if (!alt->mode_selection) { > dp->state =3D plug ? DP_STATE_ENTER_PRIME : DP_STATE_ENTER; > schedule_work(&dp->work); > --=20 > 2.54.0.1099.g489fc7bff1-goog >=20 >=20 --w+NIav+LPleAVV4B Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQCtZK6p/AktxXfkOlzbaomhzOwwgUCajM6MwAKCRBzbaomhzOw wsr9AP9xQSpUG/TMARDjBbAUlWcq9HO8Yz1pxyMHOk635LqCbQD/a3ptcA01Tbcb 4Eg5duEszwL9Pd9MzqAceUyjUFFaBgU= =xYgA -----END PGP SIGNATURE----- --w+NIav+LPleAVV4B--