From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936606AbcIGL34 (ORCPT ); Wed, 7 Sep 2016 07:29:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34892 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932245AbcIGL3z (ORCPT ); Wed, 7 Sep 2016 07:29:55 -0400 Subject: Re: [PATCH] simplefb: Disable and release clocks and regulators in destroy callback To: Geert Uytterhoeven , Chen-Yu Tsai References: <20160907090919.27187-1-wens@csie.org> Cc: Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Linux Fbdev development list , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" From: Hans de Goede Message-ID: Date: Wed, 7 Sep 2016 13:29:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 07 Sep 2016 11:29:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 07-09-16 13:12, Geert Uytterhoeven wrote: > On Wed, Sep 7, 2016 at 11:09 AM, Chen-Yu Tsai wrote: >> simplefb gets unregister when a proper framebuffer driver comes in and >> kicks it out. However the claimed clocks and regulators stay enabled >> as they are only released in the platform device remove function, which >> in theory would never get called. >> >> Move the clock/regulator cleanup into the framebuffer destroy callback, >> which gets called as part of the framebuffer unregister process. > > Is this called before or after the new proper framebuffer driver kicks in? > If before, it may cause glitches. It is called by the new proper framebuffer driver's probe method, so it can make sure that it has already claimed / enabled the clocks/regulators before it calls remove_conlicting_framebuffers, avoiding the glitch. Regards, Hans