Re: [PATCH v3 1/3] clk: s2mps11: Add support for S2MPS14 clocks

2014-03-20 Thread Mike Turquette
Quoting Lee Jones (2014-03-20 06:42:19)
> > > > > > This patch adds support for S2MPS14 PMIC clocks (BT and AP) to the
> > > > > > s2mps11 clock driver.
> > > > > > 
> > > > > > Signed-off-by: Krzysztof Kozlowski 
> > > > > > Reviewed-by: Yadwinder Singh Brar 
> > > > > > Reviewed-by: Tomasz Figa 
> > > > > 
> > > > > This does not apply cleanly to to clk tree trip, nor does it compile
> > > > > after manually merging due to changes introducing
> > > > > linux/mfd/samsung/s2mps14.h.
> > > > > 
> > > > > The changes look OK to me so maybe Lee can take it with my Ack?
> > > > > 
> > > > > Acked-by: Mike Turquette 
> > > > > 
> > > > 
> > > > Hi,
> > > > 
> > > > Thanks for the Ack. The patch depends on Tushar Behera's patches:
> > > >  - [PATCH V2 0/2] Add support for clocks in S5M8767
> > > >http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27264
> > > > which are waiting for some time. Both patchsets should be pulled
> > > > together.
> > > 
> > > I took those patches in yesterday. So we have three options:
> > 
> > Great! Thanks.
> > 
> > > 
> > > 1) MFD tree can pull a stable commit from the clk tree. I'm happy to
> > > make a topic branch for this. Then these patches can be applied.
> > > 
> > > 2) clk tree can pull a stable commit from the mfd tree if the mfd folks
> > > can provide one.
> > > 
> > > 3) Wait until after the merge window to apply this one to the clk tree.
> > > I don't currently plan to send 2 PRs during the merge window, so this
> > > could either go in 3.16 or maybe into 3.15 if a split PR is sent.
> > 
> > Dear Lee,
> > 
> > How do you wish to proceed? The patchset depends on changes in sec-core
> > MFD driver.
> 
> The MFD tree is betting pretty complicated with sec-core stuff at the
> minuite. Can I vote for option 3?

Sure. clock tree feels the same way. ;-)

Regards,
Mike

> 
> -- 
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 1/3] clk: s2mps11: Add support for S2MPS14 clocks

2014-03-20 Thread Lee Jones
> > > > > This patch adds support for S2MPS14 PMIC clocks (BT and AP) to the
> > > > > s2mps11 clock driver.
> > > > > 
> > > > > Signed-off-by: Krzysztof Kozlowski 
> > > > > Reviewed-by: Yadwinder Singh Brar 
> > > > > Reviewed-by: Tomasz Figa 
> > > > 
> > > > This does not apply cleanly to to clk tree trip, nor does it compile
> > > > after manually merging due to changes introducing
> > > > linux/mfd/samsung/s2mps14.h.
> > > > 
> > > > The changes look OK to me so maybe Lee can take it with my Ack?
> > > > 
> > > > Acked-by: Mike Turquette 
> > > > 
> > > 
> > > Hi,
> > > 
> > > Thanks for the Ack. The patch depends on Tushar Behera's patches:
> > >  - [PATCH V2 0/2] Add support for clocks in S5M8767
> > >http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27264
> > > which are waiting for some time. Both patchsets should be pulled
> > > together.
> > 
> > I took those patches in yesterday. So we have three options:
> 
> Great! Thanks.
> 
> > 
> > 1) MFD tree can pull a stable commit from the clk tree. I'm happy to
> > make a topic branch for this. Then these patches can be applied.
> > 
> > 2) clk tree can pull a stable commit from the mfd tree if the mfd folks
> > can provide one.
> > 
> > 3) Wait until after the merge window to apply this one to the clk tree.
> > I don't currently plan to send 2 PRs during the merge window, so this
> > could either go in 3.16 or maybe into 3.15 if a split PR is sent.
> 
> Dear Lee,
> 
> How do you wish to proceed? The patchset depends on changes in sec-core
> MFD driver.

The MFD tree is betting pretty complicated with sec-core stuff at the
minuite. Can I vote for option 3?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 1/3] clk: s2mps11: Add support for S2MPS14 clocks

2014-03-20 Thread Krzysztof Kozlowski
On Wed, 2014-03-19 at 12:11 -0700, Mike Turquette wrote:
> Quoting Krzysztof Kozlowski (2014-03-19 00:50:08)
> > On Tue, 2014-03-18 at 17:16 -0700, Mike Turquette wrote:
> > > Quoting Krzysztof Kozlowski (2014-03-17 02:19:16)
> > > > This patch adds support for S2MPS14 PMIC clocks (BT and AP) to the
> > > > s2mps11 clock driver.
> > > > 
> > > > Signed-off-by: Krzysztof Kozlowski 
> > > > Reviewed-by: Yadwinder Singh Brar 
> > > > Reviewed-by: Tomasz Figa 
> > > 
> > > This does not apply cleanly to to clk tree trip, nor does it compile
> > > after manually merging due to changes introducing
> > > linux/mfd/samsung/s2mps14.h.
> > > 
> > > The changes look OK to me so maybe Lee can take it with my Ack?
> > > 
> > > Acked-by: Mike Turquette 
> > > 
> > 
> > Hi,
> > 
> > Thanks for the Ack. The patch depends on Tushar Behera's patches:
> >  - [PATCH V2 0/2] Add support for clocks in S5M8767
> >http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27264
> > which are waiting for some time. Both patchsets should be pulled
> > together.
> 
> I took those patches in yesterday. So we have three options:

Great! Thanks.

> 
> 1) MFD tree can pull a stable commit from the clk tree. I'm happy to
> make a topic branch for this. Then these patches can be applied.
> 
> 2) clk tree can pull a stable commit from the mfd tree if the mfd folks
> can provide one.
> 
> 3) Wait until after the merge window to apply this one to the clk tree.
> I don't currently plan to send 2 PRs during the merge window, so this
> could either go in 3.16 or maybe into 3.15 if a split PR is sent.

Dear Lee,

How do you wish to proceed? The patchset depends on changes in sec-core
MFD driver.

Best regards,
Krzysztof


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 1/3] clk: s2mps11: Add support for S2MPS14 clocks

2014-03-19 Thread Krzysztof Kozlowski
On Tue, 2014-03-18 at 17:16 -0700, Mike Turquette wrote:
> Quoting Krzysztof Kozlowski (2014-03-17 02:19:16)
> > This patch adds support for S2MPS14 PMIC clocks (BT and AP) to the
> > s2mps11 clock driver.
> > 
> > Signed-off-by: Krzysztof Kozlowski 
> > Reviewed-by: Yadwinder Singh Brar 
> > Reviewed-by: Tomasz Figa 
> 
> This does not apply cleanly to to clk tree trip, nor does it compile
> after manually merging due to changes introducing
> linux/mfd/samsung/s2mps14.h.
> 
> The changes look OK to me so maybe Lee can take it with my Ack?
> 
> Acked-by: Mike Turquette 
> 

Hi,

Thanks for the Ack. The patch depends on Tushar Behera's patches:
 - [PATCH V2 0/2] Add support for clocks in S5M8767
   http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27264
which are waiting for some time. Both patchsets should be pulled
together.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 1/3] clk: s2mps11: Add support for S2MPS14 clocks

2014-03-18 Thread Mike Turquette
On Tue, Mar 18, 2014 at 6:09 PM, Mike Turquette  wrote:
> Quoting Krzysztof Kozlowski (2014-03-17 02:19:16)
>> This patch adds support for S2MPS14 PMIC clocks (BT and AP) to the
>> s2mps11 clock driver.
>>
>> Signed-off-by: Krzysztof Kozlowski 
>> Reviewed-by: Yadwinder Singh Brar 
>> Reviewed-by: Tomasz Figa 
>
> Taken into clk-next.

Oops. Please disregard. My auto patch application script sent his by
accident. I have not applied this patches, as indicated in my previous
mail were I gave out an Ack.

Regards,
Mike

>
> Regards,
> Mike
>
>> ---
>>  drivers/clk/Kconfig   |8 +++---
>>  drivers/clk/clk-s2mps11.c |   61 
>> ++---
>>  2 files changed, 50 insertions(+), 19 deletions(-)
>>
>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>> index 6f56d3a4f010..8f9ce8ba036d 100644
>> --- a/drivers/clk/Kconfig
>> +++ b/drivers/clk/Kconfig
>> @@ -65,12 +65,12 @@ config COMMON_CLK_SI570
>>   clock generators.
>>
>>  config COMMON_CLK_S2MPS11
>> -   tristate "Clock driver for S2MPS11/S5M8767 MFD"
>> +   tristate "Clock driver for S2MPS1X/S5M8767 MFD"
>> depends on MFD_SEC_CORE
>> ---help---
>> - This driver supports S2MPS11/S5M8767 crystal oscillator clock. 
>> These
>> - multi-function devices have 3 fixed-rate oscillators, clocked at
>> - 32KHz each.
>> + This driver supports S2MPS11/S2MPS14/S5M8767 crystal oscillator
>> + clock. These multi-function devices have two (S2MPS14) or three
>> + (S2MPS11, S5M8767) 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 508875535e1e..8dafb552274f 100644
>> --- a/drivers/clk/clk-s2mps11.c
>> +++ b/drivers/clk/clk-s2mps11.c
>> @@ -1,7 +1,7 @@
>>  /*
>>   * clk-s2mps11.c - Clock driver for S2MPS11.
>>   *
>> - * Copyright (C) 2013 Samsung Electornics
>> + * Copyright (C) 2013,2014 Samsung Electornics
>>   *
>>   * This program is free software; you can redistribute  it and/or modify it
>>   * under  the terms of  the GNU General  Public License as published by the
>> @@ -13,10 +13,6 @@
>>   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>   * GNU General Public License for more details.
>>   *
>> - * You should have received a copy of the GNU General Public License
>> - * along with this program; if not, write to the Free Software
>> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
>> - *
>>   */
>>
>>  #include 
>> @@ -27,6 +23,7 @@
>>  #include 
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>>  #include 
>>
>> @@ -125,7 +122,21 @@ static struct clk_init_data 
>> s2mps11_clks_init[S2MPS11_CLKS_NUM] = {
>> },
>>  };
>>
>> -static struct device_node *s2mps11_clk_parse_dt(struct platform_device 
>> *pdev)
>> +static struct clk_init_data s2mps14_clks_init[S2MPS11_CLKS_NUM] = {
>> +   [S2MPS11_CLK_AP] = {
>> +   .name = "s2mps14_ap",
>> +   .ops = &s2mps11_clk_ops,
>> +   .flags = CLK_IS_ROOT,
>> +   },
>> +   [S2MPS11_CLK_BT] = {
>> +   .name = "s2mps14_bt",
>> +   .ops = &s2mps11_clk_ops,
>> +   .flags = CLK_IS_ROOT,
>> +   },
>> +};
>> +
>> +static struct device_node *s2mps11_clk_parse_dt(struct platform_device 
>> *pdev,
>> +   struct clk_init_data *clks_init)
>>  {
>> struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
>> struct device_node *clk_np;
>> @@ -145,9 +156,12 @@ static struct device_node *s2mps11_clk_parse_dt(struct 
>> platform_device *pdev)
>> if (!clk_table)
>> return ERR_PTR(-ENOMEM);
>>
>> -   for (i = 0; i < S2MPS11_CLKS_NUM; i++)
>> +   for (i = 0; i < S2MPS11_CLKS_NUM; i++) {
>> +   if (!clks_init[i].name)
>> +   continue; /* Skip clocks not present in some devices 
>> */
>> of_property_read_string_index(clk_np, "clock-output-names", 
>> i,
>> -   &s2mps11_clks_init[i].name);
>> +   &clks_init[i].name);
>> +   }
>>
>> return clk_np;
>>  }
>> @@ -158,6 +172,7 @@ static int s2mps11_clk_probe(struct platform_device 
>> *pdev)
>> struct s2mps11_clk *s2mps11_clks, *s2mps11_clk;
>> struct device_node *clk_np = NULL;
>> unsigned int s2mps11_reg;
>> +   struct clk_init_data *clks_init;
>> int i, ret = 0;
>> u32 val;
>>
>> @@ -168,25 +183,33 @@ static int s2mps11_clk_probe(struct platform_device 
>> *pdev)
>>
>> s2mps11_clk = s2mps11_clks;
>>
>> -   clk_np = s2mps11_clk_parse_dt(pdev);
>> -   if (IS_ERR(clk_np))
>> -   return PTR_ERR(clk_np);
>> -
>> switch (platform_get_device_id(pdev)->driver_data) {
>> case S2MPS11X:
>> s2mps11_r

Re: [PATCH v3 1/3] clk: s2mps11: Add support for S2MPS14 clocks

2014-03-18 Thread Mike Turquette
Quoting Krzysztof Kozlowski (2014-03-17 02:19:16)
> This patch adds support for S2MPS14 PMIC clocks (BT and AP) to the
> s2mps11 clock driver.
> 
> Signed-off-by: Krzysztof Kozlowski 
> Reviewed-by: Yadwinder Singh Brar 
> Reviewed-by: Tomasz Figa 

Taken into clk-next.

Regards,
Mike

> ---
>  drivers/clk/Kconfig   |8 +++---
>  drivers/clk/clk-s2mps11.c |   61 
> ++---
>  2 files changed, 50 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 6f56d3a4f010..8f9ce8ba036d 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -65,12 +65,12 @@ config COMMON_CLK_SI570
>   clock generators.
>  
>  config COMMON_CLK_S2MPS11
> -   tristate "Clock driver for S2MPS11/S5M8767 MFD"
> +   tristate "Clock driver for S2MPS1X/S5M8767 MFD"
> depends on MFD_SEC_CORE
> ---help---
> - This driver supports S2MPS11/S5M8767 crystal oscillator clock. These
> - multi-function devices have 3 fixed-rate oscillators, clocked at
> - 32KHz each.
> + This driver supports S2MPS11/S2MPS14/S5M8767 crystal oscillator
> + clock. These multi-function devices have two (S2MPS14) or three
> + (S2MPS11, S5M8767) 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 508875535e1e..8dafb552274f 100644
> --- a/drivers/clk/clk-s2mps11.c
> +++ b/drivers/clk/clk-s2mps11.c
> @@ -1,7 +1,7 @@
>  /*
>   * clk-s2mps11.c - Clock driver for S2MPS11.
>   *
> - * Copyright (C) 2013 Samsung Electornics
> + * Copyright (C) 2013,2014 Samsung Electornics
>   *
>   * This program is free software; you can redistribute  it and/or modify it
>   * under  the terms of  the GNU General  Public License as published by the
> @@ -13,10 +13,6 @@
>   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>   * GNU General Public License for more details.
>   *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> - *
>   */
>  
>  #include 
> @@ -27,6 +23,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  
> @@ -125,7 +122,21 @@ static struct clk_init_data 
> s2mps11_clks_init[S2MPS11_CLKS_NUM] = {
> },
>  };
>  
> -static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev)
> +static struct clk_init_data s2mps14_clks_init[S2MPS11_CLKS_NUM] = {
> +   [S2MPS11_CLK_AP] = {
> +   .name = "s2mps14_ap",
> +   .ops = &s2mps11_clk_ops,
> +   .flags = CLK_IS_ROOT,
> +   },
> +   [S2MPS11_CLK_BT] = {
> +   .name = "s2mps14_bt",
> +   .ops = &s2mps11_clk_ops,
> +   .flags = CLK_IS_ROOT,
> +   },
> +};
> +
> +static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev,
> +   struct clk_init_data *clks_init)
>  {
> struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
> struct device_node *clk_np;
> @@ -145,9 +156,12 @@ static struct device_node *s2mps11_clk_parse_dt(struct 
> platform_device *pdev)
> if (!clk_table)
> return ERR_PTR(-ENOMEM);
>  
> -   for (i = 0; i < S2MPS11_CLKS_NUM; i++)
> +   for (i = 0; i < S2MPS11_CLKS_NUM; i++) {
> +   if (!clks_init[i].name)
> +   continue; /* Skip clocks not present in some devices 
> */
> of_property_read_string_index(clk_np, "clock-output-names", i,
> -   &s2mps11_clks_init[i].name);
> +   &clks_init[i].name);
> +   }
>  
> return clk_np;
>  }
> @@ -158,6 +172,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
> struct s2mps11_clk *s2mps11_clks, *s2mps11_clk;
> struct device_node *clk_np = NULL;
> unsigned int s2mps11_reg;
> +   struct clk_init_data *clks_init;
> int i, ret = 0;
> u32 val;
>  
> @@ -168,25 +183,33 @@ static int s2mps11_clk_probe(struct platform_device 
> *pdev)
>  
> s2mps11_clk = s2mps11_clks;
>  
> -   clk_np = s2mps11_clk_parse_dt(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;
> +   clks_init = s2mps11_clks_init;
> +   break;
> +   case S2MPS14X:
> +   s2mps11_reg = S2MPS14_REG_RTCCTRL;
> +   clks_init = s2mps14_clks_init;
> break;
> case S5M8767X:
> s2mps11_reg = S5M8767_REG_CTRL1;
> +   clks_init = s2mps11_clks_init;

Re: [PATCH v3 1/3] clk: s2mps11: Add support for S2MPS14 clocks

2014-03-18 Thread Mike Turquette
Quoting Krzysztof Kozlowski (2014-03-17 02:19:16)
> This patch adds support for S2MPS14 PMIC clocks (BT and AP) to the
> s2mps11 clock driver.
> 
> Signed-off-by: Krzysztof Kozlowski 
> Reviewed-by: Yadwinder Singh Brar 
> Reviewed-by: Tomasz Figa 

This does not apply cleanly to to clk tree trip, nor does it compile
after manually merging due to changes introducing
linux/mfd/samsung/s2mps14.h.

The changes look OK to me so maybe Lee can take it with my Ack?

Acked-by: Mike Turquette 

Regards,
Mike

> ---
>  drivers/clk/Kconfig   |8 +++---
>  drivers/clk/clk-s2mps11.c |   61 
> ++---
>  2 files changed, 50 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 6f56d3a4f010..8f9ce8ba036d 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -65,12 +65,12 @@ config COMMON_CLK_SI570
>   clock generators.
>  
>  config COMMON_CLK_S2MPS11
> -   tristate "Clock driver for S2MPS11/S5M8767 MFD"
> +   tristate "Clock driver for S2MPS1X/S5M8767 MFD"
> depends on MFD_SEC_CORE
> ---help---
> - This driver supports S2MPS11/S5M8767 crystal oscillator clock. These
> - multi-function devices have 3 fixed-rate oscillators, clocked at
> - 32KHz each.
> + This driver supports S2MPS11/S2MPS14/S5M8767 crystal oscillator
> + clock. These multi-function devices have two (S2MPS14) or three
> + (S2MPS11, S5M8767) 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 508875535e1e..8dafb552274f 100644
> --- a/drivers/clk/clk-s2mps11.c
> +++ b/drivers/clk/clk-s2mps11.c
> @@ -1,7 +1,7 @@
>  /*
>   * clk-s2mps11.c - Clock driver for S2MPS11.
>   *
> - * Copyright (C) 2013 Samsung Electornics
> + * Copyright (C) 2013,2014 Samsung Electornics
>   *
>   * This program is free software; you can redistribute  it and/or modify it
>   * under  the terms of  the GNU General  Public License as published by the
> @@ -13,10 +13,6 @@
>   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>   * GNU General Public License for more details.
>   *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> - *
>   */
>  
>  #include 
> @@ -27,6 +23,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  
> @@ -125,7 +122,21 @@ static struct clk_init_data 
> s2mps11_clks_init[S2MPS11_CLKS_NUM] = {
> },
>  };
>  
> -static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev)
> +static struct clk_init_data s2mps14_clks_init[S2MPS11_CLKS_NUM] = {
> +   [S2MPS11_CLK_AP] = {
> +   .name = "s2mps14_ap",
> +   .ops = &s2mps11_clk_ops,
> +   .flags = CLK_IS_ROOT,
> +   },
> +   [S2MPS11_CLK_BT] = {
> +   .name = "s2mps14_bt",
> +   .ops = &s2mps11_clk_ops,
> +   .flags = CLK_IS_ROOT,
> +   },
> +};
> +
> +static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev,
> +   struct clk_init_data *clks_init)
>  {
> struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
> struct device_node *clk_np;
> @@ -145,9 +156,12 @@ static struct device_node *s2mps11_clk_parse_dt(struct 
> platform_device *pdev)
> if (!clk_table)
> return ERR_PTR(-ENOMEM);
>  
> -   for (i = 0; i < S2MPS11_CLKS_NUM; i++)
> +   for (i = 0; i < S2MPS11_CLKS_NUM; i++) {
> +   if (!clks_init[i].name)
> +   continue; /* Skip clocks not present in some devices 
> */
> of_property_read_string_index(clk_np, "clock-output-names", i,
> -   &s2mps11_clks_init[i].name);
> +   &clks_init[i].name);
> +   }
>  
> return clk_np;
>  }
> @@ -158,6 +172,7 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
> struct s2mps11_clk *s2mps11_clks, *s2mps11_clk;
> struct device_node *clk_np = NULL;
> unsigned int s2mps11_reg;
> +   struct clk_init_data *clks_init;
> int i, ret = 0;
> u32 val;
>  
> @@ -168,25 +183,33 @@ static int s2mps11_clk_probe(struct platform_device 
> *pdev)
>  
> s2mps11_clk = s2mps11_clks;
>  
> -   clk_np = s2mps11_clk_parse_dt(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;
> +   clks_init = s2mps11_clks_init;
> +   break;
> +   case S2MPS14X:
> +   s2mps11_reg =