Skip to content

Commit 823699c

Browse files
andredbebarino
authored andcommitted
clk: s2mps11: add support for S2MPG10 PMIC clock
Add support for Samsung's S2MPG10 PMIC clock, which is similar to the existing PMIC clocks supported by this driver. S2MPG10 has three clock outputs @ 32kHz: AP, peri1 and peri2. Acked-by: Stephen Boyd <sboyd@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: André Draszik <andre.draszik@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent b92ef17 commit 823699c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/clk/clk-s2mps11.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/regmap.h>
1212
#include <linux/clk-provider.h>
1313
#include <linux/platform_device.h>
14+
#include <linux/mfd/samsung/s2mpg10.h>
1415
#include <linux/mfd/samsung/s2mps11.h>
1516
#include <linux/mfd/samsung/s2mps13.h>
1617
#include <linux/mfd/samsung/s2mps14.h>
@@ -140,6 +141,9 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
140141
clk_data->num = S2MPS11_CLKS_NUM;
141142

142143
switch (hwid) {
144+
case S2MPG10:
145+
s2mps11_reg = S2MPG10_PMIC_RTCBUF;
146+
break;
143147
case S2MPS11X:
144148
s2mps11_reg = S2MPS11_REG_RTC_CTRL;
145149
break;
@@ -221,6 +225,7 @@ static void s2mps11_clk_remove(struct platform_device *pdev)
221225
}
222226

223227
static const struct platform_device_id s2mps11_clk_id[] = {
228+
{ "s2mpg10-clk", S2MPG10},
224229
{ "s2mps11-clk", S2MPS11X},
225230
{ "s2mps13-clk", S2MPS13X},
226231
{ "s2mps14-clk", S2MPS14X},
@@ -241,6 +246,9 @@ MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);
241246
*/
242247
static const struct of_device_id s2mps11_dt_match[] __used = {
243248
{
249+
.compatible = "samsung,s2mpg10-clk",
250+
.data = (void *)S2MPG10,
251+
}, {
244252
.compatible = "samsung,s2mps11-clk",
245253
.data = (void *)S2MPS11X,
246254
}, {

0 commit comments

Comments
 (0)