Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp905243pxb; Tue, 8 Feb 2022 05:16:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHz9KBfxq29O3KGJqesKLaX6aRCN8EpM3177ktV7uEMhg0hktyK/mbYZqbrptZPHnNj4Lq X-Received: by 2002:a17:90b:3a86:: with SMTP id om6mr1307335pjb.99.1644326215515; Tue, 08 Feb 2022 05:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644326215; cv=none; d=google.com; s=arc-20160816; b=D5Q8Fwb+4KZKgD/FIHnUW8KeZ6TguZWuwrZW6SYR92nlNd4uc8c+O2JtHxh4Sic22P oK0UX2ZhXwkTp9jc2pY8m+pYTep5dYJHvNX8Wl4THSl5eCaY/SQL0kQEIC/Uacey+pRE CO8owKTo1RNccQMPEmHc7ArKQdtlSF3oFFbVRIUpsgXoxOF0WfVwzc7rsoh7lGUaMY4t 3XqUNNVgNaplcQhW5SWkrobdXhkZVmjaOJ0OX01Wga62PBv2/ts517tvMZKmFbeydei+ QA51TY1FhuAMOTDGIAOMyRzvQg3joVW/V8X/YTiT8heeeybT+GrkDlbF3luJBxKX9AND Svpg== 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=zzxO3HcmPa0lMosAwo+8/h9UfVKa+wQzmEj2wnHSziM=; b=ymSW8i2jh2a226QN/h5wVQ8NMWDBuAME4fFkMGf9KO6tFAyqxQZVrRledht5+w65d6 j7cjT+ZoyY44UZo7uMrIYIRjXVMhnYdzVLlTgNHI5yS7areZgpMoFnGcyM+oQN65y88a UXtpngb8OlW2QITWy+U7/np0ojv9H+y1hvx+r/OBhKB/AuZ46VlM5eyOcySDNnnEBhGJ Ng/ijCdDrlSX9TqWgQKVLHL5ZtKcSOy+se6dklopmFj9eeVIrGTMToTQLq4wfT784TWx rjvQrquQUlqHKOPG2GUhzdzOzDA/1rgSOx6vlYXWQAfwC9j6Ljf3ZKXGKwLF4mztnDpW kgfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ShbdY2mb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l73si12938804pge.349.2022.02.08.05.16.42; Tue, 08 Feb 2022 05:16:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ShbdY2mb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346090AbiBHDR2 (ORCPT + 99 others); Mon, 7 Feb 2022 22:17:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344559AbiBHDR0 (ORCPT ); Mon, 7 Feb 2022 22:17:26 -0500 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95F29C043181 for ; Mon, 7 Feb 2022 19:17:25 -0800 (PST) Received: by mail-oo1-xc2c.google.com with SMTP id r15-20020a4ae5cf000000b002edba1d3349so16151765oov.3 for ; Mon, 07 Feb 2022 19:17:25 -0800 (PST) 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=zzxO3HcmPa0lMosAwo+8/h9UfVKa+wQzmEj2wnHSziM=; b=ShbdY2mbI1d4/3jPV8kyfnQaqrRnf7w8sMMGMnPKKSfhl7XeZDCV8PZsSLkbfN0yA/ 2e7I8B5Mm6/VLL6Zb4zQCctE/JRQAXkKJxPga5ArXu+Gj4Ef+8C6HWr3XPviQhXu1SRD wnMC3X/BZ40oFcSu3qWFj/P9oFNwBCLiEwBFlGVaX8jEYQbLrZUr6MN3fJDjwCd97LvT tEblTdZiDr5JmdL1rsFNC8Ex+U4g8m7i71BV1o4+1XfpXJDyi+uRn7Dn4vaIonYrpMlh cQHV13m6ut9R7CHQDaH6qXcWL/cDw7VchzM0M2FYxncmLTnnXoWoxuwgjdDqvIsNn3D1 w5pQ== 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=zzxO3HcmPa0lMosAwo+8/h9UfVKa+wQzmEj2wnHSziM=; b=4JtI4q+8W9VSFzf8PccQC4ocygNWRRs/wgnJ43qqkXEhtIi40xfuiJYeVZ5veBgeXT oAgKqkTWvAbAQfymUNURhY7VdcBUrDKwttviYT/If9cpr4+z6rRs8MtPcAGyIYHg8SZt aZB6HnZ42+hGdGIY4UcwDS3XQRCYDxkB7n+1HlwSnDMlpod3JgmTDdqQg5buJv8yiSf5 rzIWo6fp4KIxS7ChbTzEL7GnDUExnVOXkGplxIjSU2ajfdPlEo3BvVr0GrqmqRv7rQvY OXWhQkUsLhBFxGLkDELvbLaH6oL20J5L9ns8Xs91Ou7eqi2OJqs/EPQU2wW2Z1NyP+r4 WHkQ== X-Gm-Message-State: AOAM531doZHJ6iK9QZWji9pJiySZYONkOw7OIuIM/4h7A3ziUPum4Zt/ XyxPmQNox+0C0B+ycqJFkg00tw== X-Received: by 2002:a05:6870:1043:: with SMTP id 3mr705760oaj.239.1644290244935; Mon, 07 Feb 2022 19:17:24 -0800 (PST) Received: from ripper.. ([2600:1700:a0:3dc8:205:1bff:fec0:b9b3]) by smtp.gmail.com with ESMTPSA id k3sm4763873otl.41.2022.02.07.19.17.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 19:17:24 -0800 (PST) From: Bjorn Andersson To: Rob Herring , 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, Dmitry Baryshkov Subject: [PATCH v2 0/6] typec: mux: Introduce support for multiple TypeC muxes Date: Mon, 7 Feb 2022 19:19:38 -0800 Message-Id: <20220208031944.3444-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 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. Included in the series is a the new FSA4480 driver. This is done to deal with the renaming of the driver-side typec_mux -> typec_mux_dev. Changes since v1: - Omitted QMP changes from this series, as the muxing implementation needs a little bit more debugging. Bjorn Andersson (6): device property: Helper to match multiple connections device property: Use multi-connection matchers for single case typec: mux: Introduce indirection 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 | 85 ++++-- drivers/usb/typec/bus.c | 2 +- drivers/usb/typec/mux.c | 261 +++++++++++++----- drivers/usb/typec/mux.h | 12 +- drivers/usb/typec/mux/Kconfig | 9 + drivers/usb/typec/mux/Makefile | 1 + drivers/usb/typec/mux/fsa4480.c | 220 +++++++++++++++ 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, 595 insertions(+), 110 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/fcs,fsa4480.yaml create mode 100644 drivers/usb/typec/mux/fsa4480.c -- 2.33.1