]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
clk: s2mps11: add support for S2MPG10 PMIC clock
authorAndré Draszik <andre.draszik@linaro.org>
Wed, 30 Jul 2025 09:31:35 +0000 (10:31 +0100)
committerStephen Boyd <sboyd@kernel.org>
Sun, 21 Sep 2025 17:43:18 +0000 (10:43 -0700)
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>
drivers/clk/clk-s2mps11.c

index d4e9c3577b35dec8d9ec67c489b7b5ae27211f55..ff7ce12a5da6b437b5c92b9a32dcaf9423647cde 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/regmap.h>
 #include <linux/clk-provider.h>
 #include <linux/platform_device.h>
+#include <linux/mfd/samsung/s2mpg10.h>
 #include <linux/mfd/samsung/s2mps11.h>
 #include <linux/mfd/samsung/s2mps13.h>
 #include <linux/mfd/samsung/s2mps14.h>
@@ -140,6 +141,9 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
        clk_data->num = S2MPS11_CLKS_NUM;
 
        switch (hwid) {
+       case S2MPG10:
+               s2mps11_reg = S2MPG10_PMIC_RTCBUF;
+               break;
        case S2MPS11X:
                s2mps11_reg = S2MPS11_REG_RTC_CTRL;
                break;
@@ -221,6 +225,7 @@ static void s2mps11_clk_remove(struct platform_device *pdev)
 }
 
 static const struct platform_device_id s2mps11_clk_id[] = {
+       { "s2mpg10-clk", S2MPG10},
        { "s2mps11-clk", S2MPS11X},
        { "s2mps13-clk", S2MPS13X},
        { "s2mps14-clk", S2MPS14X},
@@ -241,6 +246,9 @@ MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);
  */
 static const struct of_device_id s2mps11_dt_match[] __used = {
        {
+               .compatible = "samsung,s2mpg10-clk",
+               .data = (void *)S2MPG10,
+       }, {
                .compatible = "samsung,s2mps11-clk",
                .data = (void *)S2MPS11X,
        }, {