Skip to content

Commit

Permalink
clk: clk-s2mps11: Add support for clocks in S5M8767 MFD
Browse files Browse the repository at this point in the history
Since clock operation within S2MPS11 and S5M8767 are similar, we can
support both the devices within a single driver.

Signed-off-by: Tushar Behera <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
Reviewed-by: Yadwinder Singh Brar <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
  • Loading branch information
Tushar Behera authored and Mike Turquette committed Mar 19, 2014
1 parent 64d64c3 commit e8e6b84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/clk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions drivers/clk/clk-s2mps11.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/clk-provider.h>
#include <linux/platform_device.h>
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s5m8767.h>
#include <linux/mfd/samsung/core.h>

#define s2mps11_name(a) (a->hw.init->name)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e8e6b84

Please sign in to comment.