Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp26712lqb; Tue, 16 Apr 2024 07:57:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0Z8trvyzwAYgZCQuVfxcsB31u4oblHCTn3ODC4EeXtSlC01PFf+OaBSZMj4H4GkmiMWZ3REyJWrAZVaNAzpsAVkQhBE3p+BV01/uQUw== X-Google-Smtp-Source: AGHT+IGdzA1zfTBqvJqG3fuyLvggfLcJRQHO0pi9+pfuknwySxbMg4Tmq4VfYxdNVgwRstlHrkNB X-Received: by 2002:a81:b207:0:b0:61a:d39a:1aa6 with SMTP id q7-20020a81b207000000b0061ad39a1aa6mr4898631ywh.51.1713279452438; Tue, 16 Apr 2024 07:57:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713279452; cv=pass; d=google.com; s=arc-20160816; b=m6halbSVmSrtg/M48RIfFUOd/OcHh9Vsl7AlfifoTQXUw0aZbJcGTkG/Qa004WPGd2 tm+Q+SYugvUkVy7Y0GuWPAUg0OiC3tjNsY0k0lM8vLGl4bwL02JfVH1CacEQ2QGonLOF LUVVVsxDmJevw6tTEahRJc8EtL/fDsbcdaspHLA1F9ClC0jdu4jp2rHUE/DIUf7tkr53 nqwUm7/kEo2qHl4epjpqrDPJr9DlPiqa5BN0f9PFmPjr9SgUKH6TcAoBSoLfq/3cT6wo pt7Z1spoFx/dyuWnTT49EFaFp9IR4+htZbq37F82rhpcpnKBX9Orc8YpqIWyLvzO6tZb rSBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Or5aD0vHhofq4hU9WI0SfKr5R6BUi9ScTzvy6tmm1s4=; fh=TEYBq7xfwx84K/Ipnil28wR6TJPTyucQj0yxYNRgFn8=; b=1HyyHQQ62cODX1pfAH7C8M0RhmgEQDuhyEEn/n2wsqw2m9oORPSe3eVyADDAGYyI+k 0PxXZwPDRkyMTNWcE7LAzS4fzr9dbnV1TyxM8fqalTWBL1CvHFvDHObMpn77XYpSmyNf ll0NQyFECckcGDIXiwUImLDhOFcON+63uQ5Vh7/hQkC4wrEe54lw+CTZ05N6PJ13Pp7R 5imtKE/gEF80rEHaL2myhSpcY93ASW1AQ7e8GplW3vSmrXrdrPgRQXv8U5kI2N16pAn2 ElxCXr8kzxQQQ7vsqEC7L5tRMNihVP2Zglu7ZnruPay15jLY5t9UH+RE0M++bekq+I+l pEPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nJnfgvXY; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-147074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147074-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gg15-20020a056214252f00b0069b5f0276ffsi10702095qvb.495.2024.04.16.07.57.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 07:57:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nJnfgvXY; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-147074-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147074-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 270791C21B85 for ; Tue, 16 Apr 2024 14:57:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4314F12FF67; Tue, 16 Apr 2024 14:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nJnfgvXY" Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDBAD12F5A6 for ; Tue, 16 Apr 2024 14:57:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713279441; cv=none; b=k8k7vn74tltH8oWIfb962urD/wSmzexjms+q6Zf7F4ivQX1PCV0UZakGyRwfo8qWD/qWyTxbAJ0VX3CFU6Tnh9QILRattf52GRpiD38cq8oLV5vu3Rv429BOuFACRGfhiMBRxgK3lBPVQnbD8fNxZa+RZEYMMBKRIzXP7xI7Lhc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713279441; c=relaxed/simple; bh=FrbIB/Z1SqzQ5A58Zqk4S74k2lIPrqfaXr5V7n8jcz8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FxtxuvN0jzOKOO8ACKcKF1g5Yj6pvsJcvzVqRH+RBsyfu8L0nAj+Knpk3s3YHwPKIyG5b+TqaPPm8vOmw8vj8baKG4LwnLlUAgP3QsdTLoUHleMeXC+6IdusnI1gTjbcBnzMqwZkmfm1mAeZF+7Tr12y6axhReokyul0eZ0Vhyk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=nJnfgvXY; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2da88833109so32606461fa.0 for ; Tue, 16 Apr 2024 07:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713279438; x=1713884238; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Or5aD0vHhofq4hU9WI0SfKr5R6BUi9ScTzvy6tmm1s4=; b=nJnfgvXYS2KiiYDk3B4MOcAJV6Vr6/Ewz6Q1ng1pT1foFIkEd2WO69nl5dENFiWmr2 JjGAmnjvYK/HEyzPEn+iBFU8PZMIW5kJvjnXRuah/SwCFhRCcP0qDF2uQAaPDsYujQda lPV1yGhoUChQB9oMDtyvwS9ouWnzrHK4fNyJgcdYmyjIMmMyoKI00NYtP24N7gqmqeYM H3YmLQr4V/UFy/zVGzdcqEVwsWXrKdApyjG7FAkbp2rgHSWBxgA1ZsLLzGzSxrgTmFQT uLkQAYE1WDqqz4uPOHyULhyh5cHn8rSaLNtHznIoDYYIHqf11ymUt5H5vsa3PWJ/vNgR 6AjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713279438; x=1713884238; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Or5aD0vHhofq4hU9WI0SfKr5R6BUi9ScTzvy6tmm1s4=; b=SLwhsH6uE90uJh6je0k2dhtI3M0AkU9daIS2ZueTnOSVzt2hSxsLce/hYm+t5Qlaoi gt8821RSJGg4a+3Dr6buJ5fVrNGYwwprzdCVTtcOp951xRwQz1beagupqLkbvhSdVbXr A/WiFhwjjsCbi1OdzHQBdRObeEPJNhiFWX0D7CVVumRrV6BgDjsiAYyQWueyoK43dp6d JHfi/8hxqZMD5a84PYRt75TdfPMxflHSi7tCjoVTw4+U7lP9+eQ7rNMqPlHGViIoWMy8 R6nSpe4bOXlzqO6aQQsS8Ro8OiYkub0R5WrHUOj+2r3j1pOzn4S/3oq24Y5C2vUDokcJ 3OHA== X-Forwarded-Encrypted: i=1; AJvYcCU5lI0JxgLQnWisUPXoimwE9gN52XC1O+RMXpxqEVr/oQz07cJOn2MJVk8+Qt4I/AbIwiUcbGCbFa7FB7FZvnkJgz9TIuV4JtZ9FzKA X-Gm-Message-State: AOJu0YzAik5N1ut0+a03xTpgogRrsgFRiFupHhFUA0E3p/0MpdQk3pYX hSPJPXMtnaLvWDgRFjDD/H1Ps+C26Cv6gpRaCVvJPEKLi7W6b0XMrYLIYwiIH2k= X-Received: by 2002:a2e:700e:0:b0:2d8:9fd7:859a with SMTP id l14-20020a2e700e000000b002d89fd7859amr8397471ljc.34.1713279438013; Tue, 16 Apr 2024 07:57:18 -0700 (PDT) Received: from [172.30.205.49] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id o21-20020a2e90d5000000b002d86641176esm1571846ljg.32.2024.04.16.07.57.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 07:57:17 -0700 (PDT) Message-ID: <66cd0d96-7576-4f70-b4da-b8d518253763@linaro.org> Date: Tue, 16 Apr 2024 16:57:15 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/8] usb: typec: altmode: add low level altmode configuration helper To: Dmitry Baryshkov Cc: Heikki Krogerus , Greg Kroah-Hartman , Neil Armstrong , Bjorn Andersson , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20240416-ucsi-glink-altmode-v1-0-890db00877ac@linaro.org> <20240416-ucsi-glink-altmode-v1-2-890db00877ac@linaro.org> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/16/24 16:48, Dmitry Baryshkov wrote: > On Tue, 16 Apr 2024 at 17:32, Konrad Dybcio wrote: >> >> >> >> On 4/16/24 04:20, Dmitry Baryshkov wrote: >>> In some obscure cases (Qualcomm PMIC Glink) altmode is completely >>> handled by the firmware. Linux does not get proper partner altmode info. >>> Instead we get the notification once the altmode is negotiated and >>> entered (or left). However even in such a case the driver has to switch >>> board components (muxes, switches and retimers) according to the altmode >>> selected by the hardware. >>> >>> We can not use existing typec_altmode_enter() / typec_altmode_exit() / >>> typec_altmode_notify() functions in such a case, since there is no >>> corresponding partner's altmode instance. >>> >>> Signed-off-by: Dmitry Baryshkov >>> --- >> >> Should this now be called from e.g. typec_almode_notify to limit >> duplication? > > typec_altmode_notify works only if there is an altmode->partner (which > we don't have with pmic-glink). Yes and this seems to be an excerpt from these functions, should they now drop that code and call this function instead, so as not to have it in the tree twice? Konrad