Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1739147pxb; Wed, 9 Feb 2022 03:32:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOzu58OY6jyJSucfgSr+U/lftU3YSOU4YeO8iB41056y5c4VrbvvfclN2DnBcTv0pj5gsg X-Received: by 2002:a17:902:e54a:: with SMTP id n10mr1644347plf.160.1644406365285; Wed, 09 Feb 2022 03:32:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644406365; cv=none; d=google.com; s=arc-20160816; b=oOz45+OgGr7ORPzJzJuK2p2yFV/U3uJpA04qb06iYdKnebPVtzqDOQrNSY/26MTjOj WDM0ncFXXOPCyQjCXQ1xa5wQ1POFOInJvtWvgV71myN5+Jys7vw/BRqVoIZkAbCx22Tr 9ZoYWtJ46Bkk4uK5thsoSB6U1a3IXsd7wsBncDSpmmzDjqBy4FNTCfmbeWHmREG/Or/Y 9CZ1iXypj7ho/cg+TPIZRsi9/CGNC0TRc0tH9/TiVqiDFqBooTLgoIsdg/jSkrBDawyv NBCF9ikniGIG0odDi52DRZUIO9QAeMoN+/XcU1ZBvj3FpLKqmxfE37WUQvqXKTMsu61L fPFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3nJw75yUn0Ak2LbjP8FDSUKGk9cBjMNSHZr8K3rv/n8=; b=Py69oIWob3N4D5JLCbW64Njhe7cCL759EBSRCsR3rl0S+r/Sd2KlHcS+DLDQ9/6Cry MKpWRFJ+BmC95oPwz68BrfSf6chtghUNfXoNQPGUdNrWwu7hkakeLsmcm3doUjdZG7KZ NMn4JTiSZhXrjLb2/+O1OKGMBl/AKxwPht33Uc52gi/E3SUJKPuAO58B9rqk2vSxJrmU fopYoWtRgEIFN6kLygGOnr4gbH+c3uiRaDBNzDsOmFHFw239qmaWZp+vLpXCxyrbIQJq y3UJOXM27Xop2cSTloe/DpB+kpIAL3m+x7bXo/nzSdZuZVMhbNZhO/LnepGgP3XkscHP j5hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Kcc50LqT; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b13si16798145pgn.72.2022.02.09.03.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 03:32:45 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Kcc50LqT; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0623EE01B3E0; Wed, 9 Feb 2022 01:52:45 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385455AbiBHSsc (ORCPT + 99 others); Tue, 8 Feb 2022 13:48:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385472AbiBHSs3 (ORCPT ); Tue, 8 Feb 2022 13:48:29 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F95DC0612C2 for ; Tue, 8 Feb 2022 10:48:28 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id y17so121347plg.7 for ; Tue, 08 Feb 2022 10:48:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3nJw75yUn0Ak2LbjP8FDSUKGk9cBjMNSHZr8K3rv/n8=; b=Kcc50LqTHuQIYf273mHplhXaUKkVZo5PUBRoSWfRcf58iiGQ2BqdIdG45EwyPs1uXs CAAbXNkEd2gr6pK4HN7DiQh4qUIHHNlorxb+wH1BXIOdeK6oQxUKyLl5QTwejhLKNtmR CteLOdhUCS5CWbC0mzNmxIdXJAHtmnBxfT90k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3nJw75yUn0Ak2LbjP8FDSUKGk9cBjMNSHZr8K3rv/n8=; b=vo8E//jxoAnG+SOHjuTzR/ka2ICwpmXEmvCTE5P9GXxlSV4e8ldlbDhF9qa5M3Nzg1 F5WrVxeId0TbupCKC38E0xv6WKZnUw9XImPiOJx7w+Xh136kq4JpA8AXDDWE/BKVglPg 2Kuo1KgUZq8u374Q7jEStxbr5ybTjtpni+etGqn/fdAh4nn7qx+GDEv2CKuREiGSBK23 WgyalZI2ZeD/FsJtZvZFZ8FZwCdlsZ7cQ7hyxrIAltJwJ4eUWPM7+LcLjM4jwy+4n5Du 89sXVIYA2VHLXvpiDDqYk2VYvR4GE+BRfZUrJdFAlEj7XL2ydc7gbVZWUjMYciXZxKNV b2QA== X-Gm-Message-State: AOAM532ngBi9hOgsUbedftC8B28vNt8JoxNihjJxRl3oqZOggVHam5jR WML7zhcUINRnVhPSZ0vB23h/0LgDMfqG4Q== X-Received: by 2002:a17:90b:4c91:: with SMTP id my17mr2870441pjb.121.1644346107948; Tue, 08 Feb 2022 10:48:27 -0800 (PST) Received: from pmalani.c.googlers.com.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id gk15sm3594453pjb.3.2022.02.08.10.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 10:48:27 -0800 (PST) From: Prashant Malani To: linux-kernel@vger.kernel.org Cc: Prashant Malani , Benson Leung , Guenter Roeck , chrome-platform@lists.linux.dev (open list:CHROMEOS EC USB TYPE-C DRIVER) Subject: [PATCH v2 4/4] platform/chrome: cros_ec_typec: Update mux flags during partner removal Date: Tue, 8 Feb 2022 18:47:24 +0000 Message-Id: <20220208184721.1697194-5-pmalani@chromium.org> X-Mailer: git-send-email 2.35.0.263.gb82422642f-goog In-Reply-To: <20220208184721.1697194-1-pmalani@chromium.org> References: <20220208184721.1697194-1-pmalani@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In cros_typec_remove_partner(), we call cros_typec_usb_disconnect_state() which sets the switches/muxes to be in a disconnected state. This also happens in cros_typec_configure_mux(). However, unlike there, here the mux_flags variable hasn't been updated to reflect that a disconnection has occurred. Update the flag here accordingly. Signed-off-by: Prashant Malani --- Changes in v2: - No changes. drivers/platform/chrome/cros_ec_typec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index 3019e29f200d..4bd2752c0823 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -228,6 +228,7 @@ static void cros_typec_remove_partner(struct cros_typec_data *typec, cros_typec_unregister_altmodes(typec, port_num, true); cros_typec_usb_disconnect_state(port); + port->mux_flags = USB_PD_MUX_NONE; typec_unregister_partner(port->partner); port->partner = NULL; -- 2.35.0.263.gb82422642f-goog