Skip to content

Commit e8e6b84

Browse files
trbeheraMike Turquette
authored andcommitted
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 <tushar.behera@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
1 parent 64d64c3 commit e8e6b84

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

drivers/clk/Kconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ config COMMON_CLK_SI570
6565
clock generators.
6666

6767
config COMMON_CLK_S2MPS11
68-
tristate "Clock driver for S2MPS11 MFD"
68+
tristate "Clock driver for S2MPS11/S5M8767 MFD"
6969
depends on MFD_SEC_CORE
7070
---help---
71-
This driver supports S2MPS11 crystal oscillator clock.
71+
This driver supports S2MPS11/S5M8767 crystal oscillator clock. These
72+
multi-function devices have 3 fixed-rate oscillators, clocked at
73+
32KHz each.
7274

7375
config CLK_TWL6040
7476
tristate "External McPDM functional clock from twl6040"

drivers/clk/clk-s2mps11.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/clk-provider.h>
2828
#include <linux/platform_device.h>
2929
#include <linux/mfd/samsung/s2mps11.h>
30+
#include <linux/mfd/samsung/s5m8767.h>
3031
#include <linux/mfd/samsung/core.h>
3132

3233
#define s2mps11_name(a) (a->hw.init->name)
@@ -175,6 +176,9 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
175176
case S2MPS11X:
176177
s2mps11_reg = S2MPS11_REG_RTC_CTRL;
177178
break;
179+
case S5M8767X:
180+
s2mps11_reg = S5M8767_REG_CTRL1;
181+
break;
178182
default:
179183
dev_err(&pdev->dev, "Invalid device type\n");
180184
return -EINVAL;
@@ -254,6 +258,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev)
254258

255259
static const struct platform_device_id s2mps11_clk_id[] = {
256260
{ "s2mps11-clk", S2MPS11X},
261+
{ "s5m8767-clk", S5M8767X},
257262
{ },
258263
};
259264
MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);

0 commit comments

Comments
 (0)