From patchwork Thu Dec 26 10:18:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 22749 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F19F0218E7 for ; Thu, 26 Dec 2013 10:22:40 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf35937348obb.10 for ; Thu, 26 Dec 2013 02:22:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=ckrBtc2t4BFuwVCVZjhbHMA6og4wEjcRUswGUdb5bXU=; b=j2iPRjEt3hgyg5+exPq5n9JuOoFHaNLJj1Q2DU68HfzWAbzo5ecw2jD2QzrSiGH3P5 GYX7cvtzP3/1s3vVr3jzSL3Lmzs5mJWoB8kOnLU/N6rnS+gQ8VWxYpXM8Uxph6DnZcS4 fJld5ZhyVXDFSKBrkQoJbIDCg6OMRB4//fSol8/X63OVtZtR2IJaOBGV1h9kujaXZ9JH CaLKDfwubVHieP37hMxa8mf1SCRFJ0Pwbovvd/mbKFtQnGs2DZQo0QozgRqxlZt4wy2d YyrZPuR06VSoflXw40comTBUEtGr7w15OejYFFgViDTOdFbXS4uGE3Bx6Bh9BqfaZZ1m 2vog== X-Gm-Message-State: ALoCoQlo5tqFuD0PoIn2gpHMON3vbgBEEumk3TWLZdEqQObBzvcS4Hi8ps11Wy14ukWpywFuYi9P X-Received: by 10.182.55.102 with SMTP id r6mr16875306obp.7.1388053359835; Thu, 26 Dec 2013 02:22:39 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.145 with SMTP id u17ls2498585qef.42.gmail; Thu, 26 Dec 2013 02:22:39 -0800 (PST) X-Received: by 10.58.90.230 with SMTP id bz6mr4094473veb.21.1388053359759; Thu, 26 Dec 2013 02:22:39 -0800 (PST) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id ex8si1412337vcb.89.2013.12.26.02.22.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Dec 2013 02:22:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jy13so4361794veb.13 for ; Thu, 26 Dec 2013 02:22:39 -0800 (PST) X-Received: by 10.58.243.37 with SMTP id wv5mr167645vec.41.1388053359674; Thu, 26 Dec 2013 02:22:39 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp388057ved; Thu, 26 Dec 2013 02:22:39 -0800 (PST) X-Received: by 10.68.236.35 with SMTP id ur3mr42855533pbc.137.1388053358748; Thu, 26 Dec 2013 02:22:38 -0800 (PST) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx.google.com with ESMTPS id ty3si20428178pbc.317.2013.12.26.02.22.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Dec 2013 02:22:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.181 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.192.181; Received: by mail-pd0-f181.google.com with SMTP id p10so7871267pdj.40 for ; Thu, 26 Dec 2013 02:22:38 -0800 (PST) X-Received: by 10.67.14.231 with SMTP id fj7mr42465214pad.115.1388053358374; Thu, 26 Dec 2013 02:22:38 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ha10sm54123051pbd.17.2013.12.26.02.22.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Dec 2013 02:22:37 -0800 (PST) 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 Subject: [PATCH RESEND 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD Date: Thu, 26 Dec 2013 15:48:59 +0530 Message-Id: <1388053141-30085-3-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1388053141-30085-1-git-send-email-tushar.behera@linaro.org> References: <1383202124-1775-1-git-send-email-tushar.behera@linaro.org> <1388053141-30085-1-git-send-email-tushar.behera@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 CC: Mike Turquette --- 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 3089f05..87e6c56 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -75,10 +75,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 43e25bb..f4c1f08 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);