Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2180707rwb; Sun, 14 Aug 2022 23:44:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR721DB5+02BiLgmMUmmtFK+acR0GBJLIC62rYeqjDt9Rqe/mg05vh/OEm3Mk7ErDC62fyjD X-Received: by 2002:a17:90a:898c:b0:1f3:8287:3fd9 with SMTP id v12-20020a17090a898c00b001f382873fd9mr17393779pjn.232.1660545853627; Sun, 14 Aug 2022 23:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660545853; cv=none; d=google.com; s=arc-20160816; b=AfS8pHGdypdT1ZwkX13+n8onMNMT2DjWeBS+wulL1531QErx2BFtpTptF7L//egERi CBPhMQCOidZcj67OWso3RNV+d74uhLWmhF30eIGrG2urrZ0atht1qov47MB991jqAphQ jSSfKdWJ+ymp7JO2IoGNxqV1e5lr9z0SQA5N5DlYE9OPTnOX++XnF7t+bc+L7r6c7it7 A5i4py0Ib5Lkp1J2AvJ8gYuCsVQC3nfCIfq9OGcH8kXrILZb2QqN3Iga4P71X7XnNyMY yH3Lpce+SCx4vNnH3Odoh2kl45tcm3KvhZzphwAoLM8gT4kum03JBLSHT8MgI7u9XsLo gP7Q== 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=fENEN34IT/T7O956m7l86FcgYrM9sywQ94rNqD2QyzE=; b=tiUyiLLXgVfnmq4z4Qo8ABLcvZ+6kspXn/keRV3P/3fLCmm5vLPVdll0aPwrOncQXy FewtTf5x6nxBtSpZthaZP9KJAGBQyhILm6+Dt+DlHgtD1BXpe/lmZIv5ejAzFT9A/iIy Qas6wS95+bebdJWksFsjUtGEQWPkvGWHhV7rRb6+CeK007sch937LB60D1/N5p+5/FhK RUc0YklyPQS6hULTlreqvoFe85nQfoZ93I/QdIEXdQx2WvnzcEmjThHz/rdxMWtoKq/T gFGf1JHEacnLjadhhK5rVNPG2u6TXhJ/fOiJKsQYcFeG4PiSN73XbtFx1TVDNqqD0d0I jlJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=i98NnWxj; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12-20020a170903228c00b001714080c147si11564637plh.515.2022.08.14.23.44.00; Sun, 14 Aug 2022 23:44:13 -0700 (PDT) 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=@chromium.org header.s=google header.b=i98NnWxj; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231168AbiHOGhB (ORCPT + 99 others); Mon, 15 Aug 2022 02:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230466AbiHOGg7 (ORCPT ); Mon, 15 Aug 2022 02:36:59 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E66CD140C6 for ; Sun, 14 Aug 2022 23:36:56 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id z19so5661907plb.1 for ; Sun, 14 Aug 2022 23:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=fENEN34IT/T7O956m7l86FcgYrM9sywQ94rNqD2QyzE=; b=i98NnWxjozZ59t+dRaFmVAlXBybfgyFrZ5UnP4Yr7gkA/2bQ1+uLtDBF6WFexl6RqD 2V582Wf1NmC7A2NYhywly4bif+z7sse3dbSdr1iTEN0AqrNGb6DRPQtKsaUFi0s96OBt 0XV6q61uVbarfAPyAdAKtxxYhvTnuQpeIYGIw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=fENEN34IT/T7O956m7l86FcgYrM9sywQ94rNqD2QyzE=; b=zsfgT7b793DqEcdd9lpmCryDXiuYp041t+mclmKrXBdi0o3VSfIYTdcDSlsqvdI5K6 1t47xMVdKQhqBf+Fk0CSUnEnTlbuxvGAS3cFyE6NCSX8IHL3xPy7s3JboEctrgI8zoEk Q5SdlDMxDji28ystY7RxgMlKZR68ddUuTvXCFmh6YtJc9ghBSz73IwVlhpO6NvvG75RA pzLHpt5UdFB3NoFwYzVVw6Zh/Wk4iyxBa4CCmQJqdIbZjKuufLZC38irYO/1JQl6CT89 4wheDmKDAF5OBZXR+bctt4PrWJRX06bg9bUU2uIy1wenopFy/mkKLYYLSLpx1q2r/EkV 9E5A== X-Gm-Message-State: ACgBeo3zZSU1OzDQshyi7gbwxoHdrg7yNX77tS3HwRYwWja+KJc/3VzF VXrnCtZtCwwgc2FyKzMBPrLTXAEF0JQ2oQ== X-Received: by 2002:a17:902:d551:b0:172:55a6:bd34 with SMTP id z17-20020a170902d55100b0017255a6bd34mr12173075plf.13.1660545416245; Sun, 14 Aug 2022 23:36:56 -0700 (PDT) Received: from pmalani.c.googlers.com.com (137.22.168.34.bc.googleusercontent.com. [34.168.22.137]) by smtp.gmail.com with ESMTPSA id 200-20020a6214d1000000b0052db82ad8b2sm5988233pfu.123.2022.08.14.23.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 23:36:55 -0700 (PDT) From: Prashant Malani To: linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev Cc: bleung@chromium.org, Prashant Malani , Daisuke Nojiri , "Dustin L. Howett" , Greg Kroah-Hartman , Guenter Roeck , "Gustavo A. R. Silva" , Tinghan Shen , Tzung-Bi Shih , Xiang wangx Subject: [PATCH v5 0/7] platform/chrome: Type-C switch driver Date: Mon, 15 Aug 2022 06:34:15 +0000 Message-Id: <20220815063555.1384505-1-pmalani@chromium.org> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 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 v4 of this series was originally merged to the USB maintainer tree, but there were dependencies from the chrome-platform tree which caused conflicts in the merge tree, so the chrome specific parts were reverted [1]. v5 is a resubmission of the series with the Chrome-only parts (since the USB framework parts were merged successfully). [1] https://lore.kernel.org/lkml/YtadE201j+dt5jJx@kroah.com/ Original cover letter (with parts relating to USB patches removed): This series introduces a retimer class to the USB Type-C framework, It also introduces a Chrome EC (Embedded Controller) switch driver which registers the aforementioned retimer switches as well as mode-switches. v4: https://lore.kernel.org/linux-usb/20220711072333.2064341-1-pmalani@chromium.org/ Changes in v5: - Removed first 2 patches for retimer class support, since those were merged in 5.20. - Added missing ACPI Kconfig to Patch 2/7. - Updated patches 3/7 and 4/7 to use new function name cros_ec_cmd(). Prashant Malani (7): platform/chrome: Add Type-C mux set command definitions platform/chrome: cros_typec_switch: Add switch driver platform/chrome: cros_typec_switch: Set EC retimer platform/chrome: cros_typec_switch: Add event check platform/chrome: cros_typec_switch: Register mode switches platform/chrome: cros_ec_typec: Cleanup switch handle return paths platform/chrome: cros_ec_typec: Get retimer handle MAINTAINERS | 1 + drivers/platform/chrome/Kconfig | 11 + drivers/platform/chrome/Makefile | 1 + drivers/platform/chrome/cros_ec_typec.c | 50 ++- drivers/platform/chrome/cros_typec_switch.c | 332 ++++++++++++++++++ .../linux/platform_data/cros_ec_commands.h | 18 + 6 files changed, 406 insertions(+), 7 deletions(-) create mode 100644 drivers/platform/chrome/cros_typec_switch.c -- 2.37.1.595.g718a3a8f04-goog