Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp3037708lqt; Tue, 23 Apr 2024 08:45:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU63EAXdKHvALy7aKTFKLQRiYlbrCSkItkXYwh14s5uonVtbT+ll7U4hshDc4y7Erff1CqROtm01cFtFsI9EWvu/DQmEQpgg3hcDd43Bw== X-Google-Smtp-Source: AGHT+IEsFcrnrLYyTMID5DAYAwHFc0BLU1akTDX9q9Mst7R+/6TXtdgVEsxBxHyqN+K6Sdu5VRsS X-Received: by 2002:a17:902:bb98:b0:1e3:f6dd:b04b with SMTP id m24-20020a170902bb9800b001e3f6ddb04bmr13610672pls.26.1713887130236; Tue, 23 Apr 2024 08:45:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713887130; cv=pass; d=google.com; s=arc-20160816; b=0JQlAQA/aKZHXX9WjTHrE27WY9APuvQMeceAeN1L0+b58nN9MzMGSwc8A7mFv2PkJ+ KePWxZLm/oAudNEHcfSM6kesWSVIuJitm3aIGA61r3q6oh4gS9djLNyAHVI9Z7Qq8rdl fkIbaohAz0dzv+4KTUAAPL4BU09mTvQu5axjRFhiB46Mixy4Bpxf/SWLfY9Lawt+mX30 pyVB4cNru127yJG7KWiqpc57wqN/xC6Rxm59/pZoUi3DEyRnwt6/qcsM2H7D+7bcfXmH tfmURJMtN28ktS8psQ1r24Z+9670DqW8cKx+UQ8KHbyX3RrgU8Z1tCS+ZG7uxxspOsgJ vKtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=E4ubhm6fkojtxWKFe2qMR5L5Z0nBCehD/B0hZZ53teU=; fh=fmpYvX7MuN7FUcGBZGE/fBg/5VWdcsW+tYqlBvhGiaE=; b=yVxyBDazlvJIqA62t0BxdTuDqGAKYdufMpnORnu0uXSVz4TIQtzHbu6OkwNLGujm1p 4huaoestgEVJlZBn09l9XdaJpPyMIrOqAJ9H9pxJWEHomefVzAXpbz/jrebVFVWYtmj/ LttMEFRUySts+5keescVZcewMOn2NrcVXiW9MpSOdFLS/DFPpGMG1Iqhe/9g2xfXdD6O 9HD8s8aFfea77EimpBdXfXGLGog36Z3TEkJGXZIey5puMGxMyNw/E/a3hu4g/+PPR9ln J+bAjLSoCgqTu9MOSu0C5jF/zvq9j1Tecj4Cp4vsjrk+ofTglv5t4eRkoCqIdNQpIZb7 Da3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="c2FI5F/C"; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-155484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b5-20020a170902ed0500b001e3e49e8537si9384820pld.164.2024.04.23.08.45.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 08:45:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="c2FI5F/C"; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-155484-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155484-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 713F1B22F3E for ; Tue, 23 Apr 2024 15:37:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6210E13C911; Tue, 23 Apr 2024 15:36:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="c2FI5F/C" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 5132A13B7BD for ; Tue, 23 Apr 2024 15:36:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713886609; cv=none; b=DMeLXmdWSJmDwrJzvDNhhT46lV81jWvxIiH/h4dcATcZC3qTHaTizWOjygAWBAUg3FgH5ueJ5XcngeFlRkxy4t66EEk62YXl8lzy/bmbyi0uNYPnTRb7ISdmZnC68m6f9DojdNQYIiub0ERj/UOl75WQgqDoEuGYS4MmKPRrDUE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713886609; c=relaxed/simple; bh=jDvBKQG05oLemGWaV3UZWdHozbfOYKKcI6YA8cJFeXU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ihkKGIFNnEZrX33xNFFIvIkf+o3udcU6rvWnEdLKHJb/Rp6q2UDfM0GByHezQY0eYJwrBqUNI3jXtumM4H3s7pGL1GC6GMuKQqbRx7K40JA+g0vO/14T4HGS9rDN+NiAuoyaB2GDW3sx+oY2RS0+cuXn7olrtMLp3ZG5BVmoDuM= 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=c2FI5F/C; arc=none smtp.client-ip=209.85.214.182 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 Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1e8414dc4e8so145705ad.1 for ; Tue, 23 Apr 2024 08:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713886608; x=1714491408; 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=E4ubhm6fkojtxWKFe2qMR5L5Z0nBCehD/B0hZZ53teU=; b=c2FI5F/CJyaw477h8bEkV0bNIg1HZLgYjyECwbDTKZ2BKRCl6O7abGMTmPzBpRYfJi A0BbALsNc25j1midtz2B23oMfRRsfRfYJXcQzZ0rukQ3Lob3skp2mo6xdFZKGgSXNJUl nYIS+Lo1UhcU266zUUSCibo4a4KHKr8n/C5ZBA3GbLdR+jR5I1nu9+oF+KKm5WopY7Yc Z8t6ZeY7KZ+1W3qEuy6CDQgr/qsi/pKh9Tbu1phcC+0/UGeMAoUcL84EUHMgAgigiCy/ ONAdu72vMZA/656mLXq/fiTgvyt4MMoN0lGkccUvCZGp3WeCD/GHOSujFeunxFpS82RG cjug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713886608; x=1714491408; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=E4ubhm6fkojtxWKFe2qMR5L5Z0nBCehD/B0hZZ53teU=; b=J8i0jvG/Dz3RYD/lgxUEvQw/rja00PCx/cIWWMI2q4EDjIp1+Tv4eUUZQmatGVE5xl teDiQKO2MuRuRh9puJ0XcuT5wPtm/gUVg+QjOt3oKhNdn2eps/D1fMYTBxG1UQx+duEd kfEKhB4+7fJ7rbICysiCFlBUACQETfLo764rKeX9CxlsQQ8T/ks2MM3f/U5HbJn/l7pg eA4ZoG2i9JnOwuzjQW9P2THa9hLFVX9F22QlMq6Na78LLAE3g/us1Tr99bjgUb6HvS3Z d3Iaeej04Q2OOCEGUgcBWX+kRdQiIcdI1olZFDUj2myPzWHP80kZIJpyK+nbUKgfvJK0 LdxA== X-Forwarded-Encrypted: i=1; AJvYcCXyYZIq2M3CveaGgey9DTY3wmNtW8GYz42ovDRFLlECoTjrTs+sYlT0qNOVf4usAuFTQRGpdO5CdFEp21pZjbxZX3SLCtBCZuFNp3jj X-Gm-Message-State: AOJu0YxU3Ls+IJh4axHy8VT6VIT1FU3/xQW57Ap71EtmtWw4/XWRJeTD myjhuOyTgrjb4NgEmMHdO4zUvyxKbzIFrfbEwMBbACnxT/ENpGuvCTa0yGUtpg== X-Received: by 2002:a17:903:11d2:b0:1e3:c01d:fb17 with SMTP id q18-20020a17090311d200b001e3c01dfb17mr221412plh.11.1713886607326; Tue, 23 Apr 2024 08:36:47 -0700 (PDT) Received: from google.com (134.90.125.34.bc.googleusercontent.com. [34.125.90.134]) by smtp.gmail.com with ESMTPSA id l9-20020a17090a070900b002a528a1f907sm12328417pjl.56.2024.04.23.08.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 08:36:46 -0700 (PDT) Date: Tue, 23 Apr 2024 15:36:42 +0000 From: Benson Leung To: Jameson Thies Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org, pmalani@chromium.org, abhishekpandit@chromium.org, andersson@kernel.org, dmitry.baryshkov@linaro.org, fabrice.gasnier@foss.st.com, gregkh@linuxfoundation.org, hdegoede@redhat.com, neil.armstrong@linaro.org, rajaram.regupathy@intel.com, saranya.gopal@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 3/4] usb: typec: ucsi: Delay alternate mode discovery Message-ID: References: <20240419211650.2657096-1-jthies@google.com> <20240419211650.2657096-4-jthies@google.com> 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-sha256; protocol="application/pgp-signature"; boundary="IpCsqH9qr7AvMRlR" Content-Disposition: inline In-Reply-To: <20240419211650.2657096-4-jthies@google.com> --IpCsqH9qr7AvMRlR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 19, 2024 at 09:16:49PM +0000, Jameson Thies wrote: > Delay the ucsi_check_altmodes task to be inline with surrounding partner > tasks. This allows partner, cable and identity discovery to complete > before alternate mode registration. With that order, alternate mode > discovery can be used to indicate the ucsi driver has completed > discovery. >=20 > Signed-off-by: Jameson Thies Reviewed-by: Benson Leung > --- > drivers/usb/typec/ucsi/ucsi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c > index b8d56a443531f..cd4c3b7a5d989 100644 > --- a/drivers/usb/typec/ucsi/ucsi.c > +++ b/drivers/usb/typec/ucsi/ucsi.c > @@ -963,7 +963,7 @@ static void ucsi_pwr_opmode_change(struct ucsi_connec= tor *con) > con->rdo =3D con->status.request_data_obj; > typec_set_pwr_opmode(con->port, TYPEC_PWR_MODE_PD); > ucsi_partner_task(con, ucsi_get_src_pdos, 30, 0); > - ucsi_partner_task(con, ucsi_check_altmodes, 30, 0); > + ucsi_partner_task(con, ucsi_check_altmodes, 30, HZ); > ucsi_partner_task(con, ucsi_register_partner_pdos, 1, HZ); > break; > case UCSI_CONSTAT_PWR_OPMODE_TYPEC1_5: > @@ -1247,7 +1247,7 @@ static void ucsi_handle_connector_change(struct wor= k_struct *work) > } > =20 > if (con->status.change & UCSI_CONSTAT_CAM_CHANGE) > - ucsi_partner_task(con, ucsi_check_altmodes, 1, 0); > + ucsi_partner_task(con, ucsi_check_altmodes, 1, HZ); > =20 > out_unlock: > mutex_unlock(&con->lock); > --=20 > 2.44.0.769.g3c40516874-goog >=20 --IpCsqH9qr7AvMRlR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQCtZK6p/AktxXfkOlzbaomhzOwwgUCZifVigAKCRBzbaomhzOw wty6AP4rgPBa73MdW6ufqEHb363O5GEUiAUiMMV1Ot2U4+vwNQEAlY6ORdjutWGO zpBiXhvaSFvGyblFv66FCATSEVwGwA4= =cg41 -----END PGP SIGNATURE----- --IpCsqH9qr7AvMRlR--