From: Laxman Dewangan <ldewangan@nvidia.com>
To: k.kozlowski@samsung.com, javier@osg.samsung.com,
mturquette@baylibre.com, robh+dt@kernel.org,
linux@armlinux.org.uk
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
Laxman Dewangan <ldewangan@nvidia.com>,
Javier Martinez Canillas <javier@dowhile0.org>
Subject: [PATCH 4/5] clk: max77686: Add support for MAX77620 clocks
Date: Wed, 15 Jun 2016 19:43:37 +0530 [thread overview]
Message-ID: <1466000018-16784-5-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1466000018-16784-1-git-send-email-ldewangan@nvidia.com>
Maxim Max77620 has one 32KHz clock output and the clock HW
IP used on this PMIC is same as what it is there in the MAX77686.
Add clock driver support for MAX77620 on the MAX77686 driver.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
CC: Javier Martinez Canillas <javier@dowhile0.org>
---
drivers/clk/Kconfig | 7 ++++---
drivers/clk/clk-max77686.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 6afad74..d75f4c5 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -32,10 +32,11 @@ config COMMON_CLK_WM831X
source "drivers/clk/versatile/Kconfig"
config COMMON_CLK_MAX77686
- tristate "Clock driver for Maxim 77686/77802 MFD"
- depends on MFD_MAX77686
+ tristate "Clock driver for Maxim 77686/77802/MAX77620 MFD"
+ depends on MFD_MAX77686 || MFD_MAX77620
---help---
- This driver supports Maxim 77686/77802 crystal oscillator clock.
+ This driver supports Maxim 77686/77802/MAX77620 crystal oscillator
+ clock.
config COMMON_CLK_RK808
tristate "Clock driver for RK808"
diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c
index 31ba726..d2be736 100644
--- a/drivers/clk/clk-max77686.c
+++ b/drivers/clk/clk-max77686.c
@@ -19,6 +19,7 @@
#include <linux/err.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/mfd/max77620.h>
#include <linux/mfd/max77686.h>
#include <linux/mfd/max77686-private.h>
#include <linux/clk-provider.h>
@@ -30,12 +31,14 @@
#include <dt-bindings/clock/maxim,max77686.h>
#include <dt-bindings/clock/maxim,max77802.h>
+#include <dt-bindings/mfd/max77620.h>
#define MAX77802_CLOCK_LOW_JITTER_SHIFT 0x3
enum chip_name {
CHIP_MAX77686,
CHIP_MAX77802,
+ CHIP_MAX77620,
};
struct max_gen_hw_clk_data {
@@ -91,6 +94,14 @@ static struct max_gen_hw_clk_data max77802_hw_clks_info[MAX77802_CLKS_NUM] = {
},
};
+static struct max_gen_hw_clk_data max77620_hw_clks_info[MAX77620_CLKS_NUM] = {
+ [MAX77620_CLK_32K_OUT0] = {
+ .name = "32khz_pmic",
+ .reg = MAX77620_REG_CNFG1_32K,
+ .mask = MAX77620_CNFG1_32K_OUT0_EN,
+ },
+};
+
static struct max_gen_clk_data *to_max_gen_clk_data(struct clk_hw *hw)
{
return container_of(hw, struct max_gen_clk_data, hw);
@@ -171,6 +182,10 @@ static int max77686_clk_probe(struct platform_device *pdev)
num_clks = MAX77802_CLKS_NUM;
hw_clks = max77802_hw_clks_info;
break;
+ case CHIP_MAX77620:
+ num_clks = MAX77620_CLKS_NUM;
+ hw_clks = max77620_hw_clks_info;
+ break;
default:
dev_err(dev, "Unknown Chip ID\n");
return -EINVAL;
@@ -269,6 +284,7 @@ static int max77686_clk_remove(struct platform_device *pdev)
static const struct platform_device_id max77686_clk_id[] = {
{ "max77686-clk", .driver_data = (kernel_ulong_t)CHIP_MAX77686, },
{ "max77802-clk", .driver_data = (kernel_ulong_t)CHIP_MAX77802, },
+ { "max77620-clock", .driver_data = (kernel_ulong_t)CHIP_MAX77620, },
{},
};
MODULE_DEVICE_TABLE(platform, max77686_clk_id);
--
2.1.4
next prev parent reply other threads:[~2016-06-15 14:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 14:13 [PATCH 0/5] clk: Combine MAX77686 and MAX77802 driver and extend for MAX77620 Laxman Dewangan
2016-06-15 14:13 ` [PATCH 1/5] clk: max77686: Combine Maxim max77686 and max77802 driver Laxman Dewangan
2016-06-15 15:12 ` Javier Martinez Canillas
2016-06-15 15:35 ` kbuild test robot
2016-06-15 15:35 ` [PATCH] clk: max77686: fix semicolon.cocci warnings kbuild test robot
2016-06-16 9:31 ` [PATCH 1/5] clk: max77686: Combine Maxim max77686 and max77802 driver Krzysztof Kozlowski
2016-06-16 13:02 ` Krzysztof Kozlowski
2016-06-15 14:13 ` [PATCH 2/5] clk: Combine DT binding doc for max77686 and max77802 Laxman Dewangan
2016-06-15 15:19 ` Javier Martinez Canillas
2016-06-16 9:34 ` Krzysztof Kozlowski
2016-06-16 9:44 ` Krzysztof Kozlowski
2016-06-15 14:13 ` [PATCH 3/5] clk: max77686: Add DT binding details for PMIC MAX77620 Laxman Dewangan
2016-06-15 15:24 ` Javier Martinez Canillas
2016-06-16 9:49 ` Krzysztof Kozlowski
2016-06-15 14:13 ` Laxman Dewangan [this message]
[not found] ` <1466000018-16784-5-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-15 15:27 ` [PATCH 4/5] clk: max77686: Add support for MAX77620 clocks Javier Martinez Canillas
2016-06-16 9:54 ` Krzysztof Kozlowski
2016-06-16 9:52 ` Laxman Dewangan
2016-06-16 10:11 ` Krzysztof Kozlowski
2016-06-16 13:02 ` Krzysztof Kozlowski
2016-06-15 14:13 ` [PATCH 5/5] ARM: config: Get rid of config COMMON_CLK_MAX77802 Laxman Dewangan
2016-06-15 15:39 ` Javier Martinez Canillas
2016-06-16 12:25 ` Krzysztof Kozlowski
2016-06-16 13:06 ` Javier Martinez Canillas
2016-06-16 13:08 ` Laxman Dewangan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466000018-16784-5-git-send-email-ldewangan@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=devicetree@vger.kernel.org \
--cc=javier@dowhile0.org \
--cc=javier@osg.samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).