Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1001691pxb; Fri, 22 Apr 2022 16:26:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLID7qAUHavUOSLAPf+QWoY7Qz4/lKatIhLnLMdsbBlqO+ZvTJZcIKctA76BX8x/9AyoYM X-Received: by 2002:a17:90b:1bc5:b0:1d2:699a:54e3 with SMTP id oa5-20020a17090b1bc500b001d2699a54e3mr18784898pjb.136.1650669970162; Fri, 22 Apr 2022 16:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650669970; cv=none; d=google.com; s=arc-20160816; b=IG8rg4P+ittySFg0I5m1BDajbnDta46GqvxIuAbVFJ/3cwbuX1LWZXBaTc8tGxr8Fl WPgV8VREJXy14LifI/x4n0WoEFmZeAzh0zuDoloeENQ+OKrK2V83jLIkf9Cl6pPWgiC2 rKPzP9vWsllSBRBhEElJXKKjyhsevj49BLFHuB6+C4+tZjdmEuJhQlJs5w7Ngxj97h4Q zDdwZqeYUAuGo5cudjwpg+EoCw5Kym/TxBaT3QzwHhLnb1qWiJIPvU3wc32JBNb4ZdIw eFvnUiJdcZHXO071OYnxxgOOau12mCHlIKfqyQr3H9UaS31yxOTWuSUY/yI1Wt4hzn/t eztA== 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=zshTmKTlwWpNs+bPCyPg2G4xzDcF+pfyEHctS9lyUmM=; b=MDqPUIQKXnqWNl900TcHRRhmHxkbx2zL3/k5QLF/mKF/tllifhaiEq5/dxnd3Jrf7p Q84luoKSwy0gJA4U9D+pL72YEWucuAY6NOs3LFNZdvmqMAAXLkQxQD8tjI/Bk89oHCw7 M6JVGX2x5VeT547sZbHPfoP68Mb59EOEy8R4HSDlGbDJ/B2/qEo2hFA1GjfXEpjcmgmc m5nNprrXkrbvJUbi6jhvYqlfWuKXF/dUGClZ2FqppClHEmnKFdhLf0exDfXx0ehtzeGN avvTrY12X2QPv8cUp/JrQNA19KapVUQjhUUhzUi50JopHd2t0FBnU/3i/7UvvwjhadKd lHbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p18Ea3C4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n1-20020a634d41000000b003aa386d281dsi8737739pgl.771.2022.04.22.16.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 16:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p18Ea3C4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D6D521D8D80; Fri, 22 Apr 2022 15:55:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234071AbiDVW6F (ORCPT + 99 others); Fri, 22 Apr 2022 18:58:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234191AbiDVW5k (ORCPT ); Fri, 22 Apr 2022 18:57:40 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 931E23420EF for ; Fri, 22 Apr 2022 15:21:51 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id e4so10593107oif.2 for ; Fri, 22 Apr 2022 15:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zshTmKTlwWpNs+bPCyPg2G4xzDcF+pfyEHctS9lyUmM=; b=p18Ea3C4s1iYRhpjXGv+Q/z6sLN27GiKyszpjW0gjWX20QRsSCMVqd4yA/Lh7GOi9g /NZuoRazntRsAsm7WAgnDef7b9pUyzSbPBgJLpfKe4YaPvU0WJ0QR75I/vUhDq4iF6RT QUQKylKyqoeB5ZCAIKx5U/i6opxvjNvTD9dkTdx4Ut2k/jC9uC6xqzQstUbv9ArUTpU5 eylxKDHkC64LZd0jHtQ00UXgy1/AShQ8KDXPe60eVxQwS3eWzG5ASX7cvsgM48zY4w1Q +k+q0r3URNAs8mcCu2n5GkmNiYnEkray5b5LPhbWNoTNHhoOnpg7Ib3g+qRBL5oC5/Xx q97w== 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=zshTmKTlwWpNs+bPCyPg2G4xzDcF+pfyEHctS9lyUmM=; b=PhCatgFXQyzd/nTRSpmg0TJ6sH8hM2NzdWHHkhsvCIvi3wNNIusGLDTLH1LN2+7+eS SMOmDdO9Usc+dFzVgi72CIuLe87wy7cMzui6Dm8TVPnvWmpsT+rOPRw9s8UhyZi6qDcw GDbgbwZeSCdsDpaKp0B8Hh8/3kfTQ6ttz54nTjs5nrd5Uo4cXzQpj0MwCqUqN7LMzbCW c87fUpe2MqEjJuEechm7sVjvdC10yWQq00Azxb2OqZahM7Mkwrz6kjKacHqHadDrIMS+ IeMsW7om4TjosLJwVku9toAEe+uAzRdk+X7Qwbp6cudvtbAI9RrqMLerFfUinlZre/Et cWXQ== X-Gm-Message-State: AOAM531k6TSC6laqO40CNvDezmJTvUrtXZ4dlXF8TeoTyCqD8TN381IZ A2VyZHJbT3ennwhSpnCERYIyzg== X-Received: by 2002:a05:6808:1828:b0:322:4891:8832 with SMTP id bh40-20020a056808182800b0032248918832mr7699862oib.172.1650666110356; Fri, 22 Apr 2022 15:21:50 -0700 (PDT) Received: from ripper.. ([2600:1700:a0:3dc8:205:1bff:fec0:b9b3]) by smtp.gmail.com with ESMTPSA id js4-20020a056870bac400b000e687cdf5adsm1049224oab.55.2022.04.22.15.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:21:49 -0700 (PDT) From: Bjorn Andersson To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , "Rafael J. Wysocki" , Hans de Goede Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v5 0/7] typec: mux: Introduce support for multiple USB TypeC muxes Date: Fri, 22 Apr 2022 15:23:44 -0700 Message-Id: <20220422222351.1297276-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE 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 This series introduces a level of indirection between the controller's view of a typec_mux/switch and the implementation and then expands that to support multiple drivers. This is needed in order to support devices such as the Qualcomm Snapdragon 888 HDK, which does muxing and orientation handling in the QMP (USB+DP) PHY and SBU muxing in the external FSA4480 chip. Bjorn Andersson (7): device property: Add helper to match multiple connections device property: Use multi-connection matchers for single case usb: typec: mux: Check dev_set_name() return value usb: typec: mux: Introduce indirection usb: typec: mux: Allow multiple mux_devs per mux dt-bindings: usb: Add binding for fcs,fsa4480 usb: typec: mux: Add On Semi fsa4480 driver .../devicetree/bindings/usb/fcs,fsa4480.yaml | 72 +++++ drivers/base/property.c | 96 +++++-- drivers/usb/typec/bus.c | 2 +- drivers/usb/typec/mux.c | 271 +++++++++++++----- drivers/usb/typec/mux.h | 12 +- drivers/usb/typec/mux/Kconfig | 10 + drivers/usb/typec/mux/Makefile | 1 + drivers/usb/typec/mux/fsa4480.c | 218 ++++++++++++++ drivers/usb/typec/mux/intel_pmc_mux.c | 8 +- drivers/usb/typec/mux/pi3usb30532.c | 8 +- include/linux/property.h | 5 + include/linux/usb/typec_mux.h | 22 +- 12 files changed, 614 insertions(+), 111 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml create mode 100644 drivers/usb/typec/mux/fsa4480.c -- 2.35.1