Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tushar Behera and committed by
Mike Turquette
e8e6b840 64d64c35

+9 -2
+4 -2
drivers/clk/Kconfig
··· 65 65 clock generators. 66 66 67 67 config COMMON_CLK_S2MPS11 68 - tristate "Clock driver for S2MPS11 MFD" 68 + tristate "Clock driver for S2MPS11/S5M8767 MFD" 69 69 depends on MFD_SEC_CORE 70 70 ---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. 72 74 73 75 config CLK_TWL6040 74 76 tristate "External McPDM functional clock from twl6040"
+5
drivers/clk/clk-s2mps11.c
··· 27 27 #include <linux/clk-provider.h> 28 28 #include <linux/platform_device.h> 29 29 #include <linux/mfd/samsung/s2mps11.h> 30 + #include <linux/mfd/samsung/s5m8767.h> 30 31 #include <linux/mfd/samsung/core.h> 31 32 32 33 #define s2mps11_name(a) (a->hw.init->name) ··· 176 175 case S2MPS11X: 177 176 s2mps11_reg = S2MPS11_REG_RTC_CTRL; 178 177 break; 178 + case S5M8767X: 179 + s2mps11_reg = S5M8767_REG_CTRL1; 180 + break; 179 181 default: 180 182 dev_err(&pdev->dev, "Invalid device type\n"); 181 183 return -EINVAL; ··· 258 254 259 255 static const struct platform_device_id s2mps11_clk_id[] = { 260 256 { "s2mps11-clk", S2MPS11X}, 257 + { "s5m8767-clk", S5M8767X}, 261 258 { }, 262 259 }; 263 260 MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);