Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp168756lqe; Thu, 4 Apr 2024 03:14:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMTCliVBo/G+vxxgsfOQKmhCV2XT+tNWWVtx846kIZ//4V7HOkKdNAXxFBH6Dt9Z6MVX8Kl+dMuTuhtc7pXUhksD+naUA03pJBmuuAWg== X-Google-Smtp-Source: AGHT+IGlT1zE/SfWljThByJEGGT/Svr7SBeXa7l1HF3KHkC85waGG8OnrlKGx/VT6C+RJmnZ885S X-Received: by 2002:a17:90a:43c5:b0:29b:2268:3349 with SMTP id r63-20020a17090a43c500b0029b22683349mr1898474pjg.18.1712225643664; Thu, 04 Apr 2024 03:14:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712225643; cv=pass; d=google.com; s=arc-20160816; b=U2f4Bq0Am/qQ9esbpqgxcObI9u6kdQnVJ/2u3rnHn5tqDCkDkS0OwFR/HMAKnld3kl rbaGDFjXaSwq1KUAaj+dqy5HCZZRQ25aGwrsgptsm4xJ71JzVbiJqEKANkWmKA9Cr8ug 1OFW2/dXHgozOme4rMmelnOp8mW7swWQ+B6wTVpu4mqiJQpBln92lFDp/YYm8kwZ2qK5 HerfgNd+uUtPZQQVH9h1N/KV2GcyvsJKO2m2mWMIBNSeKB7o8F612qyq/6AWohCMpHSx c0mADc+ZOyhd0i41Ki2dgHUk3Q0Lbqdlo2OwS6Uh2Re8Eyy/+jwMIa8JLo6VkyKKBjn1 Lu7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=WSM3SSSDRISKG2xzZd8Db84CV8c+qWu1nf3t0po6PQs=; fh=I2smyA2Ua9jJjN+hCBtYAEXAx//X1f6ATLyPjiMOKEM=; b=ZGjMVBvlaFl3IFKwiIG/OZg1ADNNJ9RE1A/BML9XnJbPz2KlZVks8wKPAv2fSBvNJx H6635bc7Zv7Za9DC6qOpf3qJ7KekK55qE5Kvd++rrPMQgvojiQChF2sFGN3nmObsk3G8 A4pbYcr+Z22o7UUoa+VTsrZiCUFoUIDjKlcsu1FwUgJRFqMj5Kv2ltTZxVQv31O5bEuq mzgiAfSP7mDsIKN1aPW7qkMm8usn/sTFWuBn/Il6F/7QGxHxAFrqoFhrEHCPABeld1aP k2nDM+CkWvSGUHIJx2XDsbd3Dqyu1KDliKebm45mJo7GLwTBtc8s71T1s17ksvIz8fzB CzTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LvLnljlt; 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-131211-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131211-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id oc5-20020a17090b1c0500b002a2e5c53ef1si513517pjb.141.2024.04.04.03.14.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:14:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131211-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LvLnljlt; 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-131211-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131211-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 53F88B236AC for ; Thu, 4 Apr 2024 10:03:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BBAD75816; Thu, 4 Apr 2024 10:03:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LvLnljlt" Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (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 D185274E10 for ; Thu, 4 Apr 2024 10:02:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712224979; cv=none; b=J+A3UaMDDgmI3UsemUxi2kxcPR9534CtK25J4SW9nDLb8MMLbGwQo1Z96gfLeEVUKOjFmlUD7K1IE92h4hHNHyKFtEr984i3Hz4d4wONw3RqUg3uWD9r0y+3BRSbErqtgZy00jJC7t2Y/+tf1+oHiMvxFIs2yzdtxUFD9c+naWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712224979; c=relaxed/simple; bh=GjQ6i597e+Tg5kZEZuOxHNpqIK+6JUo1PoPMIlQjjss=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Mk4ONpAvgF2rdE19Njpmr2OSPiEPzRkSLhcWntjDGBlav1lWpKY9rECYX1hMMSCSTQmsMDfuhGkCfw+nFO8yG6eqwm/nWuiTNXlKH7g7wIpk//bVqUi9SBTbudqBvDs3fwsFqKc0I56iqtJbHKcVsLXi7mMEy4hCxVYYHFGFiLI= 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=LvLnljlt; arc=none smtp.client-ip=209.85.219.173 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-f173.google.com with SMTP id 3f1490d57ef6-dbed0710c74so747321276.1 for ; Thu, 04 Apr 2024 03:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712224977; x=1712829777; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WSM3SSSDRISKG2xzZd8Db84CV8c+qWu1nf3t0po6PQs=; b=LvLnljlt5unQGgxgL7KbB19HHX5HApqdiAJs2lZNm61Fi/nwRSPmV2MU0JaoHarWIt KJr3XthYcUoQQjzTlDvqS2lhH+iUK9Gxv86VbUvANtvYy9Zc2yn6/wclct5DJ0814Hdx AWJQOOWFlCZvsOoOfmL1Ow35LdtmFcrgRvF+AWGtxDbMOn6KMV6Fw2VNLobAt66kcMeE 39kiLMQXPWGK35gJjSv3aZo9CQVoC9lBw8xaMHC0Buw1KVgGlFxjvbNDirVy+StLjdZ1 pUMKbG2onmgBk9sK0njjQAHjF/fvkZcTE0eK83SWNjFpvLfrshL5zTgaCi0SR7hrKrdv oQAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712224977; x=1712829777; h=content-transfer-encoding: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=WSM3SSSDRISKG2xzZd8Db84CV8c+qWu1nf3t0po6PQs=; b=ogV5qBI/+DwMQe+8PTOJddY5cWny3KPwT3/r030TZXAeRStgFwKTnoyISZGj+a7R9F 0yzzslSHwjZoTv/ker1gzo6ZzL8uQs73rl6rkFJOatqMSYz1AGLV25EQEcuTlaH4THXQ XoZPCE7Btf5M4SY7MbmY7OEF2YRqeF8i1FmudHTQ6sut01POqqzRObeJPQu4ja9/pJGQ UZ8N2MKL3WQs2ZP0CKlG7hny7Y+qeL6SR8dbnySzv7NFPtml8/8N7rSxrYT27ZNjHmZZ owmqz3gWiBRGrLli7INPXk4sXdrUIW0G+vJBD24fOPqr6wdhnrNEQqAd/g6QDYXZnQTP GIbw== X-Forwarded-Encrypted: i=1; AJvYcCV8oUy5+yN8vIoQ20yz5grw0g42iXyELxBDSglldsdde1o6Flx2bZoe81KAW45fjm8O0H5V/EU4BdyO/k7jKqOF47FhLy/Q1Hfka6c8 X-Gm-Message-State: AOJu0YyHtNi1pDdGoOC3Yt5rgGhQn/fscLHOT9t2Wt79aPSfqPwZIzvZ stDmelXA/HDEmNRICanrLx90kbUd9N+knc5j3R+fN+fgo79HiQRuEgxtgP9CrQWgKpk4Cm91/7L PhMKLPTDHgcn1qSQeo0omcuQYlCaj5aCsjGflYA== X-Received: by 2002:a25:1e54:0:b0:dc6:ff6b:71b2 with SMTP id e81-20020a251e54000000b00dc6ff6b71b2mr1790403ybe.4.1712224976606; Thu, 04 Apr 2024 03:02:56 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240327055732.28198-1-yu-chang.lee@mediatek.com> <20240327055732.28198-3-yu-chang.lee@mediatek.com> <6dd9959e-f741-47af-b10a-1894f72ae78f@linaro.org> <7ff9c4c7-3b56-4a5b-95b7-c37cbf8bcd6d@linaro.org> <038ccb20-71cb-40d2-9720-ce1a0d3eac8c@linaro.org> <7f24ca2806a7199e4de6fad17b8dc1f127c82180.camel@mediatek.com> <3b04c5344435cdb941b5d132e8f5fbfdf9188d67.camel@mediatek.com> In-Reply-To: <3b04c5344435cdb941b5d132e8f5fbfdf9188d67.camel@mediatek.com> From: Ulf Hansson Date: Thu, 4 Apr 2024 12:02:20 +0200 Message-ID: Subject: Re: [PATCH v2 2/3] dt-bindings: power: Add mediatek larb definition To: =?UTF-8?B?WXUtY2hhbmcgTGVlICjmnY7nprnnkosp?= Cc: "amergnat@baylibre.com" , "krzysztof.kozlowski@linaro.org" , "linux-mediatek@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-pm@vger.kernel.org" , =?UTF-8?B?TWFuZHlKSCBMaXUgKOWKieS6uuWDlik=?= , "conor+dt@kernel.org" , Project_Global_Chrome_Upstream_Group , "robh@kernel.org" , =?UTF-8?B?WGl1ZmVuZyBMaSAo5p2O56eA5bOwKQ==?= , "linux-arm-kernel@lists.infradead.org" , "krzysztof.kozlowski+dt@linaro.org" , "matthias.bgg@gmail.com" , =?UTF-8?B?RmFuIENoZW4gKOmZs+WHoSk=?= , "angelogioacchino.delregno@collabora.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 28 Mar 2024 at 07:06, Yu-chang Lee (=E6=9D=8E=E7=A6=B9=E7=92=8B) wrote: > > On Wed, 2024-03-27 at 12:55 +0100, Alexandre Mergnat wrote: > > > > External email : Please do not click links or open attachments until > > you have verified the sender or the content. > > Hello Yu-chang Lee, > > > > SMI LARB must have a power domain, according to "mediatek,smi- > > larb.yaml" > > Now you try to create a link from power domain to larb. > > > > Here is my understanding: when you enable/disable power domain, the > > larb linked to this power domain may have an issue. Then you want to > > retrieve de LARB linked to the power domain though the dts to manage > > the LARB. > > Yes, this is what I am trying to do. > > > IMHO, using the dts to have this information into the power > > driver isn't necessary and may introduce some bugs if the LARB node > > and power node in the DTS aren't aligned. > > > > It seems not implemented today but during the LARB probe, it should > > "subscribe" to the linked power domain. Then, when the power domain > > status is changing, it is able to "notify" (callback) the LARB, then > > implement the good stuff to handle this power domain status change > > into LARB driver. > > > > The problem with this method and why "smi clamp" is in power domain > driver is that our HW designer gave us a programming guide strictly > states the sequence of what we need to do to power on/off power domain. > Using callback, this sequence is no longer guaranteed and the side > effect is unknown... In most cases, using the runtime PM callbacks in the consumer driver (LARB driver) is sufficient to deal with resets. For some special cases drivers are making use of the genpd on/off notifiers (GENPD_NOTIFY_*), as they really need to know when their devices have been power collapsed. Have you tried both these options? [...] Kind regards Uffe