Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 1D80E2C83 for ; Wed, 6 Oct 2021 22:03:28 +0000 (UTC) Received: by mail-lf1-f41.google.com with SMTP id y23so16569093lfb.0 for ; Wed, 06 Oct 2021 15:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ocF1Zd1GgargbSRFkTmMQuOw5z6Jk+7ep3c3eIOkpY0=; b=ifXynuue/W+cts8xYAzQAjPsqjJAD3xm4bF5WPNBP3JdeZZeTkuHZ6o05Wga1mAEPW uZBGIlccZgW7Zx08VO5j7forCX1vkPQvvoGq55QfThNxZroKaf7wt+EiygR38dICdv6x rroUayAcRJedS+qeeYmhsWhHm9O8SGdiRISMqWg3sIqmtQtasrIDTGpy16tLvBqOnPdS 7VFt0DzOxk9oISnLMP0hp7pLoAYRpd/mP7Y5dJB/Ou/2xDx40RzvKuKuN/+zcyw8MIYR 7Kez1XrR98p/rr4uEPM0EsltzlzBLHnnhIfQ1lPQ+eKwuV1vbQZ+k+eIoHRBG6pJrLDt WmfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ocF1Zd1GgargbSRFkTmMQuOw5z6Jk+7ep3c3eIOkpY0=; b=PuD3iweGVPz4rP/BN4wjMR+EywIl1+/TW2ctH1lvlSRqSFy5eRZW0e7/OmmysgWcsY /Hsjn3X2bZLL79z6YkztLyWQYbI5PMGcgn1KZbBAG9k9mFTCsb4OMyrBewHP7gErPJJw maGzNfVxpN8ygTLVweQsgRAHWQuxNgIVmIG5PYUW2QSmO29nbpSsFBRPjcugzY2MteXd I3I2ACzGmDSUB2nNvnHK8izSkGqgSjJKO44HdQTxjkNLaTqPWer2C7B9WcOYnTrf5EK/ z/wf+WwRcDVaNG6W3YjB/TgIkhTj05UPIPqSgJQrQK0voETgHNiuU3ntsm3gkJyNrydk BnCg== X-Gm-Message-State: AOAM531hncfljpPRHfb2rkxJZP7h8TjHfo2rca1c0gcfjmA+G6KSatCO VIJ1OUZHMtZwhg4j3r6zVgE= X-Google-Smtp-Source: ABdhPJzzU4Kir/q2zSrh7VeOqOd6EwnvXqJt373WnDkIWpzjoqXokHPpHUyjZ+sXTNvD05zQT1QiYQ== X-Received: by 2002:a05:651c:169c:: with SMTP id bd28mr586938ljb.476.1633557806201; Wed, 06 Oct 2021 15:03:26 -0700 (PDT) Received: from [192.168.2.145] (79-139-163-57.dynamic.spd-mgts.ru. [79.139.163.57]) by smtp.googlemail.com with ESMTPSA id d7sm2600461lfa.80.2021.10.06.15.03.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 15:03:25 -0700 (PDT) Subject: Re: [PATCH v13 06/35] clk: tegra: Support runtime PM and power domain To: Ulf Hansson Cc: Thierry Reding , Jonathan Hunter , Viresh Kumar , Stephen Boyd , Peter De Schrijver , Mikko Perttunen , Peter Chen , Lee Jones , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Nishanth Menon , Adrian Hunter , Michael Turquette , Linux Kernel Mailing List , linux-tegra , Linux PM , Linux USB List , linux-staging@lists.linux.dev, linux-pwm@vger.kernel.org, linux-mmc , dri-devel , DTML , linux-clk , Mark Brown , Vignesh Raghavendra , Richard Weinberger , Miquel Raynal , Lucas Stach , Stefan Agner , Mauro Carvalho Chehab , David Heidelberg References: <20210926224058.1252-1-digetx@gmail.com> <20210926224058.1252-7-digetx@gmail.com> <24101cd6-d3f5-1e74-db39-145ecd30418b@gmail.com> <4bdba8a2-4b9b-ed7d-e6ca-9218d8200a85@gmail.com> From: Dmitry Osipenko Message-ID: <5dfe7463-7a92-59c5-3ba6-57d31fc5833c@gmail.com> Date: Thu, 7 Oct 2021 01:03:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 06.10.2021 15:38, Ulf Hansson пишет: >>> Right, so the PM domain managed in tegra_genpd_power_on|off() can >>> still be powered on/off, as long as the clock remains ungated? >> Not ungated, but prepared. > Okay, thanks for clarifying! > > In summary, it sounds like you should be able to fix this problem in > the I2C driver as I suggested above. If that works, that seems much > better. I'll try this variant, thank you. > Moreover, it would leave the clocks gated/unprepared when the system > is fully suspended, which I guess is better from an energy point of > view? The clocks are kept gated, it wasn't a problem. The problem was that clocks were needed to be enabled temporarily. In order to enable a clock, it needs to be prepared first. When clock is prepared, it resumes clock's device RPM. Keeping clocks prepared shouldn't make a noticeable difference from the energy POV since clocks are gated. It's only voltage that is kept high, but we need to keep it high during suspend anyways in order to resume successfully. The hardware is mostly gated during suspend, depending on suspend mode, so the power consumption difference is negligible. At least I haven't seen any problems, battery doesn't drain during suspend.