Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756916AbbKRUej (ORCPT ); Wed, 18 Nov 2015 15:34:39 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58719 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756842AbbKRUeg (ORCPT ); Wed, 18 Nov 2015 15:34:36 -0500 Date: Wed, 18 Nov 2015 12:34:33 -0800 From: Stephen Boyd To: Geert Uytterhoeven Cc: Stefan Kristiansson , "devicetree@vger.kernel.org" , Michael Turquette , Pantelis Antoniou , linux-clk , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] clk: add generic driver for fixed rate clock Message-ID: <20151118203433.GE32672@codeaurora.org> References: <1378010420-20031-1-git-send-email-stefan.kristiansson@saunalahti.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1702 Lines: 40 On 11/17, Geert Uytterhoeven wrote: > Hi Stefan, > > (quoting the full driver, as it predates linux-clk) > > On Sun, Sep 1, 2013 at 6:40 AM, Stefan Kristiansson > wrote: > > This adds a simple driver with the only purpose to initialise > > the fixed rate clock. > > This is useful for systems that do not wish to use seperate init > > code for the fixed rate clock init, but rather only rely on a > > device tree description of it. > > > > Signed-off-by: Stefan Kristiansson > > Thanks, this is still very useful! > > I stumbled across this old patch while trying to instantiate a fixed rate > clock from a DT overlay. > Without this, the clock is never instantiated, as drivers/clk/clk-fixed-rate.c > uses CLK_OF_DECLARE() :-( With your driver, it works as expected > (after fixing the modpost complaint, cfr. below). > > However, I think that instead of creating a new driver, you should just add > the meat of clk-generic-fixed.c to clk-fixed-rate.c. Hm... what happens when of_clk_init() runs and instantiates the clock, and then of_platform_populate() runs and creates the clock again? The platform device probe fails because the framework checks to make sure two clocks don't have the same name? I guess that's going to work, but it doesn't make me feel good. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/