From patchwork Mon Dec 30 04:03:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 3417541 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 376469F374 for ; Mon, 30 Dec 2013 04:04:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 307A920107 for ; Mon, 30 Dec 2013 04:04:46 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD744200FE for ; Mon, 30 Dec 2013 04:04:44 +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 1VxU5Y-0006W0-0O; Mon, 30 Dec 2013 04:04:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VxU5V-0008VJ-JE; Mon, 30 Dec 2013 04:04:21 +0000 Received: from mail-ob0-f180.google.com ([209.85.214.180]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VxU5R-0008Ua-9M for linux-arm-kernel@lists.infradead.org; Mon, 30 Dec 2013 04:04:18 +0000 Received: by mail-ob0-f180.google.com with SMTP id wo20so11067475obc.25 for ; Sun, 29 Dec 2013 20:03:51 -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:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=O8ubqhJu+eMyH39qfk6VpIiX5A5uBngDdFM/6Pb/lxw=; b=bGbPsIZ7DoUdZ5YPje1jg6j/uo7UME3QcPBCKwcqVhx5Goqugb1SnOlL7ZttCXqEu0 YsCe21LCxlTCEnL1EFMj0RmJTJBXHWE+jPHzXP8ab4Grmu07y6AiNGmeygbX20XWlSSQ uVWsCZMqDefjVvDMcgaertrGgbsJiKelqDOZ2lRKt02hwhtpMSgKJTYvW03MVwCWpW9e AsBeR3hvFix6PVDeua+hIlLZ71dTAp8CrrlGF6H2BlvfpwUWW5WV1dGL+vtYqG7CP9++ rr1FQn79pacV9XBFRuWv2zJshSEF9PBSNcbGfVLvDRa/mAjK6Gry0G00l/h1285v4/cJ fLdQ== X-Gm-Message-State: ALoCoQmM5JS0Mizb5thFwykqaWy5yoVoxVfs+umQVJhdGJ262soRCbGPV6Aw8sIwAGHd7i+FD3DS MIME-Version: 1.0 X-Received: by 10.60.99.8 with SMTP id em8mr17461338oeb.8.1388376230863; Sun, 29 Dec 2013 20:03:50 -0800 (PST) Received: by 10.60.157.229 with HTTP; Sun, 29 Dec 2013 20:03:50 -0800 (PST) In-Reply-To: <20131229221723.12054.40917@quantum> References: <1383202124-1775-1-git-send-email-tushar.behera@linaro.org> <1388053141-30085-1-git-send-email-tushar.behera@linaro.org> <1388053141-30085-2-git-send-email-tushar.behera@linaro.org> <20131229221723.12054.40917@quantum> Date: Mon, 30 Dec 2013 09:33:50 +0530 Message-ID: Subject: Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks From: Tushar Behera To: Mike Turquette X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131229_230417_406162_7E994BB4 X-CRM114-Status: GOOD ( 22.05 ) X-Spam-Score: -2.6 (--) Cc: Kgene Kim , Patch Tracking , Mark Brown , lkml , linux-samsung-soc , Lee Jones , "linux-arm-kernel@lists.infradead.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: , 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.6 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 On 30 December 2013 03:47, Mike Turquette wrote: > Quoting Tushar Behera (2013-12-26 02:18:58) >> The clocks in S2MPS11 and S5M8767 are managed in the same way, baring >> a difference in the register offset. It would be better to update >> existing S2MPS11 driver to support the clocks in S5M8767, rather than >> creating an almost duplicate driver altogether. > > Can you rebase patches #1 & #2 onto clk-next? They do not apply cleanly > as-is. > > Regards, > Mike > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename in sec-core.c" is also touching this file, which is in Mark's tree right now. If I rebase this patch on top clk-next, I am getting conflicts when I merge that with linux-next. Let me know how you want to handle this. I am attaching the rebased patches for your reference. If you want, I will send them again through git-send-email. From 5f3843da7bc71d126c0cce7a8e88aab1850c4b9c Mon Sep 17 00:00:00 2001 From: Tushar Behera Date: Wed, 30 Oct 2013 15:56:27 +0530 Subject: [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD 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 --- 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 407cffb..99332da 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 494d1df..37e7285 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); -- 1.7.9.5