From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932497AbcBJDKx (ORCPT ); Tue, 9 Feb 2016 22:10:53 -0500 Received: from yotta.elopez.com.ar ([185.83.216.59]:36482 "EHLO yotta.elopez.com.ar" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932069AbcBJDKv (ORCPT ); Tue, 9 Feb 2016 22:10:51 -0500 X-Greylist: delayed 852 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Feb 2016 22:10:51 EST Subject: Re: [PATCH] clk: clk_register: Correctly initialize enable_count To: Rhyland Klein , Michael Turquette , Stephen Boyd References: <1455058120-7398-1-git-send-email-rklein@nvidia.com> Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org From: =?UTF-8?Q?Emilio_L=c3=b3pez?= X-Enigmail-Draft-Status: N1110 Message-ID: <56BAA6D9.9090009@elopez.com.ar> Date: Tue, 9 Feb 2016 23:56:25 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1455058120-7398-1-git-send-email-rklein@nvidia.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, El 09/02/16 a las 19:48, Rhyland Klein escribió: > When clocks are registered, they could be enabled already in > hardware. As of now, the enable count will start at 0. When this > happens, it means a clock is enabled and the framework doesn't know > that, so it will always report it as disabled. Keep in mind that during the boot process, towards the end, unused clocks get disabled, so the state remains in sync. If suddenly the enable_count on unused clocks is not 0, this will break and unused clocks will remain on, wasting power. http://lxr.free-electrons.com/source/drivers/clk/clk.c#L244 What issue were you having that prompted you to write this patch? Cheers, Emilio