From patchwork Thu Aug 11 11:30:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 9275115 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5EECD60780 for ; Thu, 11 Aug 2016 11:31:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FBFC285E9 for ; Thu, 11 Aug 2016 11:31:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4404B28614; Thu, 11 Aug 2016 11:31:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E33C9285E9 for ; Thu, 11 Aug 2016 11:31:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932252AbcHKLbH (ORCPT ); Thu, 11 Aug 2016 07:31:07 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:55370 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932245AbcHKLbH (ORCPT ); Thu, 11 Aug 2016 07:31:07 -0400 Received: from debutante.sirena.org.uk ([2a01:348:6:8808:fab::3] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bXoCN-0002HI-FW; Thu, 11 Aug 2016 11:30:58 +0000 Received: from broonie by debutante with local (Exim 4.87) (envelope-from ) id 1bXoCK-0003yd-3T; Thu, 11 Aug 2016 12:30:52 +0100 From: Mark Brown To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, Pierre-Louis Bossart , Mark Brown Date: Thu, 11 Aug 2016 12:30:49 +0100 Message-Id: <1470915049-15249-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.8.1 X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: [PATCH] clk: Make clock framework user selectable X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some architectures like x86 don't use the clock API in architecture code but one of the advantages of the common clock API is that it can be used by regular devices to represent their clocking structures so we should allow users to enable the clock API themselves even if the architecture doesn't need it. This is more straightforward than going round every architecture and convincing their maintainers to add the select. Unfortunately some architectures do still provide a custom implementation of the clock API which is incompatible with common clock. Provide a config option HAS_CUSTOM_CLK which these architectures can select in order to prevent COMMON_CLK being enabled. Signed-off-by: Mark Brown --- drivers/clk/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index e2d9bd760c84..08a0b2cd49c6 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -7,7 +7,8 @@ config HAVE_CLK_PREPARE bool config COMMON_CLK - bool + bool "Common Clock Framework Support" + depends on !HAVE_CUSTOM_CLK select HAVE_CLK_PREPARE select CLKDEV_LOOKUP select SRCU @@ -19,6 +20,9 @@ config COMMON_CLK Architectures utilizing the common struct clk should select this option. +config HAVE_CUSTOM_CLK + bool + menu "Common Clock Framework" depends on COMMON_CLK