Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp22990lqb; Tue, 16 Apr 2024 07:50:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUSk/CVT4SHx7w1uQbmKNNPh72AJZbh7avfYAqi3ET4BTWEndrOIndBReoc011SGko5OjNQNbtwFEZRPTg0MQkCJP5ThRD1etoE1sPfbg== X-Google-Smtp-Source: AGHT+IFJWCFyWVK+ZSd22gQ7cS48PJKCNsqg+Rfswjf7Ggs+iFcp5LgQ0+CwWXYbW3c1jjK2O7mb X-Received: by 2002:a17:907:72c9:b0:a52:53f3:af3c with SMTP id du9-20020a17090772c900b00a5253f3af3cmr8155824ejc.10.1713279036498; Tue, 16 Apr 2024 07:50:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713279036; cv=pass; d=google.com; s=arc-20160816; b=Fik3LZ6rpH/u3tD+bc76i6uSMZtBGSn+ejMkrbuxg9IX7u8hkBVWbHYWgBehVIDH94 PpJ7OEXZjhuZNHRRvkrO5iHln2qXQ7QXedrMGDejZVuVAfEry6uXcuKaJ/Q3f4v+z1ji DZKk7JI1Gz1XSXpVtd3zwTBmRpM97Vym8CRsrGms4IeJPIpWYgh9VUDzX5+jcdusZpNG 1yqsq9N3+qzbWC9ZYi3n1l3aC7HzhvYejWsp/IcCBBz5Lqz7aBRUoLWoKXlLgBSwTuiR Ff58XVa7GrnUxktIuzBfmwyISsI2fKVcCuKLk4Al0hNC0Oy+/C55ouy1404qKd9xEioj 67Hg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=dkC9HeIhznIftL0Ye+AK9W/2NXZL9l/CimUWQciD92s=; fh=X+E6TK1ZB5YUeHyIf7Qok2ug9noVtTv/QGli4IG6Ti8=; b=hFpNKiVn6lxU2vWalbUOrEXEnriXD9UFM5Ypw9VCpAer95JCBjf7VMR/2IgZyau3wA rc8hqhxSq6f6xc4eC7HBYcnK+koMlJuYlW6o+GiqfcQbQ/WZZMWDucb5kNrB/wNrPJOY 8HRmqtldCjBplKFKGvGPA/jA/U4iceW7aoZmlZ+oYDLdp5kznjdtq5Uhqi2n04WF5gIK BBmoJLg6HofeoL412uICfehZ4GfJfQoN+rxpV9yvaLjLJhhnvQ+dlEBQ0BbwZa6qlw3+ oFgbuFxkWzf4f8RdpOUuily/cvcK6zf3+ucq7kDUsx2X0diGz28IPdBJ+4NVAW76Ji6q G8vg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KcH/DCXH"; 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-147063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147063-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h2-20020a1709066d8200b00a523cce80b5si4368467ejt.887.2024.04.16.07.50.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 07:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KcH/DCXH"; 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-147063-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147063-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3E3821F21743 for ; Tue, 16 Apr 2024 14:50:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 163FC130A64; Tue, 16 Apr 2024 14:48:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KcH/DCXH" Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (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 C895D1304A8 for ; Tue, 16 Apr 2024 14:48:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713278936; cv=none; b=gAO8bIVKyOWa+B18D3U6W4M8Gg6ue4yklDFBg9LuIUfh7CybQXAFg349HCFc0QFacRsSjeUo/g7rj0pPIxsNDsp7InNo9ONqqteWBt+xC7sXapTNQLMQaBhgp9Kt6J/v+VWY4h+VVNd53dcFmBfBvXSz4bJnQ28Kb6Xx08wYW5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713278936; c=relaxed/simple; bh=qv8o5hhH38UTAvt4yDxgWYargetk899Ucn2PZF21ckg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Hb4Vv9BoztOl5PA4GMdUph8Yk0Ffhl3Hm2erx41APG6wj4UCjVrku0p97+bL+/D+Dv+3hasxGVugLfqMUCwJLRagmGe/CVwa5izT+4/Hw9H5WSCMDlWDMTQjir/x44fw/7qMaBjMku9DYkTVexG/SMLKN1FQCbhuLkCvV1m9Bsg= 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=KcH/DCXH; arc=none smtp.client-ip=209.85.219.171 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-yb1-f171.google.com with SMTP id 3f1490d57ef6-dc74435c428so4386654276.2 for ; Tue, 16 Apr 2024 07:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713278934; x=1713883734; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dkC9HeIhznIftL0Ye+AK9W/2NXZL9l/CimUWQciD92s=; b=KcH/DCXH0v1SM+yruW0KCDSmky8T1P11lbQNNXceh7BrncWTGR6CiYapAy270aZyQw bxLHGjhNs0COXGmB5Pyu431vAOFmU3Zyc8uDmL0w7L4KmuJG95fjsHoAkOkVpGMIWpX1 DBwGgVbntwdL//92x/R0J3YoH6z3Q/rq1MmRl5sgU2jDgTdt9X0T0WMXoMApOkH9NS7d SqYhXQbSwyolIjpGDpD9WJlq5gVVGsryyobmf3SVxhHCKGOb8/f/QkcoDiwNCx34jg2D 7R8tOOtci0Xaq2dyZTultf2X2V5wCKhtaDQUlij0Ubz4WvzFshHZ0XeXfe83ngOOCVHT ZbuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713278934; x=1713883734; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dkC9HeIhznIftL0Ye+AK9W/2NXZL9l/CimUWQciD92s=; b=CrXANxwQlYj5wqzw/vTOS7bkMmuOfbYjEHldQYfo/JhLQ9DGvvppIs/xjeyuQsgRXK 4jfDEhJOm2dWqOZs7DbvUCkHtPuwktcRDSoeldP8aKAUsKWQtGHbqca5NbMkYqI7QJwK Sm0BDszuOckgH6/be0EjM4XsVpBCEf7tPIowL3clJgdU7R5DcpD+aLP9MS0ZOrlLetqu VoNifk1s/2NqrHAVE/U2V+KwCAOXyS/6h8IHgKnW/+wZ2IqUrwLxuva4jEVpxN9LrBkc /ZNa+i9YUmr9N2vKKi5PNcrnLpUaQeo76/V0gUrH8JCoQadXB2CjOe0SVmJ1C552nZ8P 8lgw== X-Forwarded-Encrypted: i=1; AJvYcCU6OPqKYKh5dm9oUFsgr2ap+0IlcOM6RZ/Acw+lClNqmCCbFAHil6SDiG3H3/nbvUy6Llj/LXYcQ8t2dKQkbLVtV4QhK/d+A/d74277 X-Gm-Message-State: AOJu0YyZC0e5kCd/jRNlq1Bk+66VCGKowhjzmN+Gs7B2VIh8TG4bDPsF FhokBByn6X7zZ8VA6inssM/KL5n3ErHFI2bgsbl0pgPc3eeunYw9Urmz+ZzixQ+vIipiPyAlVfs KZA0yqAeDBpKV+OrGfTUEms8NrQF0NAw9qv1Ffw== X-Received: by 2002:a25:2742:0:b0:dc7:5a17:6c3 with SMTP id n63-20020a252742000000b00dc75a1706c3mr11773509ybn.53.1713278933771; Tue, 16 Apr 2024 07:48:53 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240416-ucsi-glink-altmode-v1-0-890db00877ac@linaro.org> <20240416-ucsi-glink-altmode-v1-2-890db00877ac@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Tue, 16 Apr 2024 17:48:42 +0300 Message-ID: Subject: Re: [PATCH 2/8] usb: typec: altmode: add low level altmode configuration helper To: Konrad Dybcio 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 Content-Type: text/plain; charset="UTF-8" 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). -- With best wishes Dmitry