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: 22778 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3F6CD23FDF for ; Mon, 30 Dec 2013 04:03:53 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id kp14sf30493094pab.2 for ; Sun, 29 Dec 2013 20:03:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=O8ubqhJu+eMyH39qfk6VpIiX5A5uBngDdFM/6Pb/lxw=; b=J3K6L03saV3It36K8fX5YxVZ7dmGXErMsUWUgXBBrA0gVzO53c6NpkQGBrrLriPZrs tbnQAbc8kq3indW/5tKSHYqUsuzZV9Ozv7cTUNWb87fksvKrsn3xcDoSpjsqZsGLxTDc Enq58AqazJdRH0bNdiHB9TXvmjEA07ZqZZXVINsNksqgKj2sThMqRkzkCl5WrEfLGPQx 1zAkc0VvbObD4TFtXUwR8rrCF0z/tXaUEzLNv9rn/Kn3hG9/w4wsArSNn/4IO/FZP8ua er8wLRpNiu0Ky96/cNTjB4kE04gKkRQMdfrEsL06JpAzp2uLJdu6mLwu/guz74TmVUJ6 HYlw== X-Gm-Message-State: ALoCoQngE4gS8r+1xklynrD7xPsg5hs/JNTiS8G1nTuUwKFiX4JP9RbCcEUmVvSRAVLMhSavbPpB X-Received: by 10.67.14.70 with SMTP id fe6mr24952996pad.15.1388376233040; Sun, 29 Dec 2013 20:03:53 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.15.234 with SMTP id a10ls3422005qed.92.gmail; Sun, 29 Dec 2013 20:03:52 -0800 (PST) X-Received: by 10.52.175.6 with SMTP id bw6mr433656vdc.48.1388376232868; Sun, 29 Dec 2013 20:03:52 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id df13si16123956vec.72.2013.12.29.20.03.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Dec 2013 20:03:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id lh4so5740166vcb.9 for ; Sun, 29 Dec 2013 20:03:52 -0800 (PST) X-Received: by 10.52.240.201 with SMTP id wc9mr277421vdc.60.1388376232542; Sun, 29 Dec 2013 20:03:52 -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 ey3csp583793ved; Sun, 29 Dec 2013 20:03:51 -0800 (PST) X-Received: by 10.60.133.203 with SMTP id pe11mr32409oeb.84.1388376231298; Sun, 29 Dec 2013 20:03:51 -0800 (PST) Received: from mail-oa0-f45.google.com (mail-oa0-f45.google.com [209.85.219.45]) by mx.google.com with ESMTPS id rj3si34739188oeb.42.2013.12.29.20.03.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Dec 2013 20:03:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.219.45 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.219.45; Received: by mail-oa0-f45.google.com with SMTP id o6so11679567oag.32 for ; Sun, 29 Dec 2013 20:03:50 -0800 (PST) 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 Cc: lkml , "linux-arm-kernel@lists.infradead.org" , linux-samsung-soc , Lee Jones , Kgene Kim , Patch Tracking , Mark Brown 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.220.178 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: , 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