Commit e8e6b840 authored by Tushar Behera's avatar Tushar Behera Committed by Mike Turquette

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: default avatarTushar Behera <tushar.behera@linaro.org>
Reviewed-by: default avatarTomasz Figa <t.figa@samsung.com>
Reviewed-by: default avatarYadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
parent 64d64c35
...@@ -65,10 +65,12 @@ config COMMON_CLK_SI570 ...@@ -65,10 +65,12 @@ config COMMON_CLK_SI570
clock generators. clock generators.
config COMMON_CLK_S2MPS11 config COMMON_CLK_S2MPS11
tristate "Clock driver for S2MPS11 MFD" tristate "Clock driver for S2MPS11/S5M8767 MFD"
depends on MFD_SEC_CORE depends on MFD_SEC_CORE
---help--- ---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 config CLK_TWL6040
tristate "External McPDM functional clock from twl6040" tristate "External McPDM functional clock from twl6040"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mfd/samsung/s2mps11.h> #include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s5m8767.h>
#include <linux/mfd/samsung/core.h> #include <linux/mfd/samsung/core.h>
#define s2mps11_name(a) (a->hw.init->name) #define s2mps11_name(a) (a->hw.init->name)
...@@ -175,6 +176,9 @@ static int s2mps11_clk_probe(struct platform_device *pdev) ...@@ -175,6 +176,9 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
case S2MPS11X: case S2MPS11X:
s2mps11_reg = S2MPS11_REG_RTC_CTRL; s2mps11_reg = S2MPS11_REG_RTC_CTRL;
break; break;
case S5M8767X:
s2mps11_reg = S5M8767_REG_CTRL1;
break;
default: default:
dev_err(&pdev->dev, "Invalid device type\n"); dev_err(&pdev->dev, "Invalid device type\n");
return -EINVAL; return -EINVAL;
...@@ -254,6 +258,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) ...@@ -254,6 +258,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev)
static const struct platform_device_id s2mps11_clk_id[] = { static const struct platform_device_id s2mps11_clk_id[] = {
{ "s2mps11-clk", S2MPS11X}, { "s2mps11-clk", S2MPS11X},
{ "s5m8767-clk", S5M8767X},
{ }, { },
}; };
MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment