* [PATCH 0/4] Add support for clocks in S5M8767 @ 2013-10-31 6:48 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches S5M8767 chip has 3 crystal oscillators which are operated in the same as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to support clocks in S5M8767. The patches are based on next-20131030. Tushar Behera (4): clk: clk-s2mps11: Refactor for including support for other MFD clocks clk: clk-s2mps11: Add support for clocks in S5M8767 MFD mfd: sec-core: Add cells for S5M8767-clocks ARM: dts: Add S5M8767 clock nodes on Arndale board arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 25 +++++++++++++++++++++---- drivers/mfd/sec-core.c | 4 +++- 4 files changed, 35 insertions(+), 7 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 0/4] Add support for clocks in S5M8767 @ 2013-10-31 6:48 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-arm-kernel S5M8767 chip has 3 crystal oscillators which are operated in the same as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to support clocks in S5M8767. The patches are based on next-20131030. Tushar Behera (4): clk: clk-s2mps11: Refactor for including support for other MFD clocks clk: clk-s2mps11: Add support for clocks in S5M8767 MFD mfd: sec-core: Add cells for S5M8767-clocks ARM: dts: Add S5M8767 clock nodes on Arndale board arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 25 +++++++++++++++++++++---- drivers/mfd/sec-core.c | 4 +++- 4 files changed, 35 insertions(+), 7 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks 2013-10-31 6:48 ` Tushar Behera @ 2013-10-31 6:48 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches, Yadwinder Singh Brar The clocks in S2MPS11 and S5M8767 are managed in the same way, baring a difference in the register offset. It would be better to update existing S2MPS11 driver to support the clocks in S5M8767, rather than creating an almost duplicate driver altogether. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> CC: Yadwinder Singh Brar <yadi.brar@samsung.com> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 7be41e6..2262cb4 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -48,6 +48,7 @@ struct s2mps11_clk { struct clk_lookup *lookup; u32 mask; bool enabled; + unsigned int reg; }; static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) int ret; ret = regmap_update_bits(s2mps11->iodev->regmap, - S2MPS11_REG_RTC_CTRL, + s2mps11->reg, s2mps11->mask, s2mps11->mask); if (!ret) s2mps11->enabled = true; @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); int ret; - ret = regmap_update_bits(s2mps11->iodev->regmap, S2MPS11_REG_RTC_CTRL, + ret = regmap_update_bits(s2mps11->iodev->regmap, s2mps11->reg, s2mps11->mask, ~s2mps11->mask); if (!ret) @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; struct device_node *clk_np = NULL; + unsigned int s2mps11_reg; int i, ret = 0; u32 val; @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) if (IS_ERR(clk_np)) return PTR_ERR(clk_np); + switch(platform_get_device_id(pdev)->driver_data) { + case S2MPS11X: + s2mps11_reg = S2MPS11_REG_RTC_CTRL; + break; + default: + dev_err(&pdev->dev, "Invalid device type\n"); + return -EINVAL; + }; + for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { s2mps11_clk->iodev = iodev; s2mps11_clk->hw.init = &s2mps11_clks_init[i]; s2mps11_clk->mask = 1 << i; + s2mps11_clk->reg = s2mps11_reg; ret = regmap_read(s2mps11_clk->iodev->regmap, - S2MPS11_REG_RTC_CTRL, &val); + s2mps11_clk->reg, &val); if (ret < 0) goto err_reg; @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) } static const struct platform_device_id s2mps11_clk_id[] = { - { "s2mps11-clk", 0}, + { "s2mps11-clk", S2MPS11X}, { }, }; MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-10-31 6:48 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-arm-kernel The clocks in S2MPS11 and S5M8767 are managed in the same way, baring a difference in the register offset. It would be better to update existing S2MPS11 driver to support the clocks in S5M8767, rather than creating an almost duplicate driver altogether. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> CC: Yadwinder Singh Brar <yadi.brar@samsung.com> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 7be41e6..2262cb4 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -48,6 +48,7 @@ struct s2mps11_clk { struct clk_lookup *lookup; u32 mask; bool enabled; + unsigned int reg; }; static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) int ret; ret = regmap_update_bits(s2mps11->iodev->regmap, - S2MPS11_REG_RTC_CTRL, + s2mps11->reg, s2mps11->mask, s2mps11->mask); if (!ret) s2mps11->enabled = true; @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); int ret; - ret = regmap_update_bits(s2mps11->iodev->regmap, S2MPS11_REG_RTC_CTRL, + ret = regmap_update_bits(s2mps11->iodev->regmap, s2mps11->reg, s2mps11->mask, ~s2mps11->mask); if (!ret) @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; struct device_node *clk_np = NULL; + unsigned int s2mps11_reg; int i, ret = 0; u32 val; @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) if (IS_ERR(clk_np)) return PTR_ERR(clk_np); + switch(platform_get_device_id(pdev)->driver_data) { + case S2MPS11X: + s2mps11_reg = S2MPS11_REG_RTC_CTRL; + break; + default: + dev_err(&pdev->dev, "Invalid device type\n"); + return -EINVAL; + }; + for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { s2mps11_clk->iodev = iodev; s2mps11_clk->hw.init = &s2mps11_clks_init[i]; s2mps11_clk->mask = 1 << i; + s2mps11_clk->reg = s2mps11_reg; ret = regmap_read(s2mps11_clk->iodev->regmap, - S2MPS11_REG_RTC_CTRL, &val); + s2mps11_clk->reg, &val); if (ret < 0) goto err_reg; @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) } static const struct platform_device_id s2mps11_clk_id[] = { - { "s2mps11-clk", 0}, + { "s2mps11-clk", S2MPS11X}, { }, }; MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* Re: [PATCH 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks 2013-10-31 6:48 ` Tushar Behera (?) @ 2013-11-11 14:17 ` Yadwinder Singh Brar -1 siblings, 0 replies; 63+ messages in thread From: Yadwinder Singh Brar @ 2013-11-11 14:17 UTC (permalink / raw) To: Tushar Behera Cc: linux-kernel, linux-arm-kernel, linux-samsung-soc, Mike Turquette, Lee Jones, Kukjin Kim, Patch Tracking, Yadwinder Singh Brar On Thu, Oct 31, 2013 at 3:48 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > The clocks in S2MPS11 and S5M8767 are managed in the same way, baring > a difference in the register offset. It would be better to update > existing S2MPS11 driver to support the clocks in S5M8767, rather than > creating an almost duplicate driver altogether. > > Signed-off-by: Tushar Behera <tushar.behera@linaro.org> > CC: Yadwinder Singh Brar <yadi.brar@samsung.com> > CC: Mike Turquette <mturquette@linaro.org> > --- Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Regards, Yadwinder > drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 7be41e6..2262cb4 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -48,6 +48,7 @@ struct s2mps11_clk { > struct clk_lookup *lookup; > u32 mask; > bool enabled; > + unsigned int reg; > }; > > static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) > @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) > int ret; > > ret = regmap_update_bits(s2mps11->iodev->regmap, > - S2MPS11_REG_RTC_CTRL, > + s2mps11->reg, > s2mps11->mask, s2mps11->mask); > if (!ret) > s2mps11->enabled = true; > @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) > struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); > int ret; > > - ret = regmap_update_bits(s2mps11->iodev->regmap, S2MPS11_REG_RTC_CTRL, > + ret = regmap_update_bits(s2mps11->iodev->regmap, s2mps11->reg, > s2mps11->mask, ~s2mps11->mask); > > if (!ret) > @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); > struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; > struct device_node *clk_np = NULL; > + unsigned int s2mps11_reg; > int i, ret = 0; > u32 val; > > @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > if (IS_ERR(clk_np)) > return PTR_ERR(clk_np); > > + switch(platform_get_device_id(pdev)->driver_data) { > + case S2MPS11X: > + s2mps11_reg = S2MPS11_REG_RTC_CTRL; > + break; > + default: > + dev_err(&pdev->dev, "Invalid device type\n"); > + return -EINVAL; > + }; > + > for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { > s2mps11_clk->iodev = iodev; > s2mps11_clk->hw.init = &s2mps11_clks_init[i]; > s2mps11_clk->mask = 1 << i; > + s2mps11_clk->reg = s2mps11_reg; > > ret = regmap_read(s2mps11_clk->iodev->regmap, > - S2MPS11_REG_RTC_CTRL, &val); > + s2mps11_clk->reg, &val); > if (ret < 0) > goto err_reg; > > @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) > } > > static const struct platform_device_id s2mps11_clk_id[] = { > - { "s2mps11-clk", 0}, > + { "s2mps11-clk", S2MPS11X}, > { }, > }; > MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-11-11 14:17 ` Yadwinder Singh Brar 0 siblings, 0 replies; 63+ messages in thread From: Yadwinder Singh Brar @ 2013-11-11 14:17 UTC (permalink / raw) To: linux-arm-kernel On Thu, Oct 31, 2013 at 3:48 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > The clocks in S2MPS11 and S5M8767 are managed in the same way, baring > a difference in the register offset. It would be better to update > existing S2MPS11 driver to support the clocks in S5M8767, rather than > creating an almost duplicate driver altogether. > > Signed-off-by: Tushar Behera <tushar.behera@linaro.org> > CC: Yadwinder Singh Brar <yadi.brar@samsung.com> > CC: Mike Turquette <mturquette@linaro.org> > --- Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Regards, Yadwinder > drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 7be41e6..2262cb4 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -48,6 +48,7 @@ struct s2mps11_clk { > struct clk_lookup *lookup; > u32 mask; > bool enabled; > + unsigned int reg; > }; > > static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) > @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) > int ret; > > ret = regmap_update_bits(s2mps11->iodev->regmap, > - S2MPS11_REG_RTC_CTRL, > + s2mps11->reg, > s2mps11->mask, s2mps11->mask); > if (!ret) > s2mps11->enabled = true; > @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) > struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); > int ret; > > - ret = regmap_update_bits(s2mps11->iodev->regmap, S2MPS11_REG_RTC_CTRL, > + ret = regmap_update_bits(s2mps11->iodev->regmap, s2mps11->reg, > s2mps11->mask, ~s2mps11->mask); > > if (!ret) > @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); > struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; > struct device_node *clk_np = NULL; > + unsigned int s2mps11_reg; > int i, ret = 0; > u32 val; > > @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > if (IS_ERR(clk_np)) > return PTR_ERR(clk_np); > > + switch(platform_get_device_id(pdev)->driver_data) { > + case S2MPS11X: > + s2mps11_reg = S2MPS11_REG_RTC_CTRL; > + break; > + default: > + dev_err(&pdev->dev, "Invalid device type\n"); > + return -EINVAL; > + }; > + > for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { > s2mps11_clk->iodev = iodev; > s2mps11_clk->hw.init = &s2mps11_clks_init[i]; > s2mps11_clk->mask = 1 << i; > + s2mps11_clk->reg = s2mps11_reg; > > ret = regmap_read(s2mps11_clk->iodev->regmap, > - S2MPS11_REG_RTC_CTRL, &val); > + s2mps11_clk->reg, &val); > if (ret < 0) > goto err_reg; > > @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) > } > > static const struct platform_device_id s2mps11_clk_id[] = { > - { "s2mps11-clk", 0}, > + { "s2mps11-clk", S2MPS11X}, > { }, > }; > MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-11-11 14:17 ` Yadwinder Singh Brar 0 siblings, 0 replies; 63+ messages in thread From: Yadwinder Singh Brar @ 2013-11-11 14:17 UTC (permalink / raw) To: Tushar Behera Cc: linux-kernel, linux-arm-kernel, linux-samsung-soc, Mike Turquette, Lee Jones, Kukjin Kim, Patch Tracking, Yadwinder Singh Brar On Thu, Oct 31, 2013 at 3:48 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > The clocks in S2MPS11 and S5M8767 are managed in the same way, baring > a difference in the register offset. It would be better to update > existing S2MPS11 driver to support the clocks in S5M8767, rather than > creating an almost duplicate driver altogether. > > Signed-off-by: Tushar Behera <tushar.behera@linaro.org> > CC: Yadwinder Singh Brar <yadi.brar@samsung.com> > CC: Mike Turquette <mturquette@linaro.org> > --- Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Regards, Yadwinder > drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 7be41e6..2262cb4 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -48,6 +48,7 @@ struct s2mps11_clk { > struct clk_lookup *lookup; > u32 mask; > bool enabled; > + unsigned int reg; > }; > > static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) > @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) > int ret; > > ret = regmap_update_bits(s2mps11->iodev->regmap, > - S2MPS11_REG_RTC_CTRL, > + s2mps11->reg, > s2mps11->mask, s2mps11->mask); > if (!ret) > s2mps11->enabled = true; > @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) > struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); > int ret; > > - ret = regmap_update_bits(s2mps11->iodev->regmap, S2MPS11_REG_RTC_CTRL, > + ret = regmap_update_bits(s2mps11->iodev->regmap, s2mps11->reg, > s2mps11->mask, ~s2mps11->mask); > > if (!ret) > @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); > struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; > struct device_node *clk_np = NULL; > + unsigned int s2mps11_reg; > int i, ret = 0; > u32 val; > > @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > if (IS_ERR(clk_np)) > return PTR_ERR(clk_np); > > + switch(platform_get_device_id(pdev)->driver_data) { > + case S2MPS11X: > + s2mps11_reg = S2MPS11_REG_RTC_CTRL; > + break; > + default: > + dev_err(&pdev->dev, "Invalid device type\n"); > + return -EINVAL; > + }; > + > for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { > s2mps11_clk->iodev = iodev; > s2mps11_clk->hw.init = &s2mps11_clks_init[i]; > s2mps11_clk->mask = 1 << i; > + s2mps11_clk->reg = s2mps11_reg; > > ret = regmap_read(s2mps11_clk->iodev->regmap, > - S2MPS11_REG_RTC_CTRL, &val); > + s2mps11_clk->reg, &val); > if (ret < 0) > goto err_reg; > > @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) > } > > static const struct platform_device_id s2mps11_clk_id[] = { > - { "s2mps11-clk", 0}, > + { "s2mps11-clk", S2MPS11X}, > { }, > }; > MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD 2013-10-31 6:48 ` Tushar Behera @ 2013-10-31 6:48 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches, Yadwinder Singh Brar 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> CC: Yadwinder Singh Brar <yadi.brar@samsung.com> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 5c51115..7f2aef2 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -65,10 +65,12 @@ config COMMON_CLK_SI5351 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" diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 2262cb4..19c075c 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -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) @@ -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; @@ -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); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD @ 2013-10-31 6:48 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-arm-kernel 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> CC: Yadwinder Singh Brar <yadi.brar@samsung.com> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 5c51115..7f2aef2 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -65,10 +65,12 @@ config COMMON_CLK_SI5351 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" diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 2262cb4..19c075c 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -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) @@ -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; @@ -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); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* Re: [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD 2013-10-31 6:48 ` Tushar Behera (?) @ 2013-11-11 14:18 ` Yadwinder Singh Brar -1 siblings, 0 replies; 63+ messages in thread From: Yadwinder Singh Brar @ 2013-11-11 14:18 UTC (permalink / raw) To: Tushar Behera Cc: linux-kernel, linux-arm-kernel, linux-samsung-soc, Lee Jones, Yadwinder Singh Brar, Kukjin Kim, Mike Turquette, Patch Tracking On Thu, Oct 31, 2013 at 3:48 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > 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> > CC: Yadwinder Singh Brar <yadi.brar@samsung.com> > CC: Mike Turquette <mturquette@linaro.org> > --- Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Regards, Yadwinder > drivers/clk/Kconfig | 6 ++++-- > drivers/clk/clk-s2mps11.c | 5 +++++ > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig > index 5c51115..7f2aef2 100644 > --- a/drivers/clk/Kconfig > +++ b/drivers/clk/Kconfig > @@ -65,10 +65,12 @@ config COMMON_CLK_SI5351 > 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" > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 2262cb4..19c075c 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -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) > @@ -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; > @@ -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); > -- > 1.7.9.5 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD @ 2013-11-11 14:18 ` Yadwinder Singh Brar 0 siblings, 0 replies; 63+ messages in thread From: Yadwinder Singh Brar @ 2013-11-11 14:18 UTC (permalink / raw) To: linux-arm-kernel On Thu, Oct 31, 2013 at 3:48 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > 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> > CC: Yadwinder Singh Brar <yadi.brar@samsung.com> > CC: Mike Turquette <mturquette@linaro.org> > --- Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Regards, Yadwinder > drivers/clk/Kconfig | 6 ++++-- > drivers/clk/clk-s2mps11.c | 5 +++++ > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig > index 5c51115..7f2aef2 100644 > --- a/drivers/clk/Kconfig > +++ b/drivers/clk/Kconfig > @@ -65,10 +65,12 @@ config COMMON_CLK_SI5351 > 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" > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 2262cb4..19c075c 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -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) > @@ -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; > @@ -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); > -- > 1.7.9.5 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD @ 2013-11-11 14:18 ` Yadwinder Singh Brar 0 siblings, 0 replies; 63+ messages in thread From: Yadwinder Singh Brar @ 2013-11-11 14:18 UTC (permalink / raw) To: Tushar Behera Cc: linux-kernel, linux-arm-kernel, linux-samsung-soc, Lee Jones, Yadwinder Singh Brar, Kukjin Kim, Mike Turquette, Patch Tracking On Thu, Oct 31, 2013 at 3:48 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > 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> > CC: Yadwinder Singh Brar <yadi.brar@samsung.com> > CC: Mike Turquette <mturquette@linaro.org> > --- Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Regards, Yadwinder > drivers/clk/Kconfig | 6 ++++-- > drivers/clk/clk-s2mps11.c | 5 +++++ > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig > index 5c51115..7f2aef2 100644 > --- a/drivers/clk/Kconfig > +++ b/drivers/clk/Kconfig > @@ -65,10 +65,12 @@ config COMMON_CLK_SI5351 > 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" > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 2262cb4..19c075c 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -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) > @@ -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; > @@ -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); > -- > 1.7.9.5 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks 2013-10-31 6:48 ` Tushar Behera @ 2013-10-31 6:48 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches S5M8767 chip has 3 crystal oscillators running at 32KHz. These are supported by s2mps11-clk driver. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> CC: Lee Jones <lee.jones@linaro.org> --- drivers/mfd/sec-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 34c18fb..020b86b 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { .name = "s5m8767-pmic", }, { .name = "s5m-rtc", - }, + }, { + .name = "s5m8767-clk", + } }; static struct mfd_cell s2mps11_devs[] = { -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-10-31 6:48 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-arm-kernel S5M8767 chip has 3 crystal oscillators running at 32KHz. These are supported by s2mps11-clk driver. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> CC: Lee Jones <lee.jones@linaro.org> --- drivers/mfd/sec-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 34c18fb..020b86b 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { .name = "s5m8767-pmic", }, { .name = "s5m-rtc", - }, + }, { + .name = "s5m8767-clk", + } }; static struct mfd_cell s2mps11_devs[] = { -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks 2013-10-31 6:48 ` Tushar Behera @ 2013-10-31 16:16 ` Lee Jones -1 siblings, 0 replies; 63+ messages in thread From: Lee Jones @ 2013-10-31 16:16 UTC (permalink / raw) To: Tushar Behera Cc: linux-kernel, linux-arm-kernel, linux-samsung-soc, mturquette, kgene.kim, patches On Thu, 31 Oct 2013, Tushar Behera wrote: > S5M8767 chip has 3 crystal oscillators running at 32KHz. These are > supported by s2mps11-clk driver. > > Signed-off-by: Tushar Behera <tushar.behera@linaro.org> > CC: Lee Jones <lee.jones@linaro.org> > --- > drivers/mfd/sec-core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c > index 34c18fb..020b86b 100644 > --- a/drivers/mfd/sec-core.c > +++ b/drivers/mfd/sec-core.c > @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { > .name = "s5m8767-pmic", > }, { > .name = "s5m-rtc", > - }, > + }, { > + .name = "s5m8767-clk", > + } > }; > > static struct mfd_cell s2mps11_devs[] = { Acked-by: Lee Jones <lee.jones@linaro.org> I'd prefer to take this patch in via the MFD tree once you have support from the other maintainers for the set. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-10-31 16:16 ` Lee Jones 0 siblings, 0 replies; 63+ messages in thread From: Lee Jones @ 2013-10-31 16:16 UTC (permalink / raw) To: linux-arm-kernel On Thu, 31 Oct 2013, Tushar Behera wrote: > S5M8767 chip has 3 crystal oscillators running at 32KHz. These are > supported by s2mps11-clk driver. > > Signed-off-by: Tushar Behera <tushar.behera@linaro.org> > CC: Lee Jones <lee.jones@linaro.org> > --- > drivers/mfd/sec-core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c > index 34c18fb..020b86b 100644 > --- a/drivers/mfd/sec-core.c > +++ b/drivers/mfd/sec-core.c > @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { > .name = "s5m8767-pmic", > }, { > .name = "s5m-rtc", > - }, > + }, { > + .name = "s5m8767-clk", > + } > }; > > static struct mfd_cell s2mps11_devs[] = { Acked-by: Lee Jones <lee.jones@linaro.org> I'd prefer to take this patch in via the MFD tree once you have support from the other maintainers for the set. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks 2013-10-31 16:16 ` Lee Jones (?) @ 2013-11-05 6:29 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-05 6:29 UTC (permalink / raw) To: Lee Jones Cc: lkml, linux-arm-kernel, linux-samsung-soc, Mike Turquette, Kukjin Kim, Patch Tracking On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: > On Thu, 31 Oct 2013, Tushar Behera wrote: > >> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >> supported by s2mps11-clk driver. >> >> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >> CC: Lee Jones <lee.jones@linaro.org> >> --- >> drivers/mfd/sec-core.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >> index 34c18fb..020b86b 100644 >> --- a/drivers/mfd/sec-core.c >> +++ b/drivers/mfd/sec-core.c >> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >> .name = "s5m8767-pmic", >> }, { >> .name = "s5m-rtc", >> - }, >> + }, { >> + .name = "s5m8767-clk", >> + } >> }; >> >> static struct mfd_cell s2mps11_devs[] = { > > Acked-by: Lee Jones <lee.jones@linaro.org> > Thanks. > I'd prefer to take this patch in via the MFD tree once you have > support from the other maintainers for the set. > Ok. I will let you know once I get the clock patches through. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-11-05 6:29 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-05 6:29 UTC (permalink / raw) To: linux-arm-kernel On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: > On Thu, 31 Oct 2013, Tushar Behera wrote: > >> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >> supported by s2mps11-clk driver. >> >> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >> CC: Lee Jones <lee.jones@linaro.org> >> --- >> drivers/mfd/sec-core.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >> index 34c18fb..020b86b 100644 >> --- a/drivers/mfd/sec-core.c >> +++ b/drivers/mfd/sec-core.c >> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >> .name = "s5m8767-pmic", >> }, { >> .name = "s5m-rtc", >> - }, >> + }, { >> + .name = "s5m8767-clk", >> + } >> }; >> >> static struct mfd_cell s2mps11_devs[] = { > > Acked-by: Lee Jones <lee.jones@linaro.org> > Thanks. > I'd prefer to take this patch in via the MFD tree once you have > support from the other maintainers for the set. > Ok. I will let you know once I get the clock patches through. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-11-05 6:29 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-05 6:29 UTC (permalink / raw) To: Lee Jones Cc: lkml, linux-arm-kernel, linux-samsung-soc, Mike Turquette, Kukjin Kim, Patch Tracking On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: > On Thu, 31 Oct 2013, Tushar Behera wrote: > >> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >> supported by s2mps11-clk driver. >> >> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >> CC: Lee Jones <lee.jones@linaro.org> >> --- >> drivers/mfd/sec-core.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >> index 34c18fb..020b86b 100644 >> --- a/drivers/mfd/sec-core.c >> +++ b/drivers/mfd/sec-core.c >> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >> .name = "s5m8767-pmic", >> }, { >> .name = "s5m-rtc", >> - }, >> + }, { >> + .name = "s5m8767-clk", >> + } >> }; >> >> static struct mfd_cell s2mps11_devs[] = { > > Acked-by: Lee Jones <lee.jones@linaro.org> > Thanks. > I'd prefer to take this patch in via the MFD tree once you have > support from the other maintainers for the set. > Ok. I will let you know once I get the clock patches through. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks 2013-11-05 6:29 ` Tushar Behera (?) @ 2013-11-05 7:57 ` Kyungmin Park -1 siblings, 0 replies; 63+ messages in thread From: Kyungmin Park @ 2013-11-05 7:57 UTC (permalink / raw) To: Tushar Behera, k.kozlowski Cc: Lee Jones, Kukjin Kim, Mike Turquette, Patch Tracking, lkml, linux-samsung-soc, linux-arm-kernel On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >> On Thu, 31 Oct 2013, Tushar Behera wrote: >> >>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>> supported by s2mps11-clk driver. >>> >>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>> CC: Lee Jones <lee.jones@linaro.org> >>> --- >>> drivers/mfd/sec-core.c | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>> index 34c18fb..020b86b 100644 >>> --- a/drivers/mfd/sec-core.c >>> +++ b/drivers/mfd/sec-core.c >>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>> .name = "s5m8767-pmic", >>> }, { >>> .name = "s5m-rtc", >>> - }, >>> + }, { >>> + .name = "s5m8767-clk", Do you want to handle these as "clock"? previous time, it's implemented at regulator. please see drivers/regulator/max* series. Thank you, Kyungmin Park >>> + } >>> }; >>> >>> static struct mfd_cell s2mps11_devs[] = { >> >> Acked-by: Lee Jones <lee.jones@linaro.org> >> > > Thanks. > >> I'd prefer to take this patch in via the MFD tree once you have >> support from the other maintainers for the set. >> > > Ok. I will let you know once I get the clock patches through. > > -- > Tushar Behera > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-11-05 7:57 ` Kyungmin Park 0 siblings, 0 replies; 63+ messages in thread From: Kyungmin Park @ 2013-11-05 7:57 UTC (permalink / raw) To: linux-arm-kernel On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >> On Thu, 31 Oct 2013, Tushar Behera wrote: >> >>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>> supported by s2mps11-clk driver. >>> >>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>> CC: Lee Jones <lee.jones@linaro.org> >>> --- >>> drivers/mfd/sec-core.c | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>> index 34c18fb..020b86b 100644 >>> --- a/drivers/mfd/sec-core.c >>> +++ b/drivers/mfd/sec-core.c >>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>> .name = "s5m8767-pmic", >>> }, { >>> .name = "s5m-rtc", >>> - }, >>> + }, { >>> + .name = "s5m8767-clk", Do you want to handle these as "clock"? previous time, it's implemented at regulator. please see drivers/regulator/max* series. Thank you, Kyungmin Park >>> + } >>> }; >>> >>> static struct mfd_cell s2mps11_devs[] = { >> >> Acked-by: Lee Jones <lee.jones@linaro.org> >> > > Thanks. > >> I'd prefer to take this patch in via the MFD tree once you have >> support from the other maintainers for the set. >> > > Ok. I will let you know once I get the clock patches through. > > -- > Tushar Behera > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-11-05 7:57 ` Kyungmin Park 0 siblings, 0 replies; 63+ messages in thread From: Kyungmin Park @ 2013-11-05 7:57 UTC (permalink / raw) To: Tushar Behera, k.kozlowski Cc: Lee Jones, Kukjin Kim, Mike Turquette, Patch Tracking, lkml, linux-samsung-soc, linux-arm-kernel On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >> On Thu, 31 Oct 2013, Tushar Behera wrote: >> >>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>> supported by s2mps11-clk driver. >>> >>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>> CC: Lee Jones <lee.jones@linaro.org> >>> --- >>> drivers/mfd/sec-core.c | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>> index 34c18fb..020b86b 100644 >>> --- a/drivers/mfd/sec-core.c >>> +++ b/drivers/mfd/sec-core.c >>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>> .name = "s5m8767-pmic", >>> }, { >>> .name = "s5m-rtc", >>> - }, >>> + }, { >>> + .name = "s5m8767-clk", Do you want to handle these as "clock"? previous time, it's implemented at regulator. please see drivers/regulator/max* series. Thank you, Kyungmin Park >>> + } >>> }; >>> >>> static struct mfd_cell s2mps11_devs[] = { >> >> Acked-by: Lee Jones <lee.jones@linaro.org> >> > > Thanks. > >> I'd prefer to take this patch in via the MFD tree once you have >> support from the other maintainers for the set. >> > > Ok. I will let you know once I get the clock patches through. > > -- > Tushar Behera > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks 2013-11-05 7:57 ` Kyungmin Park (?) @ 2013-11-05 8:04 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-05 8:04 UTC (permalink / raw) To: Kyungmin Park Cc: k.kozlowski, Lee Jones, Kukjin Kim, Mike Turquette, Patch Tracking, lkml, linux-samsung-soc, linux-arm-kernel On 5 November 2013 13:27, Kyungmin Park <kmpark@infradead.org> wrote: > On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: >> On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >>> On Thu, 31 Oct 2013, Tushar Behera wrote: >>> >>>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>>> supported by s2mps11-clk driver. >>>> >>>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>>> CC: Lee Jones <lee.jones@linaro.org> >>>> --- >>>> drivers/mfd/sec-core.c | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>>> index 34c18fb..020b86b 100644 >>>> --- a/drivers/mfd/sec-core.c >>>> +++ b/drivers/mfd/sec-core.c >>>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>>> .name = "s5m8767-pmic", >>>> }, { >>>> .name = "s5m-rtc", >>>> - }, >>>> + }, { >>>> + .name = "s5m8767-clk", > > Do you want to handle these as "clock"? previous time, it's > implemented at regulator. please see drivers/regulator/max* series. > > Thank you, > Kyungmin Park There is already a clock-implementation available for this kind of device (through clk-s2mps11). I would like to extend that support. Also for MAX77686, it is implemented through clock subsystem. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-11-05 8:04 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-05 8:04 UTC (permalink / raw) To: linux-arm-kernel On 5 November 2013 13:27, Kyungmin Park <kmpark@infradead.org> wrote: > On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: >> On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >>> On Thu, 31 Oct 2013, Tushar Behera wrote: >>> >>>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>>> supported by s2mps11-clk driver. >>>> >>>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>>> CC: Lee Jones <lee.jones@linaro.org> >>>> --- >>>> drivers/mfd/sec-core.c | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>>> index 34c18fb..020b86b 100644 >>>> --- a/drivers/mfd/sec-core.c >>>> +++ b/drivers/mfd/sec-core.c >>>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>>> .name = "s5m8767-pmic", >>>> }, { >>>> .name = "s5m-rtc", >>>> - }, >>>> + }, { >>>> + .name = "s5m8767-clk", > > Do you want to handle these as "clock"? previous time, it's > implemented at regulator. please see drivers/regulator/max* series. > > Thank you, > Kyungmin Park There is already a clock-implementation available for this kind of device (through clk-s2mps11). I would like to extend that support. Also for MAX77686, it is implemented through clock subsystem. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-11-05 8:04 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-05 8:04 UTC (permalink / raw) To: Kyungmin Park Cc: k.kozlowski, Lee Jones, Kukjin Kim, Mike Turquette, Patch Tracking, lkml, linux-samsung-soc, linux-arm-kernel On 5 November 2013 13:27, Kyungmin Park <kmpark@infradead.org> wrote: > On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: >> On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >>> On Thu, 31 Oct 2013, Tushar Behera wrote: >>> >>>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>>> supported by s2mps11-clk driver. >>>> >>>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>>> CC: Lee Jones <lee.jones@linaro.org> >>>> --- >>>> drivers/mfd/sec-core.c | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>>> index 34c18fb..020b86b 100644 >>>> --- a/drivers/mfd/sec-core.c >>>> +++ b/drivers/mfd/sec-core.c >>>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>>> .name = "s5m8767-pmic", >>>> }, { >>>> .name = "s5m-rtc", >>>> - }, >>>> + }, { >>>> + .name = "s5m8767-clk", > > Do you want to handle these as "clock"? previous time, it's > implemented at regulator. please see drivers/regulator/max* series. > > Thank you, > Kyungmin Park There is already a clock-implementation available for this kind of device (through clk-s2mps11). I would like to extend that support. Also for MAX77686, it is implemented through clock subsystem. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks 2013-11-05 8:04 ` Tushar Behera (?) @ 2013-11-05 8:58 ` Kyungmin Park -1 siblings, 0 replies; 63+ messages in thread From: Kyungmin Park @ 2013-11-05 8:58 UTC (permalink / raw) To: Tushar Behera Cc: k.kozlowski, Kukjin Kim, Mike Turquette, Patch Tracking, lkml, linux-samsung-soc, Lee Jones, linux-arm-kernel On Tue, Nov 5, 2013 at 5:04 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > On 5 November 2013 13:27, Kyungmin Park <kmpark@infradead.org> wrote: >> On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: >>> On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >>>> On Thu, 31 Oct 2013, Tushar Behera wrote: >>>> >>>>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>>>> supported by s2mps11-clk driver. >>>>> >>>>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>>>> CC: Lee Jones <lee.jones@linaro.org> >>>>> --- >>>>> drivers/mfd/sec-core.c | 4 +++- >>>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>>>> index 34c18fb..020b86b 100644 >>>>> --- a/drivers/mfd/sec-core.c >>>>> +++ b/drivers/mfd/sec-core.c >>>>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>>>> .name = "s5m8767-pmic", >>>>> }, { >>>>> .name = "s5m-rtc", >>>>> - }, >>>>> + }, { >>>>> + .name = "s5m8767-clk", >> >> Do you want to handle these as "clock"? previous time, it's >> implemented at regulator. please see drivers/regulator/max* series. >> >> Thank you, >> Kyungmin Park > > There is already a clock-implementation available for this kind of > device (through clk-s2mps11). I would like to extend that support. > Also for MAX77686, it is implemented through clock subsystem. > Yes it's possible, but losts of MAX chips are implemented already with regulator. but in case of maxim chip. it's voltage instead of clock. doesn't better to use regulaor? Ah I confused between 32KHz and Safeout. okay it's 32KHz clock. okay it's better to use clock. Ignore previous comments. Thank you, Kyungmin Park ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-11-05 8:58 ` Kyungmin Park 0 siblings, 0 replies; 63+ messages in thread From: Kyungmin Park @ 2013-11-05 8:58 UTC (permalink / raw) To: linux-arm-kernel On Tue, Nov 5, 2013 at 5:04 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > On 5 November 2013 13:27, Kyungmin Park <kmpark@infradead.org> wrote: >> On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: >>> On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >>>> On Thu, 31 Oct 2013, Tushar Behera wrote: >>>> >>>>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>>>> supported by s2mps11-clk driver. >>>>> >>>>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>>>> CC: Lee Jones <lee.jones@linaro.org> >>>>> --- >>>>> drivers/mfd/sec-core.c | 4 +++- >>>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>>>> index 34c18fb..020b86b 100644 >>>>> --- a/drivers/mfd/sec-core.c >>>>> +++ b/drivers/mfd/sec-core.c >>>>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>>>> .name = "s5m8767-pmic", >>>>> }, { >>>>> .name = "s5m-rtc", >>>>> - }, >>>>> + }, { >>>>> + .name = "s5m8767-clk", >> >> Do you want to handle these as "clock"? previous time, it's >> implemented at regulator. please see drivers/regulator/max* series. >> >> Thank you, >> Kyungmin Park > > There is already a clock-implementation available for this kind of > device (through clk-s2mps11). I would like to extend that support. > Also for MAX77686, it is implemented through clock subsystem. > Yes it's possible, but losts of MAX chips are implemented already with regulator. but in case of maxim chip. it's voltage instead of clock. doesn't better to use regulaor? Ah I confused between 32KHz and Safeout. okay it's 32KHz clock. okay it's better to use clock. Ignore previous comments. Thank you, Kyungmin Park ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-11-05 8:58 ` Kyungmin Park 0 siblings, 0 replies; 63+ messages in thread From: Kyungmin Park @ 2013-11-05 8:58 UTC (permalink / raw) To: Tushar Behera Cc: k.kozlowski, Kukjin Kim, Mike Turquette, Patch Tracking, lkml, linux-samsung-soc, Lee Jones, linux-arm-kernel On Tue, Nov 5, 2013 at 5:04 PM, Tushar Behera <tushar.behera@linaro.org> wrote: > On 5 November 2013 13:27, Kyungmin Park <kmpark@infradead.org> wrote: >> On Tue, Nov 5, 2013 at 3:29 PM, Tushar Behera <tushar.behera@linaro.org> wrote: >>> On 31 October 2013 21:46, Lee Jones <lee.jones@linaro.org> wrote: >>>> On Thu, 31 Oct 2013, Tushar Behera wrote: >>>> >>>>> S5M8767 chip has 3 crystal oscillators running at 32KHz. These are >>>>> supported by s2mps11-clk driver. >>>>> >>>>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org> >>>>> CC: Lee Jones <lee.jones@linaro.org> >>>>> --- >>>>> drivers/mfd/sec-core.c | 4 +++- >>>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>>>> index 34c18fb..020b86b 100644 >>>>> --- a/drivers/mfd/sec-core.c >>>>> +++ b/drivers/mfd/sec-core.c >>>>> @@ -56,7 +56,9 @@ static struct mfd_cell s5m8767_devs[] = { >>>>> .name = "s5m8767-pmic", >>>>> }, { >>>>> .name = "s5m-rtc", >>>>> - }, >>>>> + }, { >>>>> + .name = "s5m8767-clk", >> >> Do you want to handle these as "clock"? previous time, it's >> implemented at regulator. please see drivers/regulator/max* series. >> >> Thank you, >> Kyungmin Park > > There is already a clock-implementation available for this kind of > device (through clk-s2mps11). I would like to extend that support. > Also for MAX77686, it is implemented through clock subsystem. > Yes it's possible, but losts of MAX chips are implemented already with regulator. but in case of maxim chip. it's voltage instead of clock. doesn't better to use regulaor? Ah I confused between 32KHz and Safeout. okay it's 32KHz clock. okay it's better to use clock. Ignore previous comments. Thank you, Kyungmin Park ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 4/4] ARM: dts: Add S5M8767 clock nodes on Arndale board 2013-10-31 6:48 ` Tushar Behera @ 2013-10-31 6:48 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches Signed-off-by: Tushar Behera <tushar.behera@linaro.org> CC: Kukjin Kim <kgene.kim@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index b77a37e..34b305d 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -70,6 +70,13 @@ s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, <&gpx2 4 0>, <&gpx2 5 0>; + + s5m8767_osc: clocks { + #clock-cells = <1>; + clock-output-names = "s5m8767_ap", + "s5m8767_cp", "s5m8767_bt"; + }; + regulators { ldo1_reg: LDO1 { regulator-name = "VDD_ALIVE_1.0V"; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH 4/4] ARM: dts: Add S5M8767 clock nodes on Arndale board @ 2013-10-31 6:48 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-10-31 6:48 UTC (permalink / raw) To: linux-arm-kernel Signed-off-by: Tushar Behera <tushar.behera@linaro.org> CC: Kukjin Kim <kgene.kim@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index b77a37e..34b305d 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -70,6 +70,13 @@ s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, <&gpx2 4 0>, <&gpx2 5 0>; + + s5m8767_osc: clocks { + #clock-cells = <1>; + clock-output-names = "s5m8767_ap", + "s5m8767_cp", "s5m8767_bt"; + }; + regulators { ldo1_reg: LDO1 { regulator-name = "VDD_ALIVE_1.0V"; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* Re: [PATCH 0/4] Add support for clocks in S5M8767 2013-10-31 6:48 ` Tushar Behera @ 2013-11-10 12:34 ` Tomasz Figa -1 siblings, 0 replies; 63+ messages in thread From: Tomasz Figa @ 2013-11-10 12:34 UTC (permalink / raw) To: linux-arm-kernel Cc: Tushar Behera, linux-kernel, linux-samsung-soc, lee.jones, kgene.kim, mturquette, patches Hi Tushar, On Thursday 31 of October 2013 12:18:40 Tushar Behera wrote: > S5M8767 chip has 3 crystal oscillators which are operated in the same > as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to > support clocks in S5M8767. > > The patches are based on next-20131030. > > Tushar Behera (4): > clk: clk-s2mps11: Refactor for including support for other MFD clocks > clk: clk-s2mps11: Add support for clocks in S5M8767 MFD > mfd: sec-core: Add cells for S5M8767-clocks > ARM: dts: Add S5M8767 clock nodes on Arndale board > > arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ > drivers/clk/Kconfig | 6 ++++-- > drivers/clk/clk-s2mps11.c | 25 > +++++++++++++++++++++---- drivers/mfd/sec-core.c | > 4 +++- > 4 files changed, 35 insertions(+), 7 deletions(-) For the whole series: Reviewed-by: Tomasz Figa <t.figa@samsung.com> Best regards, Tomasz ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 0/4] Add support for clocks in S5M8767 @ 2013-11-10 12:34 ` Tomasz Figa 0 siblings, 0 replies; 63+ messages in thread From: Tomasz Figa @ 2013-11-10 12:34 UTC (permalink / raw) To: linux-arm-kernel Hi Tushar, On Thursday 31 of October 2013 12:18:40 Tushar Behera wrote: > S5M8767 chip has 3 crystal oscillators which are operated in the same > as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to > support clocks in S5M8767. > > The patches are based on next-20131030. > > Tushar Behera (4): > clk: clk-s2mps11: Refactor for including support for other MFD clocks > clk: clk-s2mps11: Add support for clocks in S5M8767 MFD > mfd: sec-core: Add cells for S5M8767-clocks > ARM: dts: Add S5M8767 clock nodes on Arndale board > > arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ > drivers/clk/Kconfig | 6 ++++-- > drivers/clk/clk-s2mps11.c | 25 > +++++++++++++++++++++---- drivers/mfd/sec-core.c | > 4 +++- > 4 files changed, 35 insertions(+), 7 deletions(-) For the whole series: Reviewed-by: Tomasz Figa <t.figa@samsung.com> Best regards, Tomasz ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 0/4] Add support for clocks in S5M8767 2013-11-10 12:34 ` Tomasz Figa (?) @ 2013-11-11 2:58 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-11 2:58 UTC (permalink / raw) To: Tomasz Figa, Mike Turquette Cc: linux-arm-kernel, lkml, linux-samsung-soc, Lee Jones, Kukjin Kim, Patch Tracking On 10 November 2013 18:04, Tomasz Figa <tomasz.figa@gmail.com> wrote: > Hi Tushar, > > On Thursday 31 of October 2013 12:18:40 Tushar Behera wrote: >> S5M8767 chip has 3 crystal oscillators which are operated in the same >> as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to >> support clocks in S5M8767. >> >> The patches are based on next-20131030. >> >> Tushar Behera (4): >> clk: clk-s2mps11: Refactor for including support for other MFD clocks >> clk: clk-s2mps11: Add support for clocks in S5M8767 MFD >> mfd: sec-core: Add cells for S5M8767-clocks >> ARM: dts: Add S5M8767 clock nodes on Arndale board >> >> arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ >> drivers/clk/Kconfig | 6 ++++-- >> drivers/clk/clk-s2mps11.c | 25 >> +++++++++++++++++++++---- drivers/mfd/sec-core.c | >> 4 +++- >> 4 files changed, 35 insertions(+), 7 deletions(-) > > For the whole series: > > Reviewed-by: Tomasz Figa <t.figa@samsung.com> > > Best regards, > Tomasz > Thanks Tomasz. Mike, Would you please pick up patches 1 and 2? Lee would pick up patch 3 after these patches are merged. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 0/4] Add support for clocks in S5M8767 @ 2013-11-11 2:58 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-11 2:58 UTC (permalink / raw) To: linux-arm-kernel On 10 November 2013 18:04, Tomasz Figa <tomasz.figa@gmail.com> wrote: > Hi Tushar, > > On Thursday 31 of October 2013 12:18:40 Tushar Behera wrote: >> S5M8767 chip has 3 crystal oscillators which are operated in the same >> as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to >> support clocks in S5M8767. >> >> The patches are based on next-20131030. >> >> Tushar Behera (4): >> clk: clk-s2mps11: Refactor for including support for other MFD clocks >> clk: clk-s2mps11: Add support for clocks in S5M8767 MFD >> mfd: sec-core: Add cells for S5M8767-clocks >> ARM: dts: Add S5M8767 clock nodes on Arndale board >> >> arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ >> drivers/clk/Kconfig | 6 ++++-- >> drivers/clk/clk-s2mps11.c | 25 >> +++++++++++++++++++++---- drivers/mfd/sec-core.c | >> 4 +++- >> 4 files changed, 35 insertions(+), 7 deletions(-) > > For the whole series: > > Reviewed-by: Tomasz Figa <t.figa@samsung.com> > > Best regards, > Tomasz > Thanks Tomasz. Mike, Would you please pick up patches 1 and 2? Lee would pick up patch 3 after these patches are merged. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 0/4] Add support for clocks in S5M8767 @ 2013-11-11 2:58 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-11-11 2:58 UTC (permalink / raw) To: Tomasz Figa, Mike Turquette Cc: linux-arm-kernel, lkml, linux-samsung-soc, Lee Jones, Kukjin Kim, Patch Tracking On 10 November 2013 18:04, Tomasz Figa <tomasz.figa@gmail.com> wrote: > Hi Tushar, > > On Thursday 31 of October 2013 12:18:40 Tushar Behera wrote: >> S5M8767 chip has 3 crystal oscillators which are operated in the same >> as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to >> support clocks in S5M8767. >> >> The patches are based on next-20131030. >> >> Tushar Behera (4): >> clk: clk-s2mps11: Refactor for including support for other MFD clocks >> clk: clk-s2mps11: Add support for clocks in S5M8767 MFD >> mfd: sec-core: Add cells for S5M8767-clocks >> ARM: dts: Add S5M8767 clock nodes on Arndale board >> >> arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ >> drivers/clk/Kconfig | 6 ++++-- >> drivers/clk/clk-s2mps11.c | 25 >> +++++++++++++++++++++---- drivers/mfd/sec-core.c | >> 4 +++- >> 4 files changed, 35 insertions(+), 7 deletions(-) > > For the whole series: > > Reviewed-by: Tomasz Figa <t.figa@samsung.com> > > Best regards, > Tomasz > Thanks Tomasz. Mike, Would you please pick up patches 1 and 2? Lee would pick up patch 3 after these patches are merged. -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 0/4] Add support for clocks in S5M8767 2013-11-11 2:58 ` Tushar Behera (?) @ 2013-12-24 8:57 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-24 8:57 UTC (permalink / raw) To: Tomasz Figa, Mike Turquette Cc: linux-arm-kernel, lkml, linux-samsung-soc, Lee Jones, Kukjin Kim, Patch Tracking On 11 November 2013 08:28, Tushar Behera <tushar.behera@linaro.org> wrote: > On 10 November 2013 18:04, Tomasz Figa <tomasz.figa@gmail.com> wrote: >> Hi Tushar, >> >> On Thursday 31 of October 2013 12:18:40 Tushar Behera wrote: >>> S5M8767 chip has 3 crystal oscillators which are operated in the same >>> as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to >>> support clocks in S5M8767. >>> >>> The patches are based on next-20131030. >>> >>> Tushar Behera (4): >>> clk: clk-s2mps11: Refactor for including support for other MFD clocks >>> clk: clk-s2mps11: Add support for clocks in S5M8767 MFD >>> mfd: sec-core: Add cells for S5M8767-clocks >>> ARM: dts: Add S5M8767 clock nodes on Arndale board >>> >>> arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ >>> drivers/clk/Kconfig | 6 ++++-- >>> drivers/clk/clk-s2mps11.c | 25 >>> +++++++++++++++++++++---- drivers/mfd/sec-core.c | >>> 4 +++- >>> 4 files changed, 35 insertions(+), 7 deletions(-) >> >> For the whole series: >> >> Reviewed-by: Tomasz Figa <t.figa@samsung.com> >> >> Best regards, >> Tomasz >> > > Thanks Tomasz. > > Mike, > > Would you please pick up patches 1 and 2? Lee would pick up patch 3 > after these patches are merged. > > -- > Tushar Behera Mike, Would you please take patches 1 and 2 during this merge window? -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH 0/4] Add support for clocks in S5M8767 @ 2013-12-24 8:57 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-24 8:57 UTC (permalink / raw) To: linux-arm-kernel On 11 November 2013 08:28, Tushar Behera <tushar.behera@linaro.org> wrote: > On 10 November 2013 18:04, Tomasz Figa <tomasz.figa@gmail.com> wrote: >> Hi Tushar, >> >> On Thursday 31 of October 2013 12:18:40 Tushar Behera wrote: >>> S5M8767 chip has 3 crystal oscillators which are operated in the same >>> as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to >>> support clocks in S5M8767. >>> >>> The patches are based on next-20131030. >>> >>> Tushar Behera (4): >>> clk: clk-s2mps11: Refactor for including support for other MFD clocks >>> clk: clk-s2mps11: Add support for clocks in S5M8767 MFD >>> mfd: sec-core: Add cells for S5M8767-clocks >>> ARM: dts: Add S5M8767 clock nodes on Arndale board >>> >>> arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ >>> drivers/clk/Kconfig | 6 ++++-- >>> drivers/clk/clk-s2mps11.c | 25 >>> +++++++++++++++++++++---- drivers/mfd/sec-core.c | >>> 4 +++- >>> 4 files changed, 35 insertions(+), 7 deletions(-) >> >> For the whole series: >> >> Reviewed-by: Tomasz Figa <t.figa@samsung.com> >> >> Best regards, >> Tomasz >> > > Thanks Tomasz. > > Mike, > > Would you please pick up patches 1 and 2? Lee would pick up patch 3 > after these patches are merged. > > -- > Tushar Behera Mike, Would you please take patches 1 and 2 during this merge window? -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH 0/4] Add support for clocks in S5M8767 @ 2013-12-24 8:57 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-24 8:57 UTC (permalink / raw) To: Tomasz Figa, Mike Turquette Cc: Kukjin Kim, Patch Tracking, lkml, linux-samsung-soc, Lee Jones, linux-arm-kernel On 11 November 2013 08:28, Tushar Behera <tushar.behera@linaro.org> wrote: > On 10 November 2013 18:04, Tomasz Figa <tomasz.figa@gmail.com> wrote: >> Hi Tushar, >> >> On Thursday 31 of October 2013 12:18:40 Tushar Behera wrote: >>> S5M8767 chip has 3 crystal oscillators which are operated in the same >>> as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to >>> support clocks in S5M8767. >>> >>> The patches are based on next-20131030. >>> >>> Tushar Behera (4): >>> clk: clk-s2mps11: Refactor for including support for other MFD clocks >>> clk: clk-s2mps11: Add support for clocks in S5M8767 MFD >>> mfd: sec-core: Add cells for S5M8767-clocks >>> ARM: dts: Add S5M8767 clock nodes on Arndale board >>> >>> arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ >>> drivers/clk/Kconfig | 6 ++++-- >>> drivers/clk/clk-s2mps11.c | 25 >>> +++++++++++++++++++++---- drivers/mfd/sec-core.c | >>> 4 +++- >>> 4 files changed, 35 insertions(+), 7 deletions(-) >> >> For the whole series: >> >> Reviewed-by: Tomasz Figa <t.figa@samsung.com> >> >> Best regards, >> Tomasz >> > > Thanks Tomasz. > > Mike, > > Would you please pick up patches 1 and 2? Lee would pick up patch 3 > after these patches are merged. > > -- > Tushar Behera Mike, Would you please take patches 1 and 2 during this merge window? -- Tushar Behera ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 0/4] Add support for clocks in S5M8767 2013-10-31 6:48 ` Tushar Behera @ 2013-12-26 10:18 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:18 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches S5M8767 chip has 3 crystal oscillators which are operated in the same as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to support clocks in S5M8767. The earlier set of patches no longer apply cleanly on linux-next, hence rebased them on top of next-20131224. Tushar Behera (4): clk: clk-s2mps11: Refactor for including support for other MFD clocks clk: clk-s2mps11: Add support for clocks in S5M8767 MFD mfd: sec-core: Add cells for S5M8767-clocks ARM: dts: Add S5M8767 clock nodes on Arndale board arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 25 +++++++++++++++++++++---- drivers/mfd/sec-core.c | 4 +++- 4 files changed, 35 insertions(+), 7 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 0/4] Add support for clocks in S5M8767 @ 2013-12-26 10:18 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:18 UTC (permalink / raw) To: linux-arm-kernel S5M8767 chip has 3 crystal oscillators which are operated in the same as the crystal oscillators in S2MPS11. Extend s2mps11-clk driver to support clocks in S5M8767. The earlier set of patches no longer apply cleanly on linux-next, hence rebased them on top of next-20131224. Tushar Behera (4): clk: clk-s2mps11: Refactor for including support for other MFD clocks clk: clk-s2mps11: Add support for clocks in S5M8767 MFD mfd: sec-core: Add cells for S5M8767-clocks ARM: dts: Add S5M8767 clock nodes on Arndale board arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 25 +++++++++++++++++++++---- drivers/mfd/sec-core.c | 4 +++- 4 files changed, 35 insertions(+), 7 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks 2013-12-26 10:18 ` Tushar Behera (?) @ 2013-12-26 10:18 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:18 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches The clocks in S2MPS11 and S5M8767 are managed in the same way, baring a difference in the register offset. It would be better to update existing S2MPS11 driver to support the clocks in S5M8767, rather than creating an almost duplicate driver altogether. 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> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 00a3abe..43e25bb 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -48,6 +48,7 @@ struct s2mps11_clk { struct clk_lookup *lookup; u32 mask; bool enabled; + unsigned int reg; }; static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) int ret; ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, - S2MPS11_REG_RTC_CTRL, + s2mps11->reg, s2mps11->mask, s2mps11->mask); if (!ret) s2mps11->enabled = true; @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); int ret; - ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, S2MPS11_REG_RTC_CTRL, + ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, s2mps11->reg, s2mps11->mask, ~s2mps11->mask); if (!ret) @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; struct device_node *clk_np = NULL; + unsigned int s2mps11_reg; int i, ret = 0; u32 val; @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) if (IS_ERR(clk_np)) return PTR_ERR(clk_np); + switch(platform_get_device_id(pdev)->driver_data) { + case S2MPS11X: + s2mps11_reg = S2MPS11_REG_RTC_CTRL; + break; + default: + dev_err(&pdev->dev, "Invalid device type\n"); + return -EINVAL; + }; + for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { s2mps11_clk->iodev = iodev; s2mps11_clk->hw.init = &s2mps11_clks_init[i]; s2mps11_clk->mask = 1 << i; + s2mps11_clk->reg = s2mps11_reg; ret = regmap_read(s2mps11_clk->iodev->regmap_pmic, - S2MPS11_REG_RTC_CTRL, &val); + s2mps11_clk->reg, &val); if (ret < 0) goto err_reg; @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) } static const struct platform_device_id s2mps11_clk_id[] = { - { "s2mps11-clk", 0}, + { "s2mps11-clk", S2MPS11X}, { }, }; MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-26 10:18 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:18 UTC (permalink / raw) To: linux-arm-kernel The clocks in S2MPS11 and S5M8767 are managed in the same way, baring a difference in the register offset. It would be better to update existing S2MPS11 driver to support the clocks in S5M8767, rather than creating an almost duplicate driver altogether. 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> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 00a3abe..43e25bb 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -48,6 +48,7 @@ struct s2mps11_clk { struct clk_lookup *lookup; u32 mask; bool enabled; + unsigned int reg; }; static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) int ret; ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, - S2MPS11_REG_RTC_CTRL, + s2mps11->reg, s2mps11->mask, s2mps11->mask); if (!ret) s2mps11->enabled = true; @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); int ret; - ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, S2MPS11_REG_RTC_CTRL, + ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, s2mps11->reg, s2mps11->mask, ~s2mps11->mask); if (!ret) @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; struct device_node *clk_np = NULL; + unsigned int s2mps11_reg; int i, ret = 0; u32 val; @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) if (IS_ERR(clk_np)) return PTR_ERR(clk_np); + switch(platform_get_device_id(pdev)->driver_data) { + case S2MPS11X: + s2mps11_reg = S2MPS11_REG_RTC_CTRL; + break; + default: + dev_err(&pdev->dev, "Invalid device type\n"); + return -EINVAL; + }; + for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { s2mps11_clk->iodev = iodev; s2mps11_clk->hw.init = &s2mps11_clks_init[i]; s2mps11_clk->mask = 1 << i; + s2mps11_clk->reg = s2mps11_reg; ret = regmap_read(s2mps11_clk->iodev->regmap_pmic, - S2MPS11_REG_RTC_CTRL, &val); + s2mps11_clk->reg, &val); if (ret < 0) goto err_reg; @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) } static const struct platform_device_id s2mps11_clk_id[] = { - { "s2mps11-clk", 0}, + { "s2mps11-clk", S2MPS11X}, { }, }; MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-26 10:18 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:18 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: lee.jones, kgene.kim, mturquette, patches The clocks in S2MPS11 and S5M8767 are managed in the same way, baring a difference in the register offset. It would be better to update existing S2MPS11 driver to support the clocks in S5M8767, rather than creating an almost duplicate driver altogether. 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> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 00a3abe..43e25bb 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -48,6 +48,7 @@ struct s2mps11_clk { struct clk_lookup *lookup; u32 mask; bool enabled; + unsigned int reg; }; static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) int ret; ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, - S2MPS11_REG_RTC_CTRL, + s2mps11->reg, s2mps11->mask, s2mps11->mask); if (!ret) s2mps11->enabled = true; @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); int ret; - ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, S2MPS11_REG_RTC_CTRL, + ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, s2mps11->reg, s2mps11->mask, ~s2mps11->mask); if (!ret) @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; struct device_node *clk_np = NULL; + unsigned int s2mps11_reg; int i, ret = 0; u32 val; @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) if (IS_ERR(clk_np)) return PTR_ERR(clk_np); + switch(platform_get_device_id(pdev)->driver_data) { + case S2MPS11X: + s2mps11_reg = S2MPS11_REG_RTC_CTRL; + break; + default: + dev_err(&pdev->dev, "Invalid device type\n"); + return -EINVAL; + }; + for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { s2mps11_clk->iodev = iodev; s2mps11_clk->hw.init = &s2mps11_clks_init[i]; s2mps11_clk->mask = 1 << i; + s2mps11_clk->reg = s2mps11_reg; ret = regmap_read(s2mps11_clk->iodev->regmap_pmic, - S2MPS11_REG_RTC_CTRL, &val); + s2mps11_clk->reg, &val); if (ret < 0) goto err_reg; @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) } static const struct platform_device_id s2mps11_clk_id[] = { - { "s2mps11-clk", 0}, + { "s2mps11-clk", S2MPS11X}, { }, }; MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks 2013-12-26 10:18 ` Tushar Behera (?) @ 2013-12-29 22:17 ` Mike Turquette -1 siblings, 0 replies; 63+ messages in thread From: Mike Turquette @ 2013-12-29 22:17 UTC (permalink / raw) To: Tushar Behera, linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: lee.jones, kgene.kim, patches Quoting Tushar Behera (2013-12-26 02:18:58) > The clocks in S2MPS11 and S5M8767 are managed in the same way, baring > a difference in the register offset. It would be better to update > existing S2MPS11 driver to support the clocks in S5M8767, rather than > creating an almost duplicate driver altogether. Can you rebase patches #1 & #2 onto clk-next? They do not apply cleanly as-is. Regards, Mike > > 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> > CC: Mike Turquette <mturquette@linaro.org> > --- > drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 00a3abe..43e25bb 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -48,6 +48,7 @@ struct s2mps11_clk { > struct clk_lookup *lookup; > u32 mask; > bool enabled; > + unsigned int reg; > }; > > static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) > @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) > int ret; > > ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, > - S2MPS11_REG_RTC_CTRL, > + s2mps11->reg, > s2mps11->mask, s2mps11->mask); > if (!ret) > s2mps11->enabled = true; > @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) > struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); > int ret; > > - ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, S2MPS11_REG_RTC_CTRL, > + ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, s2mps11->reg, > s2mps11->mask, ~s2mps11->mask); > > if (!ret) > @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); > struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; > struct device_node *clk_np = NULL; > + unsigned int s2mps11_reg; > int i, ret = 0; > u32 val; > > @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > if (IS_ERR(clk_np)) > return PTR_ERR(clk_np); > > + switch(platform_get_device_id(pdev)->driver_data) { > + case S2MPS11X: > + s2mps11_reg = S2MPS11_REG_RTC_CTRL; > + break; > + default: > + dev_err(&pdev->dev, "Invalid device type\n"); > + return -EINVAL; > + }; > + > for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { > s2mps11_clk->iodev = iodev; > s2mps11_clk->hw.init = &s2mps11_clks_init[i]; > s2mps11_clk->mask = 1 << i; > + s2mps11_clk->reg = s2mps11_reg; > > ret = regmap_read(s2mps11_clk->iodev->regmap_pmic, > - S2MPS11_REG_RTC_CTRL, &val); > + s2mps11_clk->reg, &val); > if (ret < 0) > goto err_reg; > > @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) > } > > static const struct platform_device_id s2mps11_clk_id[] = { > - { "s2mps11-clk", 0}, > + { "s2mps11-clk", S2MPS11X}, > { }, > }; > MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); > -- > 1.7.9.5 > ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-29 22:17 ` Mike Turquette 0 siblings, 0 replies; 63+ messages in thread From: Mike Turquette @ 2013-12-29 22:17 UTC (permalink / raw) To: linux-arm-kernel Quoting Tushar Behera (2013-12-26 02:18:58) > The clocks in S2MPS11 and S5M8767 are managed in the same way, baring > a difference in the register offset. It would be better to update > existing S2MPS11 driver to support the clocks in S5M8767, rather than > creating an almost duplicate driver altogether. Can you rebase patches #1 & #2 onto clk-next? They do not apply cleanly as-is. Regards, Mike > > 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> > CC: Mike Turquette <mturquette@linaro.org> > --- > drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 00a3abe..43e25bb 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -48,6 +48,7 @@ struct s2mps11_clk { > struct clk_lookup *lookup; > u32 mask; > bool enabled; > + unsigned int reg; > }; > > static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) > @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) > int ret; > > ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, > - S2MPS11_REG_RTC_CTRL, > + s2mps11->reg, > s2mps11->mask, s2mps11->mask); > if (!ret) > s2mps11->enabled = true; > @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) > struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); > int ret; > > - ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, S2MPS11_REG_RTC_CTRL, > + ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, s2mps11->reg, > s2mps11->mask, ~s2mps11->mask); > > if (!ret) > @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); > struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; > struct device_node *clk_np = NULL; > + unsigned int s2mps11_reg; > int i, ret = 0; > u32 val; > > @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > if (IS_ERR(clk_np)) > return PTR_ERR(clk_np); > > + switch(platform_get_device_id(pdev)->driver_data) { > + case S2MPS11X: > + s2mps11_reg = S2MPS11_REG_RTC_CTRL; > + break; > + default: > + dev_err(&pdev->dev, "Invalid device type\n"); > + return -EINVAL; > + }; > + > for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { > s2mps11_clk->iodev = iodev; > s2mps11_clk->hw.init = &s2mps11_clks_init[i]; > s2mps11_clk->mask = 1 << i; > + s2mps11_clk->reg = s2mps11_reg; > > ret = regmap_read(s2mps11_clk->iodev->regmap_pmic, > - S2MPS11_REG_RTC_CTRL, &val); > + s2mps11_clk->reg, &val); > if (ret < 0) > goto err_reg; > > @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) > } > > static const struct platform_device_id s2mps11_clk_id[] = { > - { "s2mps11-clk", 0}, > + { "s2mps11-clk", S2MPS11X}, > { }, > }; > MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); > -- > 1.7.9.5 > ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-29 22:17 ` Mike Turquette 0 siblings, 0 replies; 63+ messages in thread From: Mike Turquette @ 2013-12-29 22:17 UTC (permalink / raw) To: Tushar Behera, linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: kgene.kim, lee.jones, patches Quoting Tushar Behera (2013-12-26 02:18:58) > The clocks in S2MPS11 and S5M8767 are managed in the same way, baring > a difference in the register offset. It would be better to update > existing S2MPS11 driver to support the clocks in S5M8767, rather than > creating an almost duplicate driver altogether. Can you rebase patches #1 & #2 onto clk-next? They do not apply cleanly as-is. Regards, Mike > > 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> > CC: Mike Turquette <mturquette@linaro.org> > --- > drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c > index 00a3abe..43e25bb 100644 > --- a/drivers/clk/clk-s2mps11.c > +++ b/drivers/clk/clk-s2mps11.c > @@ -48,6 +48,7 @@ struct s2mps11_clk { > struct clk_lookup *lookup; > u32 mask; > bool enabled; > + unsigned int reg; > }; > > static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) > @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) > int ret; > > ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, > - S2MPS11_REG_RTC_CTRL, > + s2mps11->reg, > s2mps11->mask, s2mps11->mask); > if (!ret) > s2mps11->enabled = true; > @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) > struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); > int ret; > > - ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, S2MPS11_REG_RTC_CTRL, > + ret = regmap_update_bits(s2mps11->iodev->regmap_pmic, s2mps11->reg, > s2mps11->mask, ~s2mps11->mask); > > if (!ret) > @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); > struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; > struct device_node *clk_np = NULL; > + unsigned int s2mps11_reg; > int i, ret = 0; > u32 val; > > @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) > if (IS_ERR(clk_np)) > return PTR_ERR(clk_np); > > + switch(platform_get_device_id(pdev)->driver_data) { > + case S2MPS11X: > + s2mps11_reg = S2MPS11_REG_RTC_CTRL; > + break; > + default: > + dev_err(&pdev->dev, "Invalid device type\n"); > + return -EINVAL; > + }; > + > for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { > s2mps11_clk->iodev = iodev; > s2mps11_clk->hw.init = &s2mps11_clks_init[i]; > s2mps11_clk->mask = 1 << i; > + s2mps11_clk->reg = s2mps11_reg; > > ret = regmap_read(s2mps11_clk->iodev->regmap_pmic, > - S2MPS11_REG_RTC_CTRL, &val); > + s2mps11_clk->reg, &val); > if (ret < 0) > goto err_reg; > > @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) > } > > static const struct platform_device_id s2mps11_clk_id[] = { > - { "s2mps11-clk", 0}, > + { "s2mps11-clk", S2MPS11X}, > { }, > }; > MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); > -- > 1.7.9.5 > ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks 2013-12-29 22:17 ` Mike Turquette (?) @ 2013-12-30 4:03 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-30 4:03 UTC (permalink / raw) To: Mike Turquette Cc: lkml, linux-arm-kernel, linux-samsung-soc, Lee Jones, Kgene Kim, Patch Tracking, Mark Brown [-- Attachment #1: Type: text/plain, Size: 916 bytes --] On 30 December 2013 03:47, Mike Turquette <mturquette@linaro.org> wrote: > Quoting Tushar Behera (2013-12-26 02:18:58) >> The clocks in S2MPS11 and S5M8767 are managed in the same way, baring >> a difference in the register offset. It would be better to update >> existing S2MPS11 driver to support the clocks in S5M8767, rather than >> creating an almost duplicate driver altogether. > > Can you rebase patches #1 & #2 onto clk-next? They do not apply cleanly > as-is. > > Regards, > Mike > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename in sec-core.c" is also touching this file, which is in Mark's tree right now. If I rebase this patch on top clk-next, I am getting conflicts when I merge that with linux-next. Let me know how you want to handle this. I am attaching the rebased patches for your reference. If you want, I will send them again through git-send-email. -- Tushar Behera [-- Attachment #2: 0001-clk-clk-s2mps11-Refactor-for-including-support-for-o.patch --] [-- Type: text/x-patch, Size: 2904 bytes --] From f4f730d4bea3848d21e487aa08ff019c588e6ecd Mon Sep 17 00:00:00 2001 From: Tushar Behera <tushar.behera@linaro.org> Date: Wed, 30 Oct 2013 15:55:44 +0530 Subject: [PATCH 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks The clocks in S2MPS11 and S5M8767 are managed in the same way, baring a difference in the register offset. It would be better to update existing S2MPS11 driver to support the clocks in S5M8767, rather than to create an almost duplicate driver altogether. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> --- drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 7be41e6..494d1df 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -48,6 +48,7 @@ struct s2mps11_clk { struct clk_lookup *lookup; u32 mask; bool enabled; + unsigned int reg; }; static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) int ret; ret = regmap_update_bits(s2mps11->iodev->regmap, - S2MPS11_REG_RTC_CTRL, + s2mps11->reg, s2mps11->mask, s2mps11->mask); if (!ret) s2mps11->enabled = true; @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); int ret; - ret = regmap_update_bits(s2mps11->iodev->regmap, S2MPS11_REG_RTC_CTRL, + ret = regmap_update_bits(s2mps11->iodev->regmap, s2mps11->reg, s2mps11->mask, ~s2mps11->mask); if (!ret) @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; struct device_node *clk_np = NULL; + unsigned int s2mps11_reg; int i, ret = 0; u32 val; @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) if (IS_ERR(clk_np)) return PTR_ERR(clk_np); + switch(platform_get_device_id(pdev)->driver_data) { + case S2MPS11X: + s2mps11_reg = S2MPS11_REG_RTC_CTRL; + break; + default: + dev_err(&pdev->dev, "Invalid device type\n"); + return -EINVAL; + }; + for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { s2mps11_clk->iodev = iodev; s2mps11_clk->hw.init = &s2mps11_clks_init[i]; s2mps11_clk->mask = 1 << i; + s2mps11_clk->reg = s2mps11_reg; ret = regmap_read(s2mps11_clk->iodev->regmap, - S2MPS11_REG_RTC_CTRL, &val); + s2mps11_clk->reg, &val); if (ret < 0) goto err_reg; @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) } static const struct platform_device_id s2mps11_clk_id[] = { - { "s2mps11-clk", 0}, + { "s2mps11-clk", S2MPS11X}, { }, }; MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); -- 1.7.9.5 [-- Attachment #3: 0002-clk-clk-s2mps11-Add-support-for-clocks-in-S5M8767-MF.patch --] [-- Type: text/x-patch, Size: 2224 bytes --] From 5f3843da7bc71d126c0cce7a8e88aab1850c4b9c Mon Sep 17 00:00:00 2001 From: Tushar Behera <tushar.behera@linaro.org> Date: Wed, 30 Oct 2013 15:56:27 +0530 Subject: [PATCH 2/4] 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> --- drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 407cffb..99332da 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -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" diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 494d1df..37e7285 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -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) @@ -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; @@ -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); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-30 4:03 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-30 4:03 UTC (permalink / raw) To: linux-arm-kernel On 30 December 2013 03:47, Mike Turquette <mturquette@linaro.org> wrote: > Quoting Tushar Behera (2013-12-26 02:18:58) >> The clocks in S2MPS11 and S5M8767 are managed in the same way, baring >> a difference in the register offset. It would be better to update >> existing S2MPS11 driver to support the clocks in S5M8767, rather than >> creating an almost duplicate driver altogether. > > Can you rebase patches #1 & #2 onto clk-next? They do not apply cleanly > as-is. > > Regards, > Mike > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename in sec-core.c" is also touching this file, which is in Mark's tree right now. If I rebase this patch on top clk-next, I am getting conflicts when I merge that with linux-next. Let me know how you want to handle this. I am attaching the rebased patches for your reference. If you want, I will send them again through git-send-email. -- Tushar Behera -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-clk-clk-s2mps11-Refactor-for-including-support-for-o.patch Type: text/x-patch Size: 2904 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131230/fbd9b99e/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-clk-clk-s2mps11-Add-support-for-clocks-in-S5M8767-MF.patch Type: text/x-patch Size: 2224 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131230/fbd9b99e/attachment-0001.bin> ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-30 4:03 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-30 4:03 UTC (permalink / raw) To: Mike Turquette Cc: lkml, linux-arm-kernel, linux-samsung-soc, Lee Jones, Kgene Kim, Patch Tracking, Mark Brown [-- Attachment #1: Type: text/plain, Size: 916 bytes --] On 30 December 2013 03:47, Mike Turquette <mturquette@linaro.org> wrote: > Quoting Tushar Behera (2013-12-26 02:18:58) >> The clocks in S2MPS11 and S5M8767 are managed in the same way, baring >> a difference in the register offset. It would be better to update >> existing S2MPS11 driver to support the clocks in S5M8767, rather than >> creating an almost duplicate driver altogether. > > Can you rebase patches #1 & #2 onto clk-next? They do not apply cleanly > as-is. > > Regards, > Mike > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename in sec-core.c" is also touching this file, which is in Mark's tree right now. If I rebase this patch on top clk-next, I am getting conflicts when I merge that with linux-next. Let me know how you want to handle this. I am attaching the rebased patches for your reference. If you want, I will send them again through git-send-email. -- Tushar Behera [-- Attachment #2: 0001-clk-clk-s2mps11-Refactor-for-including-support-for-o.patch --] [-- Type: text/x-patch, Size: 2904 bytes --] From f4f730d4bea3848d21e487aa08ff019c588e6ecd Mon Sep 17 00:00:00 2001 From: Tushar Behera <tushar.behera@linaro.org> Date: Wed, 30 Oct 2013 15:55:44 +0530 Subject: [PATCH 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks The clocks in S2MPS11 and S5M8767 are managed in the same way, baring a difference in the register offset. It would be better to update existing S2MPS11 driver to support the clocks in S5M8767, rather than to create an almost duplicate driver altogether. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> --- drivers/clk/clk-s2mps11.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 7be41e6..494d1df 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -48,6 +48,7 @@ struct s2mps11_clk { struct clk_lookup *lookup; u32 mask; bool enabled; + unsigned int reg; }; static struct s2mps11_clk *to_s2mps11_clk(struct clk_hw *hw) @@ -61,7 +62,7 @@ static int s2mps11_clk_prepare(struct clk_hw *hw) int ret; ret = regmap_update_bits(s2mps11->iodev->regmap, - S2MPS11_REG_RTC_CTRL, + s2mps11->reg, s2mps11->mask, s2mps11->mask); if (!ret) s2mps11->enabled = true; @@ -74,7 +75,7 @@ static void s2mps11_clk_unprepare(struct clk_hw *hw) struct s2mps11_clk *s2mps11 = to_s2mps11_clk(hw); int ret; - ret = regmap_update_bits(s2mps11->iodev->regmap, S2MPS11_REG_RTC_CTRL, + ret = regmap_update_bits(s2mps11->iodev->regmap, s2mps11->reg, s2mps11->mask, ~s2mps11->mask); if (!ret) @@ -155,6 +156,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev) struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); struct s2mps11_clk *s2mps11_clks, *s2mps11_clk; struct device_node *clk_np = NULL; + unsigned int s2mps11_reg; int i, ret = 0; u32 val; @@ -169,13 +171,23 @@ static int s2mps11_clk_probe(struct platform_device *pdev) if (IS_ERR(clk_np)) return PTR_ERR(clk_np); + switch(platform_get_device_id(pdev)->driver_data) { + case S2MPS11X: + s2mps11_reg = S2MPS11_REG_RTC_CTRL; + break; + default: + dev_err(&pdev->dev, "Invalid device type\n"); + return -EINVAL; + }; + for (i = 0; i < S2MPS11_CLKS_NUM; i++, s2mps11_clk++) { s2mps11_clk->iodev = iodev; s2mps11_clk->hw.init = &s2mps11_clks_init[i]; s2mps11_clk->mask = 1 << i; + s2mps11_clk->reg = s2mps11_reg; ret = regmap_read(s2mps11_clk->iodev->regmap, - S2MPS11_REG_RTC_CTRL, &val); + s2mps11_clk->reg, &val); if (ret < 0) goto err_reg; @@ -241,7 +253,7 @@ static int s2mps11_clk_remove(struct platform_device *pdev) } static const struct platform_device_id s2mps11_clk_id[] = { - { "s2mps11-clk", 0}, + { "s2mps11-clk", S2MPS11X}, { }, }; MODULE_DEVICE_TABLE(platform, s2mps11_clk_id); -- 1.7.9.5 [-- Attachment #3: 0002-clk-clk-s2mps11-Add-support-for-clocks-in-S5M8767-MF.patch --] [-- Type: text/x-patch, Size: 2224 bytes --] From 5f3843da7bc71d126c0cce7a8e88aab1850c4b9c Mon Sep 17 00:00:00 2001 From: Tushar Behera <tushar.behera@linaro.org> Date: Wed, 30 Oct 2013 15:56:27 +0530 Subject: [PATCH 2/4] 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> --- drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 407cffb..99332da 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -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" diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 494d1df..37e7285 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -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) @@ -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; @@ -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); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks 2013-12-30 4:03 ` Tushar Behera (?) @ 2013-12-31 16:09 ` Mark Brown -1 siblings, 0 replies; 63+ messages in thread From: Mark Brown @ 2013-12-31 16:09 UTC (permalink / raw) To: Tushar Behera Cc: Mike Turquette, lkml, linux-arm-kernel, linux-samsung-soc, Lee Jones, Kgene Kim, Patch Tracking [-- Attachment #1: Type: text/plain, Size: 274 bytes --] On Mon, Dec 30, 2013 at 09:33:50AM +0530, Tushar Behera wrote: > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename > in sec-core.c" is also touching this file, which is in Mark's tree > right now. If I rebase It's been in Linus' tree for a while now. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-31 16:09 ` Mark Brown 0 siblings, 0 replies; 63+ messages in thread From: Mark Brown @ 2013-12-31 16:09 UTC (permalink / raw) To: linux-arm-kernel On Mon, Dec 30, 2013 at 09:33:50AM +0530, Tushar Behera wrote: > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename > in sec-core.c" is also touching this file, which is in Mark's tree > right now. If I rebase It's been in Linus' tree for a while now. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131231/154498c4/attachment.sig> ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-31 16:09 ` Mark Brown 0 siblings, 0 replies; 63+ messages in thread From: Mark Brown @ 2013-12-31 16:09 UTC (permalink / raw) To: Tushar Behera Cc: Mike Turquette, lkml, linux-arm-kernel, linux-samsung-soc, Lee Jones, Kgene Kim, Patch Tracking [-- Attachment #1: Type: text/plain, Size: 274 bytes --] On Mon, Dec 30, 2013 at 09:33:50AM +0530, Tushar Behera wrote: > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename > in sec-core.c" is also touching this file, which is in Mark's tree > right now. If I rebase It's been in Linus' tree for a while now. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks 2013-12-31 16:09 ` Mark Brown (?) @ 2013-12-31 19:13 ` Mike Turquette -1 siblings, 0 replies; 63+ messages in thread From: Mike Turquette @ 2013-12-31 19:13 UTC (permalink / raw) To: Mark Brown, Tushar Behera Cc: lkml, linux-arm-kernel, linux-samsung-soc, Lee Jones, Kgene Kim, Patch Tracking Quoting Mark Brown (2013-12-31 08:09:16) > On Mon, Dec 30, 2013 at 09:33:50AM +0530, Tushar Behera wrote: > > > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename > > in sec-core.c" is also touching this file, which is in Mark's tree > > right now. If I rebase > > It's been in Linus' tree for a while now. OK, so I merged the two patches into clk-next, then merged clk-next into next-20131224 and the merge is super trivial to resolve. So I propose that we just let it get resolved in linux-next the usual way. Any objections? If not I'll take these two patches into clk-next. Regards, Mike ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-31 19:13 ` Mike Turquette 0 siblings, 0 replies; 63+ messages in thread From: Mike Turquette @ 2013-12-31 19:13 UTC (permalink / raw) To: linux-arm-kernel Quoting Mark Brown (2013-12-31 08:09:16) > On Mon, Dec 30, 2013 at 09:33:50AM +0530, Tushar Behera wrote: > > > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename > > in sec-core.c" is also touching this file, which is in Mark's tree > > right now. If I rebase > > It's been in Linus' tree for a while now. OK, so I merged the two patches into clk-next, then merged clk-next into next-20131224 and the merge is super trivial to resolve. So I propose that we just let it get resolved in linux-next the usual way. Any objections? If not I'll take these two patches into clk-next. Regards, Mike ^ permalink raw reply [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks @ 2013-12-31 19:13 ` Mike Turquette 0 siblings, 0 replies; 63+ messages in thread From: Mike Turquette @ 2013-12-31 19:13 UTC (permalink / raw) To: Mark Brown, Tushar Behera Cc: lkml, linux-arm-kernel, linux-samsung-soc, Lee Jones, Kgene Kim, Patch Tracking Quoting Mark Brown (2013-12-31 08:09:16) > On Mon, Dec 30, 2013 at 09:33:50AM +0530, Tushar Behera wrote: > > > Commit 1b1ccee1e821 "mfd: s2mps11: Fix build after regmap field rename > > in sec-core.c" is also touching this file, which is in Mark's tree > > right now. If I rebase > > It's been in Linus' tree for a while now. OK, so I merged the two patches into clk-next, then merged clk-next into next-20131224 and the merge is super trivial to resolve. So I propose that we just let it get resolved in linux-next the usual way. Any objections? If not I'll take these two patches into clk-next. Regards, Mike ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD 2013-12-26 10:18 ` Tushar Behera @ 2013-12-26 10:18 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:18 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches 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> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 3089f05..87e6c56 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -75,10 +75,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" diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 43e25bb..f4c1f08 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -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) @@ -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; @@ -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); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH RESEND 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD @ 2013-12-26 10:18 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:18 UTC (permalink / raw) To: linux-arm-kernel 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> CC: Mike Turquette <mturquette@linaro.org> --- drivers/clk/Kconfig | 6 ++++-- drivers/clk/clk-s2mps11.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 3089f05..87e6c56 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -75,10 +75,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" diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 43e25bb..f4c1f08 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -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) @@ -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; @@ -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); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH RESEND 3/4] mfd: sec-core: Add cells for S5M8767-clocks 2013-12-26 10:18 ` Tushar Behera @ 2013-12-26 10:19 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:19 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches S5M8767 chip has 3 crystal oscillators running at 32KHz. These are supported by s2mps11-clk driver. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> CC: Lee Jones <lee.jones@linaro.org> --- drivers/mfd/sec-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 66936b8..a139798 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -56,7 +56,9 @@ static const struct mfd_cell s5m8767_devs[] = { .name = "s5m8767-pmic", }, { .name = "s5m-rtc", - }, + }, { + .name = "s5m8767-clk", + } }; static const struct mfd_cell s2mps11_devs[] = { -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH RESEND 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2013-12-26 10:19 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:19 UTC (permalink / raw) To: linux-arm-kernel S5M8767 chip has 3 crystal oscillators running at 32KHz. These are supported by s2mps11-clk driver. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> CC: Lee Jones <lee.jones@linaro.org> --- drivers/mfd/sec-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 66936b8..a139798 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -56,7 +56,9 @@ static const struct mfd_cell s5m8767_devs[] = { .name = "s5m8767-pmic", }, { .name = "s5m-rtc", - }, + }, { + .name = "s5m8767-clk", + } }; static const struct mfd_cell s2mps11_devs[] = { -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* Re: [PATCH RESEND 3/4] mfd: sec-core: Add cells for S5M8767-clocks 2013-12-26 10:19 ` Tushar Behera @ 2014-01-06 11:22 ` Lee Jones -1 siblings, 0 replies; 63+ messages in thread From: Lee Jones @ 2014-01-06 11:22 UTC (permalink / raw) To: Tushar Behera Cc: linux-kernel, linux-arm-kernel, linux-samsung-soc, mturquette, kgene.kim, patches On Thu, 26 Dec 2013, Tushar Behera wrote: > S5M8767 chip has 3 crystal oscillators running at 32KHz. These are > supported by s2mps11-clk driver. > > Signed-off-by: Tushar Behera <tushar.behera@linaro.org> > Reviewed-by: Tomasz Figa <t.figa@samsung.com> > CC: Lee Jones <lee.jones@linaro.org> > --- > drivers/mfd/sec-core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Applied, thanks. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 3/4] mfd: sec-core: Add cells for S5M8767-clocks @ 2014-01-06 11:22 ` Lee Jones 0 siblings, 0 replies; 63+ messages in thread From: Lee Jones @ 2014-01-06 11:22 UTC (permalink / raw) To: linux-arm-kernel On Thu, 26 Dec 2013, Tushar Behera wrote: > S5M8767 chip has 3 crystal oscillators running at 32KHz. These are > supported by s2mps11-clk driver. > > Signed-off-by: Tushar Behera <tushar.behera@linaro.org> > Reviewed-by: Tomasz Figa <t.figa@samsung.com> > CC: Lee Jones <lee.jones@linaro.org> > --- > drivers/mfd/sec-core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Applied, thanks. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 63+ messages in thread
* [PATCH RESEND 4/4] ARM: dts: Add S5M8767 clock nodes on Arndale board 2013-12-26 10:18 ` Tushar Behera @ 2013-12-26 10:19 ` Tushar Behera -1 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:19 UTC (permalink / raw) To: linux-kernel, linux-arm-kernel, linux-samsung-soc Cc: mturquette, lee.jones, kgene.kim, patches Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index b42e658..3bb730d 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -71,6 +71,13 @@ s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, <&gpx2 4 0>, <&gpx2 5 0>; + + s5m8767_osc: clocks { + #clock-cells = <1>; + clock-output-names = "s5m8767_ap", + "s5m8767_cp", "s5m8767_bt"; + }; + regulators { ldo1_reg: LDO1 { regulator-name = "VDD_ALIVE_1.0V"; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
* [PATCH RESEND 4/4] ARM: dts: Add S5M8767 clock nodes on Arndale board @ 2013-12-26 10:19 ` Tushar Behera 0 siblings, 0 replies; 63+ messages in thread From: Tushar Behera @ 2013-12-26 10:19 UTC (permalink / raw) To: linux-arm-kernel Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> --- arch/arm/boot/dts/exynos5250-arndale.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts index b42e658..3bb730d 100644 --- a/arch/arm/boot/dts/exynos5250-arndale.dts +++ b/arch/arm/boot/dts/exynos5250-arndale.dts @@ -71,6 +71,13 @@ s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, <&gpx2 4 0>, <&gpx2 5 0>; + + s5m8767_osc: clocks { + #clock-cells = <1>; + clock-output-names = "s5m8767_ap", + "s5m8767_cp", "s5m8767_bt"; + }; + regulators { ldo1_reg: LDO1 { regulator-name = "VDD_ALIVE_1.0V"; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 63+ messages in thread
end of thread, other threads:[~2014-01-06 11:22 UTC | newest] Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-10-31 6:48 [PATCH 0/4] Add support for clocks in S5M8767 Tushar Behera 2013-10-31 6:48 ` Tushar Behera 2013-10-31 6:48 ` [PATCH 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks Tushar Behera 2013-10-31 6:48 ` Tushar Behera 2013-11-11 14:17 ` Yadwinder Singh Brar 2013-11-11 14:17 ` Yadwinder Singh Brar 2013-11-11 14:17 ` Yadwinder Singh Brar 2013-10-31 6:48 ` [PATCH 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD Tushar Behera 2013-10-31 6:48 ` Tushar Behera 2013-11-11 14:18 ` Yadwinder Singh Brar 2013-11-11 14:18 ` Yadwinder Singh Brar 2013-11-11 14:18 ` Yadwinder Singh Brar 2013-10-31 6:48 ` [PATCH 3/4] mfd: sec-core: Add cells for S5M8767-clocks Tushar Behera 2013-10-31 6:48 ` Tushar Behera 2013-10-31 16:16 ` Lee Jones 2013-10-31 16:16 ` Lee Jones 2013-11-05 6:29 ` Tushar Behera 2013-11-05 6:29 ` Tushar Behera 2013-11-05 6:29 ` Tushar Behera 2013-11-05 7:57 ` Kyungmin Park 2013-11-05 7:57 ` Kyungmin Park 2013-11-05 7:57 ` Kyungmin Park 2013-11-05 8:04 ` Tushar Behera 2013-11-05 8:04 ` Tushar Behera 2013-11-05 8:04 ` Tushar Behera 2013-11-05 8:58 ` Kyungmin Park 2013-11-05 8:58 ` Kyungmin Park 2013-11-05 8:58 ` Kyungmin Park 2013-10-31 6:48 ` [PATCH 4/4] ARM: dts: Add S5M8767 clock nodes on Arndale board Tushar Behera 2013-10-31 6:48 ` Tushar Behera 2013-11-10 12:34 ` [PATCH 0/4] Add support for clocks in S5M8767 Tomasz Figa 2013-11-10 12:34 ` Tomasz Figa 2013-11-11 2:58 ` Tushar Behera 2013-11-11 2:58 ` Tushar Behera 2013-11-11 2:58 ` Tushar Behera 2013-12-24 8:57 ` Tushar Behera 2013-12-24 8:57 ` Tushar Behera 2013-12-24 8:57 ` Tushar Behera 2013-12-26 10:18 ` [PATCH RESEND " Tushar Behera 2013-12-26 10:18 ` Tushar Behera 2013-12-26 10:18 ` [PATCH RESEND 1/4] clk: clk-s2mps11: Refactor for including support for other MFD clocks Tushar Behera 2013-12-26 10:18 ` Tushar Behera 2013-12-26 10:18 ` Tushar Behera 2013-12-29 22:17 ` Mike Turquette 2013-12-29 22:17 ` Mike Turquette 2013-12-29 22:17 ` Mike Turquette 2013-12-30 4:03 ` Tushar Behera 2013-12-30 4:03 ` Tushar Behera 2013-12-30 4:03 ` Tushar Behera 2013-12-31 16:09 ` Mark Brown 2013-12-31 16:09 ` Mark Brown 2013-12-31 16:09 ` Mark Brown 2013-12-31 19:13 ` Mike Turquette 2013-12-31 19:13 ` Mike Turquette 2013-12-31 19:13 ` Mike Turquette 2013-12-26 10:18 ` [PATCH RESEND 2/4] clk: clk-s2mps11: Add support for clocks in S5M8767 MFD Tushar Behera 2013-12-26 10:18 ` Tushar Behera 2013-12-26 10:19 ` [PATCH RESEND 3/4] mfd: sec-core: Add cells for S5M8767-clocks Tushar Behera 2013-12-26 10:19 ` Tushar Behera 2014-01-06 11:22 ` Lee Jones 2014-01-06 11:22 ` Lee Jones 2013-12-26 10:19 ` [PATCH RESEND 4/4] ARM: dts: Add S5M8767 clock nodes on Arndale board Tushar Behera 2013-12-26 10:19 ` Tushar Behera
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.