From patchwork Thu Oct 31 06:48:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 3119111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 289F29F3E3 for ; Thu, 31 Oct 2013 06:51:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0E564203E6 for ; Thu, 31 Oct 2013 06:51:57 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0CB75203DF for ; Thu, 31 Oct 2013 06:51:56 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vbm5z-0000vC-GI; Thu, 31 Oct 2013 06:51:07 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vbm5o-0000S3-Qq; Thu, 31 Oct 2013 06:50:56 +0000 Received: from mail-pa0-f42.google.com ([209.85.220.42]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vbm5U-0000OL-Qw for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2013 06:50:38 +0000 Received: by mail-pa0-f42.google.com with SMTP id kp14so2096190pab.1 for ; Wed, 30 Oct 2013 23:50:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9xQ0BXelsoykMrFY6C8OO86CFrnJy72jA6aDO+OOqUs=; b=XIhAP+dU5u50BzhvDCw08QzO8VEmAgWwllvHPRfO+WDqbbunLObn68JiBMLyGVzGML S7thjLziefOVdixMHZ1Mgd7tHki15kH1cFNS036QRmJap3ohfbsayISLB3C5dpYKVcx3 t1PfAI3Gbtz/Er3kktkbjPFu0IXUBYFGEd44LhCr5YBu2apwU/GAEqFg5bSizE2xSIul ly+rfH1Yd2flnCik1CbA7JOyMqRPIlMCLHMSvjoMvPpZldylUR+2ljIHusx4ycfK5dGS CRvhqqZlTdC+3UrzbM/YjmgrawMu/5KfreyEhTfC0jV7vEOitgCcS36KaPBLoPsGJ5ea 3Pvw== X-Gm-Message-State: ALoCoQm0ZqsO0cISeH7GmtFnqjEoIoJSo6hvAL+4T4Ko2+Zlb+M1rEVoO4lpavYsYY3i1tW9S6+x X-Received: by 10.66.191.162 with SMTP id gz2mr228497pac.151.1383202215359; Wed, 30 Oct 2013 23:50:15 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id qw8sm1880915pbb.27.2013.10.30.23.50.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 23:50:14 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD Date: Thu, 31 Oct 2013 12:18:42 +0530 Message-Id: <1383202124-1775-3-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1383202124-1775-1-git-send-email-tushar.behera@linaro.org> References: <1383202124-1775-1-git-send-email-tushar.behera@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131031_025036_989895_57A525B2 X-CRM114-Status: GOOD ( 12.59 ) X-Spam-Score: -2.6 (--) Cc: lee.jones@linaro.org, Yadwinder Singh Brar , kgene.kim@samsung.com, mturquette@linaro.org, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since clock operation within S2MPS11 and S5M8767 are similar, we can support both the devices within a single driver. Signed-off-by: Tushar Behera CC: Yadwinder Singh Brar CC: Mike Turquette Reviewed-by: Yadwinder Singh Brar --- drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 5c51115..7f2aef2 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -65,10 +65,12 @@ config COMMON_CLK_SI5351 generators. config COMMON_CLK_S2MPS11 - tristate "Clock driver for S2MPS11 MFD" + tristate "Clock driver for S2MPS11/S5M8767 MFD" depends on MFD_SEC_CORE ---help--- - This driver supports S2MPS11 crystal oscillator clock. + This driver supports S2MPS11/S5M8767 crystal oscillator clock. These + multi-function devices have 3 fixed-rate oscillators, clocked at + 32KHz each. config CLK_TWL6040 tristate "External McPDM functional clock from twl6040" diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 2262cb4..19c075c 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #define s2mps11_name(a) (a->hw.init->name) @@ -175,6 +176,9 @@ static int s2mps11_clk_probe(struct platform_device *pdev) case S2MPS11X: s2mps11_reg = S2MPS11_REG_RTC_CTRL; break; + case S5M8767X: + s2mps11_reg = S5M8767_REG_CTRL1; + break; default: dev_err(&pdev->dev, "Invalid device type\n"); return -EINVAL; @@ -254,6 +258,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) static const struct platform_device_id s2mps11_clk_id[] = { { "s2mps11-clk", S2MPS11X}, + { "s5m8767-clk", S5M8767X}, { }, }; MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);