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: 3417521 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 A3E00C02DC for ; Mon, 30 Dec 2013 04:03:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 91DF520107 for ; Mon, 30 Dec 2013 04:03:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 628E1200FE for ; Mon, 30 Dec 2013 04:03:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754521Ab3L3EDw (ORCPT ); Sun, 29 Dec 2013 23:03:52 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:59590 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754432Ab3L3EDv (ORCPT ); Sun, 29 Dec 2013 23:03:51 -0500 Received: by mail-ob0-f174.google.com with SMTP id wn1so11189847obc.19 for ; Sun, 29 Dec 2013 20:03:50 -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=nIVi3ia1R8DW9FCQaV96abQtlK31f87AM+d2UTi/Y7Zu8AzB+I7BR4MTDhMBuQ4zvL UPXotkg7Wt7zul0Rqk7/UjV1chM2XItCOuOCq9116WT7UGuA+8Nwi+ohtft0lEKCR94W A3jRUyyckahPcYYCX4S88zMuezu+i94aUM07b2yMsCkMvTRaWVuUoY21AJjExP+CFpfd EFXWO6KpBFUdSP35vPpT6plMOV5+xXmpYLUDjodaW5r5ntSzt6ORO8V5YVP8vZiRSbyE qzayL8tmMDc1XCc9oJ3JDPlLA6XeacmMkqCW0dX8OCyfSqOu7j416fDUocf+rLQLYU1G +5Hg== X-Gm-Message-State: ALoCoQl59FtTw9FUxP4AhDnj+7QIdPUbdEDG05Msw7b40xe0D0pqXPILFRtKsn40TbgbCWyeIHBu 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 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.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham 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