Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5470083pxb; Sun, 13 Feb 2022 23:02:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrV+9SWm+h4dGhTaWUEA04nFfP4Oo2CvWfV5xFkwGvEUhxgdoBq6gzkqXLz462oQreUlax X-Received: by 2002:a05:6402:43ca:: with SMTP id p10mr13917923edc.212.1644822138383; Sun, 13 Feb 2022 23:02:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644822138; cv=none; d=google.com; s=arc-20160816; b=FY4lQAfvBsHE7R+3ZJ1C61tMAHxBQS2LK3hs4z+At78muBHRmsQcOGnREkWMDKMsXe 7y9xpwHSbtIGF4OBNw4pwEiz3jeFgcE2eF2Wkg+dzyl9NFehpqx5yCRtmWiFo3EwYycU VIXys3fhxS0cPJ5+GxFoHbDmKEICIh1qeqpr71jUiQhCzLRUqm/mAzPUklPk+0XVXWXH JBbTZFrJ8nsS4fG1aAh0gqZohtPm14C8li5kK2yG/Xk5ulLRqC8hetlJpr1XczRXPldi cXtRupzWUZ1ZrnsL4WOc3PRxnu6xQzLQM095bsVp+BwGYlTcxNKgMHtFjY1QAU+TPk// xsbw== 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:dkim-signature; bh=P8ny0glPIbzXvv8K/3CaR5QyxbAhzVqg86FprJZW2OY=; b=CPHnR99ZWrZztHmV+k+ikTN3wWSkSH8L8IJBKNqqJulPEvFGCSo9zn4sdCBHwkUR4J wOTtuaYIf6fwIgYCnTYKODi0SS9oK3uXnZlJu1ASEO2SpTPFDQyEBmFI2/xXa0xrG/WG BJsc5F7nopiBrKdLx+wUbyRkYt57bu5IKHB12EWdmjJpcw8IsiCABXGFbycxJxUaYzbZ qhZ/wemB5XsT2F6+QF8cX8aYiMxIOjXpfzM/P0GAQSNX5vpwrCySQgKz1tDHlfqzHLyE T8BanCoLon4i5/vIDvtSzPtzqaHC8zBNTu0kR/RNC41w9remcxiKx+dR98zk0b27v+p3 kiRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=HrjtFzbF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=YjoyhXLg; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw2si3944364ejc.708.2022.02.13.23.01.55; Sun, 13 Feb 2022 23:02:18 -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=@sholland.org header.s=fm2 header.b=HrjtFzbF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=YjoyhXLg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236483AbiBNFBa (ORCPT + 99 others); Mon, 14 Feb 2022 00:01:30 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231903AbiBNFB2 (ORCPT ); Mon, 14 Feb 2022 00:01:28 -0500 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B766A51E4D for ; Sun, 13 Feb 2022 21:01:21 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 803A33200C14; Mon, 14 Feb 2022 00:01:20 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 14 Feb 2022 00:01:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; bh=P8ny0glPIbzXvv8K/3CaR5QyxbAhzVqg86FprJZW2OY=; b=HrjtF zbFtZVMBbvBl1WkukQh9pKnGjuvx8S83wsDZBHbDizdi+BaKnGtiw9AVs1RcDHbQ cpnqM0frDb0JG9vBq0rXNlxvrBW2gguiaQO1GHQalL3ZvtkYY3dGUb60xZe6L/DL dGF31DNz7GD/Nt9aZRMVGK0IRPkADFqUovS+rjaZi9l+87SRonDoeTI0V4mMq3T8 6qj3J0aO0hM+pwySjfcw6VxlS0cU0z/iu6VB/s7vIk66DbGJPzrGHU1xr4UmxHBm u5ehqfGeMw6jXjY7Kz09qFhbTi1cI/PQU08MhrCIrJACtlEqmdg4uUwATP3JbHAw xGO1ExVPk0p5kVhGg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=P8ny0glPIbzXvv8K/3CaR5QyxbAhz Vqg86FprJZW2OY=; b=YjoyhXLgIod/mI8Bm2IY3DDStW4fn/mi0x2r5IP3ACNap D4625rTKMn44UWhxRTV25tC1cOpb/b3AI+DoDaD8UXQwUgjcqMAUozNVJNv8VXp8 4FPbMVZKgCTTV1grcd1kKmqXTAFWp3MCUqLcvKtmMjVS/gN6ErO4W9UpLuG+YX4A ymRZKyaksJ+Mf9thQ+uToTV15tT85vka1wXd5KMKUublBqPz1QyqONlBpAxrR9Nd 0oH81WVhx2BYfJ4CLYPncRr2RTMV7wVWGZHXOxxXe6p9ohzkLK/1s1tXNC40JBim H6J9sloVcsjr0FPD7GJwCvdJ5bMvkY5Vd4xO4LSKQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjedugdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghlucfj ohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrfgrth htvghrnhepieetkefhheduudfgledtudefjeejfeegveehkeeufffhhfejkeehiefftdev tdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsh grmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Feb 2022 00:01:19 -0500 (EST) From: Samuel Holland To: Heikki Krogerus , Guenter Roeck , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Samuel Holland Subject: [PATCH v3 0/4] usb: typec: WUSB3801 devicetree bindings and driver Date: Sun, 13 Feb 2022 23:01:13 -0600 Message-Id: <20220214050118.61015-1-samuel@sholland.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, 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 adds bindings and a driver for the Willsemi WUSB3801. This chip's bindings use the standard USB Type-C connector bindings, but the driver does not use the TCPM library, so a refactoring patch is included to avoid duplicating some fwnode parsing code. Changes in v3: - Leave the call to fw_devlink_purge_absent_suppliers in its original place in the TCPM code. It is not needed by the new driver. - Remove unused variable from TCPM function. - Remove version info printout Changes in v2: - Always put the return values from typec_find_* in a signed variable for error checking. - License the driver as GPL 2 only; probably best anyway as I used a lot of other drivers/usb/typec code as inspiration - Don't try to be clever; use `default` instead of `unreachable` - Free the IRQ before unregistering the partner/port Samuel Holland (4): dt-bindings: vendor-prefixes: Add willsemi dt-bindings: usb: Add WUSB3801 Type-C Port Controller usb: typec: Factor out non-PD fwnode properties usb: typec: Support the WUSB3801 port controller .../bindings/usb/willsemi,wusb3801.yaml | 75 +++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + drivers/usb/typec/Kconfig | 10 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/class.c | 43 ++ drivers/usb/typec/tcpm/tcpm.c | 24 +- drivers/usb/typec/wusb3801.c | 437 ++++++++++++++++++ include/linux/usb/typec.h | 3 + 8 files changed, 572 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/willsemi,wusb3801.yaml create mode 100644 drivers/usb/typec/wusb3801.c -- 2.33.1