Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1684877pxb; Wed, 9 Feb 2022 02:08:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrHh3NKpNEHddqHERy/Z/snqunKF/l6EeOdnPBLfKSWfRV9RgL0mb1cUR06fQuKWZ6UXCv X-Received: by 2002:a17:903:230e:: with SMTP id d14mr890252plh.122.1644401302748; Wed, 09 Feb 2022 02:08:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644401302; cv=none; d=google.com; s=arc-20160816; b=ThemgHyJPzrgbwSNHANFrLaLG9r8Kjl5IhPfnGHVWojRm6+yFQK1Qriy38PwWbU266 d39lpQbpHMdgyDJCYm+Hem7rw3ZqQh5LbtDdAJeT0oHVayDxxBrxagVihsK7ySRKLet0 UHrYF/XVBqhz7WluWJLmVt5TDtCeuuOVGe7q0ahScoqQKwSKew1SG0hwGqG1yzOspumY h0dMKWbw94nnafy+wtjrwj1yZMTMTbIGrYRGwGmUle6pTEJOFhjxsrv/JENDNrzC96yn Qd4MAwU5OxPhTITUdBVi8MnlNlHSkgFM8B8rqzdw5vQoZpeF5W6cGBvUO9OlM1JVtH/U M6eA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=e3mDsgPoCgCrdjC5qFpp5/iSytvlH62dGtUdddIuE3E=; b=TE7FLKBu+SKcJuss84MP0BCbaJJ8xKQMMmluNRYM6A30s+ISNPG2lNR322ya2LbWnh GxInNYgElugsYSa4w+19tVxlRcVUDdkdsW4s8LEQZSvQk70wQ1gDIU5PtiZIymWOiraK lTXZAjCqBs6L4y15ywEFH6freYhvTdvcQehj1Ltv+MJo0h1pWvvQZrip1EGBLIU2FAAx tcdaR7hIDtb+TgJBlRwBnUsWakwabXfvzS8dJ9KaMR+nobn3ROOQJPTLFavq2DFSVGnS SvtN1PhglPRu86Y6g1Q8O2c3Ok3HkiGJZ6rZfJp//vQHCUZkyU9YzHMomFG7UIZ6Pvf0 VPZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CghqlIsb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay10si10080715plb.62.2022.02.09.02.08.08; Wed, 09 Feb 2022 02:08:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CghqlIsb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353513AbiBHSrl (ORCPT + 99 others); Tue, 8 Feb 2022 13:47:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385429AbiBHSre (ORCPT ); Tue, 8 Feb 2022 13:47:34 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 954F7C03FED7 for ; Tue, 8 Feb 2022 10:47:28 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id z13so55331pfa.3 for ; Tue, 08 Feb 2022 10:47: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:mime-version :content-transfer-encoding; bh=e3mDsgPoCgCrdjC5qFpp5/iSytvlH62dGtUdddIuE3E=; b=CghqlIsbj6Rxbr80iMIRS6hVt5LWGI8A122UztcA3EyxvmEzTAZf+cC2u7rAg0LAHk 8YHiwwLBwgBG9Y58GoUbf7fgYICCy+ds0fSHZSNO4Q2WmUWZpyukUTRY1wbSVP1CuvQ0 6UDu+NUJX2oH0K5yUWl0QhVR11y9bfGXgIhJg= 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:mime-version :content-transfer-encoding; bh=e3mDsgPoCgCrdjC5qFpp5/iSytvlH62dGtUdddIuE3E=; b=NmE6E602N0Lrds+0p4yWPb8H/7rdq5tohgnJxuWUEIn/rrQzq1Equ+REiv281OPjUE Y+zla7jjPij2VufHCZFZVPfErd3o7G0o+shIZbvppeHWN6WH1nzMoNrJaaWILNNSODSY qRviqhBj6NCODdNDWEGOTtZfGTMXYvjPLReMXmgdFboT+TVTeiTyRe1FueiclMFdhwNt EHFcjVum9lLgwcJj4i5I0IIlPW6Kv2N9cNUscbopbIb9iaVM0X5vSoAz6hJS3vtDCElG c+iDiKKVUUJ2emcdZhqHfhqnhdEn7j2GUZ7htVLEmFbZDbh+ZYOsXQ26CSxQMF+KNl7k /nhQ== X-Gm-Message-State: AOAM531OSr1xviHXjG/QEWC5SRURztr8cgSy2u+TA87ZR46uH+8QBsf4 H9utvJO4Cir53Kl8KF/PhKUonPd3W6Uwhw== X-Received: by 2002:a63:4743:: with SMTP id w3mr286743pgk.207.1644346047783; Tue, 08 Feb 2022 10:47: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.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 10:47:27 -0800 (PST) From: Prashant Malani To: linux-kernel@vger.kernel.org Cc: Prashant Malani , Benson Leung , chrome-platform@lists.linux.dev (open list:CHROMEOS EC USB TYPE-C DRIVER), Guenter Roeck Subject: [PATCH v2 0/4] platform/chrome: cros_ec_typec: Reorganize mux configuration Date: Tue, 8 Feb 2022 18:47:16 +0000 Message-Id: <20220208184721.1697194-1-pmalani@chromium.org> X-Mailer: git-send-email 2.35.0.263.gb82422642f-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 This is a short series that reorganizes when mux configuration occurs during Type C port updates. The first 2 patches are minor refactors which move some of the mux update logic to within cros_typec_configure_mux(). The third patch moves cros_typec_configure_mux() itself to be earlier in cros_typec_port_update(). The final patch updates the stashed mux flag when a partner removal has occured. v1: https://lore.kernel.org/chrome-platform/20220207214026.1526151-1-pmalani@chromium.org/ Changes in v2: - Addressed minor comments (unrelated variable initialization. variable name change, return value can be 0). Prashant Malani (4): platform/chrome: cros_ec_typec: Move mux flag checks platform/chrome: cros_ec_typec: Get mux state inside configure_mux platform/chrome: cros_ec_typec: Configure muxes at start of port update platform/chrome: cros_ec_typec: Update mux flags during partner removal drivers/platform/chrome/cros_ec_typec.c | 76 +++++++++++-------------- 1 file changed, 34 insertions(+), 42 deletions(-) -- 2.35.0.263.gb82422642f-goog