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: 3119101 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ED4AEBF924 for ; Thu, 31 Oct 2013 06:51:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2583B201F9 for ; Thu, 31 Oct 2013 06:51:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E200201F4 for ; Thu, 31 Oct 2013 06:51:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752940Ab3JaGv1 (ORCPT ); Thu, 31 Oct 2013 02:51:27 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:44480 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752156Ab3JaGuP (ORCPT ); Thu, 31 Oct 2013 02:50:15 -0400 Received: by mail-pa0-f42.google.com with SMTP id kp14so2087899pab.29 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=dlZbhEwupOE5cz7Kn5Hmvq6sxDyojNK2yrNrhEcZlZemdkXstndv8p3J97aCYbWr0X gjkrXwkwaKEBQ4NHkY3cYrzax7LgYBmXMQXCPcGMBNrfyBpQfyUR1TOAiecrqOQ/QNDL S21LSAUhiBiC8DFoMM3O8Qk4wdIMUHrRKPmV1kV3kXivFY0LGjLX5UX/k08M01ljViF4 E6H41TsYVVmClpisfqAs31q5kZ/oPfrWGlLtRRGdEWcJWhXWDTw9PWc6aHDnZa0xJzSY +5yv+cGBTh4qIEFZleIgJcQB1yCIcU+yXlP+Rz0MH4HhMf1Aeii2csn72dL+qJP16mvV oF5A== X-Gm-Message-State: ALoCoQnM3lBcePwKd6jrYVIfyiVv0vErY9lWpC5uR1lT7h2TdcVKap2Z/liM9G6A2p0j+GpLZ/4A 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 Cc: mturquette@linaro.org, lee.jones@linaro.org, kgene.kim@samsung.com, patches@linaro.org, Yadwinder Singh Brar 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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);