Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2173951imc; Tue, 12 Mar 2019 08:26:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJnnL7u3PAV1jm99cdnhQQMuvvbZwLDGJXRIF9c4QrrWrMDCHqI4Mak/7r3XMoT9r6lMHk X-Received: by 2002:a63:ed0b:: with SMTP id d11mr35331039pgi.435.1552404377882; Tue, 12 Mar 2019 08:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552404377; cv=none; d=google.com; s=arc-20160816; b=FfEA5SzLOcuijPtmZujgaXFFd8BVa6+N3vNpaTeMCTgpRuPwnmdNJ5XO1Of4WElf7z ONFvvGPhyQkaA2Iwv2z3Jbb4MyIZB3XEqqoRQsKoWCXhK++jMl/PUuncE45zq031Tcjp 6Py15zJ4eM5a26yT4+qK4cVk6gWYRR1eH0Ffpqfrh4I24IVDudbAcb67WTrY9dJaaksP NNx3OmPJgI/ZgGkGdDzm10Ws+ifUYxK13SqBQeHlQwapezDJnB84AmooDRTlgJ8H3cXK zrGJRuOoiOdvPFWJ6AIKbS5Q4VaLeJjRfoep4uWjEyYZTWmg9wwWyYoXJgMFBK6pNzF+ /nRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YtaJ9x8sYN10MYrP9ppuxiz1StD6MzfGIzIWexmRM3k=; b=vzBSGPyIz0BcIQy1epLxvJefPQt02ziP3syerONqfuNpIp+Tr532OYAEKL8VOhIGFg U+F9tbpZmRYToFy7BDKQMIEHzYCKba03DFO+AgItgBYT648yTWPuBDUyA5IQ5TfMv9a8 MRl2IFrKb1IwW3YK4VdOGL6uZHlMn3MFYx8aQJWvkfOVV7YYaIGWAzTtmBE+8PwsNJt8 J1vMmGsBOqzv0yc+LDf8lSR92uJ4/H4h0py/MXavVd+Vh7jXpiwQZ0ugv2dfm/Opd4Lp F7kkx8SlYjVWcJWIfgwEDo2l0VlZqfIei1QI239BJMMFXMILw9P4XOt7McYKWW2ygion hoGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=baBlAhgr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si8327551pln.21.2019.03.12.08.26.01; Tue, 12 Mar 2019 08:26:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=baBlAhgr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726629AbfCLPZA (ORCPT + 99 others); Tue, 12 Mar 2019 11:25:00 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:3604 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbfCLPY7 (ORCPT ); Tue, 12 Mar 2019 11:24:59 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 12 Mar 2019 08:25:00 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 12 Mar 2019 08:24:58 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 12 Mar 2019 08:24:58 -0700 Received: from [10.21.132.148] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 12 Mar 2019 15:24:57 +0000 Subject: Re: [PATCH] dmaengine: tegra210-adma: use devm_clk_*() helpers To: Sameer Pujar , , CC: , , , References: <1552401352-30043-1-git-send-email-spujar@nvidia.com> From: Jon Hunter Message-ID: <7598abfe-ae1a-61d2-e4d2-c95dc78c9697@nvidia.com> Date: Tue, 12 Mar 2019 15:24:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <1552401352-30043-1-git-send-email-spujar@nvidia.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1552404300; bh=YtaJ9x8sYN10MYrP9ppuxiz1StD6MzfGIzIWexmRM3k=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=baBlAhgr5FPyRZ4fM4ZFFM1S0+rlM5XbJDk3WvkcftwpBtCrR/e0ZOILnUstFJC9A pCtZN5ocjItLNj7hlIMllA9HFcXIklrvnERWbYsmZVi40uO+2k+KmeI087rMJQ/QuD FrFF856pD/+jhQv+jdHLdlHo8845D3dxQYC6HPadmoY10HQsV5lv20XaTdKKgL9r9d fuAc0VtrcLbxE11SbsDxFvborwA9yd+hxX6A56ue6JrIOkqYycSYDHpNazcnLPVW5c TwEWm+DMMI8hBake6q3wlRBDGd2J/cXMiZjWXzg872UIjYxv1OsCi46h0Fvy5llHX1 oLrJOM/eUT10A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/03/2019 14:35, Sameer Pujar wrote: > Usage of pm_clk_*() results in non-zero prepare_count for clocks and hence > module clocks remain ON always. This is not desired as it will leak power > unncessarily. This patch replaces pm_clk_*() with devm_clk_*() interface. Technically, this is not true for all devices. The actual problem here is that for some Tegra devices that use the BPMP co-processor to manage clocks, the clock are actually enabled during the prepare-phase and hence when using the pm-clocks framework they are never disabled for these devices. However, this is not the case for Tegra210 which does not use the BPMP for managing clocks. It maybe worth highlighting the fact the BPMP has to enable clocks during the prepare phase because calls to the BPMP are always blocking. > This helps to keep refcounts balanced when device is not in use and runtime > PM callbacks help to enable or disable clocks. System suspend/resume calls > can use pm_runtime_force_suspend/resume. I think that this last bit should be a separate patch as it has nothing to do with the $subject. Cheers Jon -- nvpublic