From patchwork Thu Oct 31 06:48:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 21296 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5E39B20F2F for ; Thu, 31 Oct 2013 06:50:17 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id k18sf4872042qcv.9 for ; Wed, 30 Oct 2013 23:50:17 -0700 (PDT) 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=9xQ0BXelsoykMrFY6C8OO86CFrnJy72jA6aDO+OOqUs=; b=d5MFxX1KDutHD1NGpU3PuchIHvsr0fERbMRNUYcgPSfrxEJK3NC+sids+4eSSx5ZJA Uz8ZDUae0bD0R2y+6ovzx1H2LZNPOo7YYqbHG7XVMb1DQYNd5Orj8D4dGMVxGAsL9730 SCp+V9L+kA2/Guiv0JvXb+0vXAqgpYilxqDgFpjgFiptOZfPoRmIFcwVO8ZVHaZy842t xABpzM6Mi7xo52JitRT7SzVjjLTSbWWPnna1z9zdBZCY6Yaf6AEc9KmN2BSHUiJV70MS T/l6W/d+PDd8HmYw8P+HRal6K1sJLif7lZ9wBjiw4ox3ocjF8jdjSYfJ/5G33YCnJCEA 9XHA== X-Gm-Message-State: ALoCoQkB1+WA88nUPKqBBNEi4KwEzL47ySlNFKmeYDaxjLY4CCCwbhdUGMxQUQt5jonpuTDe5mK1 X-Received: by 10.58.54.97 with SMTP id i1mr28864vep.40.1383202216961; Wed, 30 Oct 2013 23:50:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.84.1 with SMTP id u1ls829607qey.8.gmail; Wed, 30 Oct 2013 23:50:16 -0700 (PDT) X-Received: by 10.58.19.195 with SMTP id h3mr198159vee.48.1383202216847; Wed, 30 Oct 2013 23:50:16 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id pv1si449091veb.56.2013.10.30.23.50.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 23:50:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 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.176; Received: by mail-ve0-f176.google.com with SMTP id jx11so1761011veb.35 for ; Wed, 30 Oct 2013 23:50:16 -0700 (PDT) X-Received: by 10.220.47.10 with SMTP id l10mr213040vcf.32.1383202216746; Wed, 30 Oct 2013 23:50:16 -0700 (PDT) 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.220.174.196 with SMTP id u4csp337734vcz; Wed, 30 Oct 2013 23:50:16 -0700 (PDT) X-Received: by 10.69.20.75 with SMTP id ha11mr252698pbd.109.1383202215790; Wed, 30 Oct 2013 23:50:15 -0700 (PDT) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by mx.google.com with ESMTPS id dk5si883029pbc.166.2013.10.30.23.50.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 23:50:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.49 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.49; Received: by mail-pa0-f49.google.com with SMTP id lj1so2066916pab.22 for ; Wed, 30 Oct 2013 23:50:15 -0700 (PDT) X-Received: by 10.66.191.162 with SMTP id gz2mr228497pac.151.1383202215359; Wed, 30 Oct 2013 23:50:15 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id qw8sm1880915pbb.27.2013.10.30.23.50.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 23:50:14 -0700 (PDT) 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, Yadwinder Singh Brar Subject: [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD Date: Thu, 31 Oct 2013 12:18:42 +0530 Message-Id: <1383202124-1775-3-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1383202124-1775-1-git-send-email-tushar.behera@linaro.org> References: <1383202124-1775-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.176 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 CC: Yadwinder Singh Brar CC: Mike Turquette 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 5c51115..7f2aef2 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -65,10 +65,12 @@ config COMMON_CLK_SI5351 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 2262cb4..19c075c 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);