Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp656542rdf; Tue, 21 Nov 2023 12:32:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfd/IQond+q4iPfr7Zrm1/7s1tV+NE15lWYZ934DQCZUKaXL8txqr8Uxx00yIR9blUC4EN X-Received: by 2002:a6b:ea15:0:b0:7a6:a166:dcac with SMTP id m21-20020a6bea15000000b007a6a166dcacmr422384ioc.20.1700598724196; Tue, 21 Nov 2023 12:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700598724; cv=none; d=google.com; s=arc-20160816; b=oKQ9rzosZBkpEHgHPLAkRJwfnyaq3cJ062pAL9/PzsGX0+QFhW32h5juPuof/3d/oA GFxlcaGUnC6TRBiAwf2GxPMjCMfjCDBVcp1ITZ7OzeBEpqQu62EIM4JGqYOr1epdDyCm h2ccFPUspy6L0sObrAkqEY47U/2ChqQIz5m7/Jz+b39xTX/Bb3vc5ChftUCXH7Hh19DP H5F319Zynd6sV8i460595xMszIWJq3qUBdCbTwHgEXSpW69g7vXCVvzv2wurjcY+Zp5l xOZZ7GzXtwTSRINdij1AVkxahtw52EVQjo1qUzc2OAN+KICZUtcwWIJUF8RKWKAMaGGj umKA== 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=d/YPc2+7OX5cSuooAWCFK/zXbyQQcMjUtmvaEdzyH0I=; fh=A3blBdamKtq5kPtlpYpz4l6zGyY+ur9G2hKXzMhYY3Y=; b=fnd8hucTgnMUrMD6rU7QsoLmWmAvA7G+E9sQQcsZpBSzp37wGC51uBtzKqw6AdAL/k U6mSjT42cJc4yeCvABq7TvU2JynU4so9S1AngI7NHPagO9Z5gqj+zsP3erJ0WV8elwKm jQAKvEb55lWgltZ6uSgGxFg7JzqqH+HQZUpp60+cCtXbyptGg1w2hyXwY0OC19tMBnHI N0sOifGWQ7uvanhh4Aa5/jfw0IVgD9v7eondtGGFJP87Z+AziIS3XVcyXtmWityBc/1z GGF1QoT+jvengrGQE37HhzKNmzqMbN4W7OegiVcRkzI2NgUPykp9wXDxMByXCe0NFhLu YDCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ps59Aw4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id r22-20020a635d16000000b005be27af74basi10707233pgb.33.2023.11.21.12.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 12:32:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ps59Aw4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F2369802B406; Tue, 21 Nov 2023 12:32:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233894AbjKUUcB (ORCPT + 99 others); Tue, 21 Nov 2023 15:32:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234403AbjKUUbv (ORCPT ); Tue, 21 Nov 2023 15:31:51 -0500 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B745C1BE9 for ; Tue, 21 Nov 2023 12:29:28 -0800 (PST) Received: by mail-lf1-x143.google.com with SMTP id 2adb3069b0e04-507bd19eac8so7903233e87.0 for ; Tue, 21 Nov 2023 12:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700598567; x=1701203367; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=d/YPc2+7OX5cSuooAWCFK/zXbyQQcMjUtmvaEdzyH0I=; b=Ps59Aw4+pnOcsZnMWAupwEZBkEGtOXOiqJs7dXAa0Xypq1i2WYq5D5dTNEV2ruU6Zb TjdhhYjxAih+QC5k1G74Z+aBFVXE+0ZG1HpigJN4sTGg3ME9cbX/bV8ex7QTP6d4OfSI OfIrvgvr39fH0A9tNv5wzLXgPlRh1OymF2XC7DVajXY2+0fPQnT6+z0b+J1hp9Pe5RWV qG+kFdoP2rL/oMXCL0LGGOSKMgPfwT1KTJqp/B3VMB6AnsnEuNXkjXUy/R+ZmtPEf/0I 8lwee+yJjKHYmdWn3TbSI2qSYWU9arIN5AY9DeXbeyr+AN/QlGLfI0pL0cs0uGilEH+s EJxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700598567; x=1701203367; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d/YPc2+7OX5cSuooAWCFK/zXbyQQcMjUtmvaEdzyH0I=; b=Ia+PiDCuBk29JM3FQ933mIkOPbuvOGLMdkGBOLBvH196PXKUSeIA14+EMV/A1WAk7+ zQazkS34taG4+IR5laq3QPlsoZLMnlgpjMnGtduYVCgFGOM/6q7TN8SCoil84WhHomA5 9jnsMa1aR7BzJOVvdtkrcbyBK4gH1OKYnzsSvnOCxlcFSzMv+oO8cTt6F54y/V/Ibth0 QpWpJbcckyb7/88Uhd86EuWLQ5RjMTivVGAaEUJIfWX2eWIpBKEQ6DNnjLZttHEdjVGu jQ5gQhZilkhfNDlgcZZwORvac1/576ago3ZzurBri2rh2zk5P8iboiwmYrc/cGJGWxrw ljyA== X-Gm-Message-State: AOJu0Yw/XmqaqeLtYV9dkZJvrx57Zg1uZjPqv64IuR/ySeAea6/2f7B1 pn4zDpErUyrbtxuxTeE/F1BkRA== X-Received: by 2002:ac2:5e73:0:b0:507:a383:fe18 with SMTP id a19-20020ac25e73000000b00507a383fe18mr190070lfr.40.1700598566624; Tue, 21 Nov 2023 12:29:26 -0800 (PST) Received: from eriador.lan (dzdqv0yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::8a5]) by smtp.gmail.com with ESMTPSA id h4-20020a056512350400b0050ab6112af2sm286287lfs.65.2023.11.21.12.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 12:29:26 -0800 (PST) From: Dmitry Baryshkov To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Mark Gross , Heikki Krogerus , Greg Kroah-Hartman Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH v2 0/2] usb: typec: tcpm: Handle Accessory Modes Date: Tue, 21 Nov 2023 22:26:58 +0200 Message-ID: <20231121202925.2481471-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.42.0 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_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 12:32:03 -0800 (PST) In addition to Alternative Modes (see [1]), some of the TCPM-backed boards (e.g. Qualcomm SM8150-HDK) can support USB-C Accessory Modes (e.g. the Analog Audio). Add bindings and driver support for parsing this kind of information. Note, while it might make sense to put accessory-mode-audio and -debug handling to typec_get_fw_cap(), I decided against it. Several existing drivers use this function, while providing AccMode caps based on some internal logic. [1] https://lore.kernel.org/linux-usb/20231120224919.2293730-1-dmitry.baryshkov@linaro.org/ Changes since v1: - Initialised the `mode' variable to 0 (Sergei Shtylyov) Dmitry Baryshkov (2): dt-bindings: connector: usb: add accessory mode description usb: typec: tcpm: Parse Accessory Mode information .../devicetree/bindings/connector/usb-connector.yaml | 12 ++++++++++++ drivers/usb/typec/tcpm/tcpm.c | 9 +++++++++ 2 files changed, 21 insertions(+) -- 2.42.0