From patchwork Wed Feb 19 06:24:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 3678771 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 1374EBF13A for ; Wed, 19 Feb 2014 06:31:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 355EE20165 for ; Wed, 19 Feb 2014 06:31:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D6EF20142 for ; Wed, 19 Feb 2014 06:31:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751340AbaBSGac (ORCPT ); Wed, 19 Feb 2014 01:30:32 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:52526 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751698AbaBSGaP (ORCPT ); Wed, 19 Feb 2014 01:30:15 -0500 Received: by mail-pd0-f173.google.com with SMTP id y10so17195901pdj.4 for ; Tue, 18 Feb 2014 22:30:15 -0800 (PST) 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=IQinjWMpvMffJXMohO+/ZrutTxCZFoM5YIHwKpZev+o=; b=Pg8AcTBHSgw1jLNGte7nqyPVdRQlzOapQ/5wiWTB4TR02cF4v7GvxeoXxlzVr7D/0S 77SBkegtEbGZOZ5qF6Fq34jjziWrqzQHb2RucW4SzHdZ1cB/1NRRSsbJGeRqso3W856K k+p5LPSyEWT4FhppnB+frlQebUGqU/NCNUe9kgtMZRsztqJzwZ9j/tT/34REH9VSeECx xi13enffiD+4PfWzh70dSx2lep2TpHK1IXBgiD4j2j+1n1s/36+i/bIPWHPz/DUqQigg SYTkrEc1QzZowlO5nHq+KMsk1GeuY1pWyi/P1pfN/WT1ZsNrLbYoQjcm+l7Pxl6Knvgr qrtQ== X-Gm-Message-State: ALoCoQkOO51L5B0GA7gKHX2JxgyBfmfAGKmuiDijeDj1qIUj6qPGO3jgwd24EKvI9lplv+p1LlMN X-Received: by 10.67.14.231 with SMTP id fj7mr177134pad.115.1392791415277; Tue, 18 Feb 2014 22:30:15 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id yd4sm62135719pbc.13.2014.02.18.22.30.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 22:30:14 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: mturquette@linaro.org Subject: [PATCH RESEND 2/2] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD Date: Wed, 19 Feb 2014 11:54:36 +0530 Message-Id: <1392791076-28301-3-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392791076-28301-1-git-send-email-tushar.behera@linaro.org> References: <1392791076-28301-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.5 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 Reviewed-by: Tomasz Figa 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 7641965..da1b416 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -65,10 +65,12 @@ config COMMON_CLK_SI570 clock 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 6f587bc..5088755 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);