All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2013-11-22  6:12 Naveen Krishna Chatradhi
  2013-11-22  6:46 ` Yuvaraj Cd
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Naveen Krishna Chatradhi @ 2013-11-22  6:12 UTC (permalink / raw)
  To: linux-i2c, linux-kernel, linux-samsung-soc, hs
  Cc: khali, ben-linux, naveenkrishna.ch

This patch adds new compatible to support HSI2C module on Exynos5260
HSI2C module on Exynos5260 needs to be reset during during initialization.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
 .../devicetree/bindings/i2c/i2c-exynos5.txt        |    6 +++-
 drivers/i2c/busses/i2c-exynos5.c                   |   31 ++++++++++++++++++--
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
index 056732c..704ab92 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
@@ -5,7 +5,11 @@ at various speeds ranging from 100khz to 3.4Mhz.
 
 Required properties:
   - compatible: value should be.
-      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
+	-> "samsung,exynos5-hsi2c", for i2c compatible with HSI2C available on
+				Exynos5250/5420 SoCs.
+	-> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
+				on Exynos5260 SoCs.
+
   - reg: physical base address of the controller and length of memory mapped
     region.
   - interrupts: interrupt number to the cpu.
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index aca3991..cbb49e2 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -184,14 +184,35 @@ struct exynos5_i2c {
 	 * 2. Fast speed upto 1Mbps
 	 */
 	int			speed_mode;
+
+	/* Version of HS-I2C Hardware */
+	unsigned int		version;
+};
+
+enum hsi2c_version {
+	EXYNOS_5,
+	EXYNOS_5260
 };
 
 static const struct of_device_id exynos5_i2c_match[] = {
-	{ .compatible = "samsung,exynos5-hsi2c" },
+	{
+		.compatible = "samsung,exynos5-hsi2c",
+		.data = (void *)EXYNOS_5 },
+	{
+		.compatible = "samsung,exynos5260-hsi2c",
+		.data = (void *)EXYNOS_5260 },
 	{},
 };
 MODULE_DEVICE_TABLE(of, exynos5_i2c_match);
 
+static inline unsigned int exynos5_i2c_get_version(struct platform_device *pdev)
+{
+	const struct of_device_id *match;
+
+	match = of_match_node(exynos5_i2c_match, pdev->dev.of_node);
+	return (unsigned int)match->data;
+}
+
 static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
 {
 	writel(readl(i2c->regs + HSI2C_INT_STATUS),
@@ -692,7 +713,13 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_clk;
 
-	exynos5_i2c_init(i2c);
+	i2c->version = exynos5_i2c_get_version(pdev);
+
+	/* The HS-I2C core on Exynos5260 needs a reset to start with */
+	if (i2c->version == EXYNOS_5260)
+		exynos5_i2c_reset(i2c);
+	else
+		exynos5_i2c_init(i2c);
 
 	ret = i2c_add_adapter(&i2c->adap);
 	if (ret < 0) {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
  2013-11-22  6:12 [PATCH 1/2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC Naveen Krishna Chatradhi
@ 2013-11-22  6:46 ` Yuvaraj Cd
  2013-11-22  7:32   ` Naveen Krishna Ch
  2013-11-26  4:26 ` [PATCH 1/2 v2] " Naveen Krishna Chatradhi
  2014-02-07  4:42   ` Naveen Krishna Chatradhi
  2 siblings, 1 reply; 16+ messages in thread
From: Yuvaraj Cd @ 2013-11-22  6:46 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-i2c, linux-kernel, linux-samsung-soc, hs, khali, ben-linux,
	Naveen Krishna

On Fri, Nov 22, 2013 at 11:42 AM, Naveen Krishna Chatradhi
<ch.naveen@samsung.com> wrote:
> This patch adds new compatible to support HSI2C module on Exynos5260
> HSI2C module on Exynos5260 needs to be reset during during initialization.
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> ---
>  .../devicetree/bindings/i2c/i2c-exynos5.txt        |    6 +++-
>  drivers/i2c/busses/i2c-exynos5.c                   |   31 ++++++++++++++++++--
>  2 files changed, 34 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
> index 056732c..704ab92 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
> @@ -5,7 +5,11 @@ at various speeds ranging from 100khz to 3.4Mhz.
>
>  Required properties:
>    - compatible: value should be.
> -      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
> +       -> "samsung,exynos5-hsi2c", for i2c compatible with HSI2C available on
> +                               Exynos5250/5420 SoCs.
> +       -> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
> +                               on Exynos5260 SoCs.
> +
>    - reg: physical base address of the controller and length of memory mapped
>      region.
>    - interrupts: interrupt number to the cpu.
> diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
> index aca3991..cbb49e2 100644
> --- a/drivers/i2c/busses/i2c-exynos5.c
> +++ b/drivers/i2c/busses/i2c-exynos5.c
> @@ -184,14 +184,35 @@ struct exynos5_i2c {
>          * 2. Fast speed upto 1Mbps
>          */
>         int                     speed_mode;
> +
> +       /* Version of HS-I2C Hardware */
> +       unsigned int            version;
> +};
> +
> +enum hsi2c_version {
> +       EXYNOS_5,
> +       EXYNOS_5260
>  };
>
>  static const struct of_device_id exynos5_i2c_match[] = {
> -       { .compatible = "samsung,exynos5-hsi2c" },
> +       {
> +               .compatible = "samsung,exynos5-hsi2c",
> +               .data = (void *)EXYNOS_5 },
> +       {
> +               .compatible = "samsung,exynos5260-hsi2c",
> +               .data = (void *)EXYNOS_5260 },
>         {},
>  };
>  MODULE_DEVICE_TABLE(of, exynos5_i2c_match);
>
> +static inline unsigned int exynos5_i2c_get_version(struct platform_device *pdev)
> +{
> +       const struct of_device_id *match;
> +
> +       match = of_match_node(exynos5_i2c_match, pdev->dev.of_node);
> +       return (unsigned int)match->data;
> +}
> +
>  static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
>  {
>         writel(readl(i2c->regs + HSI2C_INT_STATUS),
> @@ -692,7 +713,13 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
>         if (ret)
>                 goto err_clk;
>
> -       exynos5_i2c_init(i2c);
> +       i2c->version = exynos5_i2c_get_version(pdev);
> +
> +       /* The HS-I2C core on Exynos5260 needs a reset to start with */
> +       if (i2c->version == EXYNOS_5260)

Is there is any change in the HSI2C IP for EXYNOS5260?
Can you let me know whats the change w.r.t IP and
why it needs reset to start,which was not needed in earlier SOC?

> +               exynos5_i2c_reset(i2c);
> +       else
> +               exynos5_i2c_init(i2c);
>
>         ret = i2c_add_adapter(&i2c->adap);
>         if (ret < 0) {
> --
> 1.7.10.4
>
> --
> 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] 16+ messages in thread

* Re: [PATCH 1/2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
  2013-11-22  6:46 ` Yuvaraj Cd
@ 2013-11-22  7:32   ` Naveen Krishna Ch
  0 siblings, 0 replies; 16+ messages in thread
From: Naveen Krishna Ch @ 2013-11-22  7:32 UTC (permalink / raw)
  To: Yuvaraj Cd
  Cc: Naveen Krishna Chatradhi, linux-i2c, linux-kernel,
	linux-samsung-soc, hs, khali, Ben Dooks

Hello Yuvaraj,

On 22 November 2013 12:16, Yuvaraj Cd <yuvaraj.lkml@gmail.com> wrote:
> On Fri, Nov 22, 2013 at 11:42 AM, Naveen Krishna Chatradhi
> <ch.naveen@samsung.com> wrote:
>> This patch adds new compatible to support HSI2C module on Exynos5260
>> HSI2C module on Exynos5260 needs to be reset during during initialization.
>>
>> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>> ---
>>  .../devicetree/bindings/i2c/i2c-exynos5.txt        |    6 +++-
>>  drivers/i2c/busses/i2c-exynos5.c                   |   31 ++++++++++++++++++--
>>  2 files changed, 34 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
>> index 056732c..704ab92 100644
>> --- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
>> @@ -5,7 +5,11 @@ at various speeds ranging from 100khz to 3.4Mhz.
>>
>>  Required properties:
>>    - compatible: value should be.
>> -      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
>> +       -> "samsung,exynos5-hsi2c", for i2c compatible with HSI2C available on
>> +                               Exynos5250/5420 SoCs.
>> +       -> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
>> +                               on Exynos5260 SoCs.
>> +
>>    - reg: physical base address of the controller and length of memory mapped
>>      region.
>>    - interrupts: interrupt number to the cpu.
>> diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
>> index aca3991..cbb49e2 100644
>> --- a/drivers/i2c/busses/i2c-exynos5.c
>> +++ b/drivers/i2c/busses/i2c-exynos5.c
>> @@ -184,14 +184,35 @@ struct exynos5_i2c {
>>          * 2. Fast speed upto 1Mbps
>>          */
>>         int                     speed_mode;
>> +
>> +       /* Version of HS-I2C Hardware */
>> +       unsigned int            version;
>> +};
>> +
>> +enum hsi2c_version {
>> +       EXYNOS_5,
>> +       EXYNOS_5260
>>  };
>>
>>  static const struct of_device_id exynos5_i2c_match[] = {
>> -       { .compatible = "samsung,exynos5-hsi2c" },
>> +       {
>> +               .compatible = "samsung,exynos5-hsi2c",
>> +               .data = (void *)EXYNOS_5 },
>> +       {
>> +               .compatible = "samsung,exynos5260-hsi2c",
>> +               .data = (void *)EXYNOS_5260 },
>>         {},
>>  };
>>  MODULE_DEVICE_TABLE(of, exynos5_i2c_match);
>>
>> +static inline unsigned int exynos5_i2c_get_version(struct platform_device *pdev)
>> +{
>> +       const struct of_device_id *match;
>> +
>> +       match = of_match_node(exynos5_i2c_match, pdev->dev.of_node);
>> +       return (unsigned int)match->data;
>> +}
>> +
>>  static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
>>  {
>>         writel(readl(i2c->regs + HSI2C_INT_STATUS),
>> @@ -692,7 +713,13 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
>>         if (ret)
>>                 goto err_clk;
>>
>> -       exynos5_i2c_init(i2c);
>> +       i2c->version = exynos5_i2c_get_version(pdev);
>> +
>> +       /* The HS-I2C core on Exynos5260 needs a reset to start with */
>> +       if (i2c->version == EXYNOS_5260)
>
> Is there is any change in the HSI2C IP for EXYNOS5260?
> Can you let me know whats the change w.r.t IP and
> why it needs reset to start,which was not needed in earlier SOC?

Problem:
While working on HSI2C on uboot for Exynos5260 i faced a problem.
To operate on bus "0" which was default bus
If i try i2c md/mw on channel 0 without selecting the bus using "i2c dev 0"
the transaction was failing. But, the subsequent transactions were passing.

Software Work around:
After looking at the code i found out, resetting the bus for the first
time made it work.

Hardware engg suggestion:
Meanwhile inputs from Hardware engineers are, "HSI2C on Exynos5260 needs a reset
during init."  I've not gone personally into the internals of HSI2C module.

>From user manual for Exynos5260, FIFO depth supported is 16bytes
instead of 64bytes.
>
>> +               exynos5_i2c_reset(i2c);
>> +       else
>> +               exynos5_i2c_init(i2c);
>>
>>         ret = i2c_add_adapter(&i2c->adap);
>>         if (ret < 0) {
>> --
>> 1.7.10.4
>>
>> --
>> 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



-- 
Shine bright,
(: Nav :)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/2 v2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
  2013-11-22  6:12 [PATCH 1/2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC Naveen Krishna Chatradhi
  2013-11-22  6:46 ` Yuvaraj Cd
@ 2013-11-26  4:26 ` Naveen Krishna Chatradhi
  2013-11-26 11:29     ` Sachin Kamat
  2013-12-09 16:27   ` Tomasz Figa
  2014-02-07  4:42   ` Naveen Krishna Chatradhi
  2 siblings, 2 replies; 16+ messages in thread
From: Naveen Krishna Chatradhi @ 2013-11-26  4:26 UTC (permalink / raw)
  To: linux-i2c
  Cc: sjg, linux-kernel, linux-samsung-soc, wsa, ben-linux,
	grant.likely, broonie, dianders, cpgs, t.figa

This patch adds new compatible to support HSI2C module on Exynos5260
HSI2C module on Exynos5260 needs to be reset during during initialization.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
Changes since v1:
Rebasing on linux-i2c for-next

 .../devicetree/bindings/i2c/i2c-exynos5.txt        |    6 +++-
 drivers/i2c/busses/i2c-exynos5.c                   |   31 ++++++++++++++++++--
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
index 056732c..704ab92 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
@@ -5,7 +5,11 @@ at various speeds ranging from 100khz to 3.4Mhz.
 
 Required properties:
   - compatible: value should be.
-      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
+	-> "samsung,exynos5-hsi2c", for i2c compatible with HSI2C available on
+				Exynos5250/5420 SoCs.
+	-> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
+				on Exynos5260 SoCs.
+
   - reg: physical base address of the controller and length of memory mapped
     region.
   - interrupts: interrupt number to the cpu.
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index da39ff0..497ff91 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -184,14 +184,35 @@ struct exynos5_i2c {
 	 * 2. Fast speed upto 1Mbps
 	 */
 	int			speed_mode;
+
+	/* Version of HS-I2C Hardware */
+	unsigned int		version;
+};
+
+enum hsi2c_version {
+	EXYNOS_5,
+	EXYNOS_5260
 };
 
 static const struct of_device_id exynos5_i2c_match[] = {
-	{ .compatible = "samsung,exynos5-hsi2c" },
+	{
+		.compatible = "samsung,exynos5-hsi2c",
+		.data = (void *)EXYNOS_5 },
+	{
+		.compatible = "samsung,exynos5260-hsi2c",
+		.data = (void *)EXYNOS_5260 },
 	{},
 };
 MODULE_DEVICE_TABLE(of, exynos5_i2c_match);
 
+static inline unsigned int exynos5_i2c_get_version(struct platform_device *pdev)
+{
+	const struct of_device_id *match;
+
+	match = of_match_node(exynos5_i2c_match, pdev->dev.of_node);
+	return (unsigned int)match->data;
+}
+
 static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
 {
 	writel(readl(i2c->regs + HSI2C_INT_STATUS),
@@ -692,7 +713,13 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_clk;
 
-	exynos5_i2c_init(i2c);
+	i2c->version = exynos5_i2c_get_version(pdev);
+
+	/* The HS-I2C core on Exynos5260 needs a reset to start with */
+	if (i2c->version == EXYNOS_5260)
+		exynos5_i2c_reset(i2c);
+	else
+		exynos5_i2c_init(i2c);
 
 	ret = i2c_add_adapter(&i2c->adap);
 	if (ret < 0) {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2 v2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2013-11-26 11:29     ` Sachin Kamat
  0 siblings, 0 replies; 16+ messages in thread
From: Sachin Kamat @ 2013-11-26 11:29 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-i2c, sjg, LKML, linux-samsung-soc, Wolfram Sang, Ben Dooks,
	Grant Likely, Mark Brown, Doug Anderson, cpgs, Tomasz Figa

On 26 November 2013 09:56, Naveen Krishna Chatradhi
<ch.naveen@samsung.com> wrote:
> This patch adds new compatible to support HSI2C module on Exynos5260
> HSI2C module on Exynos5260 needs to be reset during during initialization.
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
[snip]
>
>  Required properties:
>    - compatible: value should be.
> -      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
> +       -> "samsung,exynos5-hsi2c", for i2c compatible with HSI2C available on
> +                               Exynos5250/5420 SoCs.

This string could be made more specific ("samsung,exynos5250-hsi2c")
now that we have variants for this.

> +       -> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
> +                               on Exynos5260 SoCs.
> +
>    - reg: physical base address of the controller and length of memory mapped
>      region.
>    - interrupts: interrupt number to the cpu.
> diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
> index da39ff0..497ff91 100644
> --- a/drivers/i2c/busses/i2c-exynos5.c
> +++ b/drivers/i2c/busses/i2c-exynos5.c
> @@ -184,14 +184,35 @@ struct exynos5_i2c {
>          * 2. Fast speed upto 1Mbps
>          */
>         int                     speed_mode;
> +
> +       /* Version of HS-I2C Hardware */
> +       unsigned int            version;
> +};
> +
> +enum hsi2c_version {
> +       EXYNOS_5,

ditto.

> +       EXYNOS_5260
>  };
>

-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2 v2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2013-11-26 11:29     ` Sachin Kamat
  0 siblings, 0 replies; 16+ messages in thread
From: Sachin Kamat @ 2013-11-26 11:29 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, sjg-F7+t8E8rja9g9hUCZPvPmw,
	LKML, linux-samsung-soc, Wolfram Sang, Ben Dooks, Grant Likely,
	Mark Brown, Doug Anderson, cpgs-Sze3O3UU22JBDgjK7y7TUQ,
	Tomasz Figa

On 26 November 2013 09:56, Naveen Krishna Chatradhi
<ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> This patch adds new compatible to support HSI2C module on Exynos5260
> HSI2C module on Exynos5260 needs to be reset during during initialization.
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
[snip]
>
>  Required properties:
>    - compatible: value should be.
> -      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
> +       -> "samsung,exynos5-hsi2c", for i2c compatible with HSI2C available on
> +                               Exynos5250/5420 SoCs.

This string could be made more specific ("samsung,exynos5250-hsi2c")
now that we have variants for this.

> +       -> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
> +                               on Exynos5260 SoCs.
> +
>    - reg: physical base address of the controller and length of memory mapped
>      region.
>    - interrupts: interrupt number to the cpu.
> diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
> index da39ff0..497ff91 100644
> --- a/drivers/i2c/busses/i2c-exynos5.c
> +++ b/drivers/i2c/busses/i2c-exynos5.c
> @@ -184,14 +184,35 @@ struct exynos5_i2c {
>          * 2. Fast speed upto 1Mbps
>          */
>         int                     speed_mode;
> +
> +       /* Version of HS-I2C Hardware */
> +       unsigned int            version;
> +};
> +
> +enum hsi2c_version {
> +       EXYNOS_5,

ditto.

> +       EXYNOS_5260
>  };
>

-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2 v2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
  2013-11-26 11:29     ` Sachin Kamat
  (?)
@ 2013-11-26 11:53     ` Naveen Krishna Ch
  -1 siblings, 0 replies; 16+ messages in thread
From: Naveen Krishna Ch @ 2013-11-26 11:53 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: Naveen Krishna Chatradhi, linux-i2c, sjg, LKML,
	linux-samsung-soc, Wolfram Sang, Ben Dooks, Grant Likely,
	Mark Brown, Doug Anderson, cpgs, Tomasz Figa

Hello Sachin,

On 26 November 2013 16:59, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> On 26 November 2013 09:56, Naveen Krishna Chatradhi
> <ch.naveen@samsung.com> wrote:
>> This patch adds new compatible to support HSI2C module on Exynos5260
>> HSI2C module on Exynos5260 needs to be reset during during initialization.
>>
>> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> [snip]
>>
>>  Required properties:
>>    - compatible: value should be.
>> -      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
>> +       -> "samsung,exynos5-hsi2c", for i2c compatible with HSI2C available on
>> +                               Exynos5250/5420 SoCs.
The first HSI2C module is available on Exynos5 SoCs from Samsung.
Hence, "samsung,exynos5-hsi2c"
HSI2C Module on  Exynos5250 and Exynos5420 was exactly similar

HSI2C Module on Exynos5260 differs in hardware.
Hence, "samsung,exynos5260-hsi2c".

And as the new variants come we use "samsung,exynosXXX-hsi2c"
or we can go by "samsung,exynos5-hsi2c-v2"

Changing an existing compatible needs modification in the DT nodes as well.

I will change the compatible string, if anyone else also thinks its wise.
>
> This string could be made more specific ("samsung,exynos5250-hsi2c")
> now that we have variants for this.
>
>> +       -> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
>> +                               on Exynos5260 SoCs.
>> +
>>    - reg: physical base address of the controller and length of memory mapped
>>      region.
>>    - interrupts: interrupt number to the cpu.
>> diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
>> index da39ff0..497ff91 100644
>> --- a/drivers/i2c/busses/i2c-exynos5.c
>> +++ b/drivers/i2c/busses/i2c-exynos5.c
>> @@ -184,14 +184,35 @@ struct exynos5_i2c {
>>          * 2. Fast speed upto 1Mbps
>>          */
>>         int                     speed_mode;
>> +
>> +       /* Version of HS-I2C Hardware */
>> +       unsigned int            version;
>> +};
>> +
>> +enum hsi2c_version {
>> +       EXYNOS_5,
>
> ditto.
>
>> +       EXYNOS_5260
>>  };
>>
>
> --
> With warm regards,
> Sachin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Shine bright,
(: Nav :)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2 v2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
  2013-11-26  4:26 ` [PATCH 1/2 v2] " Naveen Krishna Chatradhi
  2013-11-26 11:29     ` Sachin Kamat
@ 2013-12-09 16:27   ` Tomasz Figa
  1 sibling, 0 replies; 16+ messages in thread
From: Tomasz Figa @ 2013-12-09 16:27 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-i2c, sjg, linux-kernel, linux-samsung-soc, wsa, ben-linux,
	grant.likely, broonie, dianders, cpgs

Hi Naveen,

On Tuesday 26 of November 2013 09:56:17 Naveen Krishna Chatradhi wrote:
> This patch adds new compatible to support HSI2C module on Exynos5260
> HSI2C module on Exynos5260 needs to be reset during during initialization.
> 
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> ---
> Changes since v1:
> Rebasing on linux-i2c for-next
> 
>  .../devicetree/bindings/i2c/i2c-exynos5.txt        |    6 +++-
>  drivers/i2c/busses/i2c-exynos5.c                   |   31 ++++++++++++++++++--
>  2 files changed, 34 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
> index 056732c..704ab92 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
> @@ -5,7 +5,11 @@ at various speeds ranging from 100khz to 3.4Mhz.
>  
>  Required properties:
>    - compatible: value should be.
> -      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
> +	-> "samsung,exynos5-hsi2c", for i2c compatible with HSI2C available on
> +				Exynos5250/5420 SoCs.
> +	-> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
> +				on Exynos5260 SoCs.
> +
>    - reg: physical base address of the controller and length of memory mapped
>      region.
>    - interrupts: interrupt number to the cpu.
> diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
> index da39ff0..497ff91 100644
> --- a/drivers/i2c/busses/i2c-exynos5.c
> +++ b/drivers/i2c/busses/i2c-exynos5.c
> @@ -184,14 +184,35 @@ struct exynos5_i2c {
>  	 * 2. Fast speed upto 1Mbps
>  	 */
>  	int			speed_mode;
> +
> +	/* Version of HS-I2C Hardware */
> +	unsigned int		version;
> +};
> +
> +enum hsi2c_version {
> +	EXYNOS_5,
> +	EXYNOS_5260
>  };

I don't like this kind of hardware versioningm as there might show up
revisions that are previous revisions mixed together (e.g. some quirks
from one and some quirks from another).

IMHO better way to represent differences between hardware versions are
variant structs that define characteristics of particular variants.

For now, it doesn't really matter, though, as the only things that change
are fifo depth and whether the reset is needed (although see my comment
below on this). However if you could spot any other differences between
these two versions that might affect the driver in future, it would be
better to use a variant struct.

>  
>  static const struct of_device_id exynos5_i2c_match[] = {
> -	{ .compatible = "samsung,exynos5-hsi2c" },
> +	{
> +		.compatible = "samsung,exynos5-hsi2c",
> +		.data = (void *)EXYNOS_5 },
> +	{
> +		.compatible = "samsung,exynos5260-hsi2c",
> +		.data = (void *)EXYNOS_5260 },
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, exynos5_i2c_match);
>  
> +static inline unsigned int exynos5_i2c_get_version(struct platform_device *pdev)
> +{
> +	const struct of_device_id *match;
> +
> +	match = of_match_node(exynos5_i2c_match, pdev->dev.of_node);
> +	return (unsigned int)match->data;
> +}
> +
>  static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
>  {
>  	writel(readl(i2c->regs + HSI2C_INT_STATUS),
> @@ -692,7 +713,13 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_clk;
>  
> -	exynos5_i2c_init(i2c);
> +	i2c->version = exynos5_i2c_get_version(pdev);
> +
> +	/* The HS-I2C core on Exynos5260 needs a reset to start with */
> +	if (i2c->version == EXYNOS_5260)
> +		exynos5_i2c_reset(i2c);
> +	else
> +		exynos5_i2c_init(i2c);

What about simply calling exynos5_i2c_reset() here regardless of the
version? I don't think it should cause any problems and could be even
more reliable as the hardware would be always reset to its default state
regardless of what the firmware does with it.

Best regards,
Tomasz


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/2 v4] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
  2013-11-22  6:12 [PATCH 1/2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC Naveen Krishna Chatradhi
@ 2014-02-07  4:42   ` Naveen Krishna Chatradhi
  2013-11-26  4:26 ` [PATCH 1/2 v2] " Naveen Krishna Chatradhi
  2014-02-07  4:42   ` Naveen Krishna Chatradhi
  2 siblings, 0 replies; 16+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-02-07  4:42 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-arm-kernel, linux-samsung-soc, naveenkrishna.ch, kgene.kim,
	wsa, linux-kernel

This patch adds a new compatible and uses variant struct to support
HSI2C module on Exynos5260. Updates the Documentation dt bindings.
Also resets the module as an init sequence (Needed by Exynos5260).

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
Changes since v3:
1. split patches as (v1 version does)
   add exynso5260 suppport and handle fifo depths
2. keep the old - compatible = "samsung,exynos5-hsi2c";
   mark it as (DEPRECATED)

 .../devicetree/bindings/i2c/i2c-exynos5.txt        |   11 ++++-
 drivers/i2c/busses/i2c-exynos5.c                   |   46 ++++++++++++++++++--
 2 files changed, 52 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
index 056732c..d4745e3 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
@@ -5,7 +5,14 @@ at various speeds ranging from 100khz to 3.4Mhz.
 
 Required properties:
   - compatible: value should be.
-      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
+	-> "samsung,exynos5-hsi2c", (DEPRECATED)
+				for i2c compatible with HSI2C available
+				on Exynos5250 and Exynos5420 SoCs.
+	-> "samsung,exynos5250-hsi2c", for i2c compatible with HSI2C available
+				on Exynos5250 and Exynos5420 SoCs.
+	-> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
+				on Exynos5260 SoCs.
+
   - reg: physical base address of the controller and length of memory mapped
     region.
   - interrupts: interrupt number to the cpu.
@@ -26,7 +33,7 @@ Optional properties:
 Example:
 
 hsi2c@12ca0000 {
-	compatible = "samsung,exynos5-hsi2c";
+	compatible = "samsung,exynos5250-hsi2c";
 	reg = <0x12ca0000 0x100>;
 	interrupts = <56>;
 	clock-frequency = <100000>;
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 9fd711c..12730d1 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -183,14 +183,54 @@ struct exynos5_i2c {
 	 * 2. Fast speed upto 1Mbps
 	 */
 	int			speed_mode;
+
+	/* Version of HS-I2C Hardware */
+	struct exynos_hsi2c_variant	*variant;
+};
+
+/**
+ * struct exynos_hsi2c_variant - platform specific HSI2C driver data
+ * @fifo_depth: the fifo depth supported by the HSI2C module
+ *
+ * Specifies platform specific configuration of HSI2C module.
+ * Note: A structure for driver specific platform data is used for future
+ * expansion of its usage.
+ */
+struct exynos_hsi2c_variant {
+	unsigned int		    fifo_depth;
+};
+
+static const struct exynos_hsi2c_variant exynos5250_hsi2c_data = {
+	.fifo_depth	= 64,
+};
+
+static const struct exynos_hsi2c_variant exynos5260_hsi2c_data = {
+	.fifo_depth	= 16,
 };
 
 static const struct of_device_id exynos5_i2c_match[] = {
-	{ .compatible = "samsung,exynos5-hsi2c" },
-	{},
+	{
+		.compatible = "samsung,exynos5-hsi2c"
+		.data = &exynos5250_hsi2c_data
+	}, {
+		.compatible = "samsung,exynos5250-hsi2c",
+		.data = &exynos5250_hsi2c_data
+	}, {
+		.compatible = "samsung,exynos5260-hsi2c",
+		.data = &exynos5260_hsi2c_data
+	}, {},
 };
 MODULE_DEVICE_TABLE(of, exynos5_i2c_match);
 
+static inline struct exynos_hsi2c_variant *exynos5_i2c_get_variant
+					(struct platform_device *pdev)
+{
+	const struct of_device_id *match;
+
+	match = of_match_node(exynos5_i2c_match, pdev->dev.of_node);
+	return (struct exynos_hsi2c_variant *)match->data;
+}
+
 static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
 {
 	writel(readl(i2c->regs + HSI2C_INT_STATUS),
@@ -691,7 +731,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_clk;
 
-	exynos5_i2c_init(i2c);
+	exynos5_i2c_reset(i2c);
 
 	ret = i2c_add_adapter(&i2c->adap);
 	if (ret < 0) {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/2 v4] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2014-02-07  4:42   ` Naveen Krishna Chatradhi
  0 siblings, 0 replies; 16+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-02-07  4:42 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds a new compatible and uses variant struct to support
HSI2C module on Exynos5260. Updates the Documentation dt bindings.
Also resets the module as an init sequence (Needed by Exynos5260).

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
Changes since v3:
1. split patches as (v1 version does)
   add exynso5260 suppport and handle fifo depths
2. keep the old - compatible = "samsung,exynos5-hsi2c";
   mark it as (DEPRECATED)

 .../devicetree/bindings/i2c/i2c-exynos5.txt        |   11 ++++-
 drivers/i2c/busses/i2c-exynos5.c                   |   46 ++++++++++++++++++--
 2 files changed, 52 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
index 056732c..d4745e3 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
@@ -5,7 +5,14 @@ at various speeds ranging from 100khz to 3.4Mhz.
 
 Required properties:
   - compatible: value should be.
-      -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c.
+	-> "samsung,exynos5-hsi2c", (DEPRECATED)
+				for i2c compatible with HSI2C available
+				on Exynos5250 and Exynos5420 SoCs.
+	-> "samsung,exynos5250-hsi2c", for i2c compatible with HSI2C available
+				on Exynos5250 and Exynos5420 SoCs.
+	-> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
+				on Exynos5260 SoCs.
+
   - reg: physical base address of the controller and length of memory mapped
     region.
   - interrupts: interrupt number to the cpu.
@@ -26,7 +33,7 @@ Optional properties:
 Example:
 
 hsi2c at 12ca0000 {
-	compatible = "samsung,exynos5-hsi2c";
+	compatible = "samsung,exynos5250-hsi2c";
 	reg = <0x12ca0000 0x100>;
 	interrupts = <56>;
 	clock-frequency = <100000>;
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 9fd711c..12730d1 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -183,14 +183,54 @@ struct exynos5_i2c {
 	 * 2. Fast speed upto 1Mbps
 	 */
 	int			speed_mode;
+
+	/* Version of HS-I2C Hardware */
+	struct exynos_hsi2c_variant	*variant;
+};
+
+/**
+ * struct exynos_hsi2c_variant - platform specific HSI2C driver data
+ * @fifo_depth: the fifo depth supported by the HSI2C module
+ *
+ * Specifies platform specific configuration of HSI2C module.
+ * Note: A structure for driver specific platform data is used for future
+ * expansion of its usage.
+ */
+struct exynos_hsi2c_variant {
+	unsigned int		    fifo_depth;
+};
+
+static const struct exynos_hsi2c_variant exynos5250_hsi2c_data = {
+	.fifo_depth	= 64,
+};
+
+static const struct exynos_hsi2c_variant exynos5260_hsi2c_data = {
+	.fifo_depth	= 16,
 };
 
 static const struct of_device_id exynos5_i2c_match[] = {
-	{ .compatible = "samsung,exynos5-hsi2c" },
-	{},
+	{
+		.compatible = "samsung,exynos5-hsi2c"
+		.data = &exynos5250_hsi2c_data
+	}, {
+		.compatible = "samsung,exynos5250-hsi2c",
+		.data = &exynos5250_hsi2c_data
+	}, {
+		.compatible = "samsung,exynos5260-hsi2c",
+		.data = &exynos5260_hsi2c_data
+	}, {},
 };
 MODULE_DEVICE_TABLE(of, exynos5_i2c_match);
 
+static inline struct exynos_hsi2c_variant *exynos5_i2c_get_variant
+					(struct platform_device *pdev)
+{
+	const struct of_device_id *match;
+
+	match = of_match_node(exynos5_i2c_match, pdev->dev.of_node);
+	return (struct exynos_hsi2c_variant *)match->data;
+}
+
 static void exynos5_i2c_clr_pend_irq(struct exynos5_i2c *i2c)
 {
 	writel(readl(i2c->regs + HSI2C_INT_STATUS),
@@ -691,7 +731,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_clk;
 
-	exynos5_i2c_init(i2c);
+	exynos5_i2c_reset(i2c);
 
 	ret = i2c_add_adapter(&i2c->adap);
 	if (ret < 0) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2 v4] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2014-03-12 19:18     ` Wolfram Sang
  0 siblings, 0 replies; 16+ messages in thread
From: Wolfram Sang @ 2014-03-12 19:18 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-i2c, linux-arm-kernel, linux-samsung-soc, naveenkrishna.ch,
	kgene.kim, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

On Fri, Feb 07, 2014 at 10:12:51AM +0530, Naveen Krishna Chatradhi wrote:
> This patch adds a new compatible and uses variant struct to support
> HSI2C module on Exynos5260. Updates the Documentation dt bindings.
> Also resets the module as an init sequence (Needed by Exynos5260).
> 
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>

This patch has clearly not been tested :( Build failure!

> +struct exynos_hsi2c_variant {
> +	unsigned int		    fifo_depth;
> +};

Why so many tabs? In general, I'd prefer one space.

> -	exynos5_i2c_init(i2c);
> +	exynos5_i2c_reset(i2c);

Is this a related change?


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2 v4] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2014-03-12 19:18     ` Wolfram Sang
  0 siblings, 0 replies; 16+ messages in thread
From: Wolfram Sang @ 2014-03-12 19:18 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	naveenkrishna.ch-Re5JQEeQqe8AvxtiuMwx3w,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

On Fri, Feb 07, 2014 at 10:12:51AM +0530, Naveen Krishna Chatradhi wrote:
> This patch adds a new compatible and uses variant struct to support
> HSI2C module on Exynos5260. Updates the Documentation dt bindings.
> Also resets the module as an init sequence (Needed by Exynos5260).
> 
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

This patch has clearly not been tested :( Build failure!

> +struct exynos_hsi2c_variant {
> +	unsigned int		    fifo_depth;
> +};

Why so many tabs? In general, I'd prefer one space.

> -	exynos5_i2c_init(i2c);
> +	exynos5_i2c_reset(i2c);

Is this a related change?


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/2 v4] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2014-03-12 19:18     ` Wolfram Sang
  0 siblings, 0 replies; 16+ messages in thread
From: Wolfram Sang @ 2014-03-12 19:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 07, 2014 at 10:12:51AM +0530, Naveen Krishna Chatradhi wrote:
> This patch adds a new compatible and uses variant struct to support
> HSI2C module on Exynos5260. Updates the Documentation dt bindings.
> Also resets the module as an init sequence (Needed by Exynos5260).
> 
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>

This patch has clearly not been tested :( Build failure!

> +struct exynos_hsi2c_variant {
> +	unsigned int		    fifo_depth;
> +};

Why so many tabs? In general, I'd prefer one space.

> -	exynos5_i2c_init(i2c);
> +	exynos5_i2c_reset(i2c);

Is this a related change?

-------------- 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/20140312/ffc804ff/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2 v4] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
  2014-03-12 19:18     ` Wolfram Sang
  (?)
@ 2014-04-28  8:15       ` Naveen Krishna Ch
  -1 siblings, 0 replies; 16+ messages in thread
From: Naveen Krishna Ch @ 2014-04-28  8:15 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Naveen Krishna Chatradhi, linux-i2c, linux-arm-kernel,
	linux-samsung-soc, Kukjin Kim, linux-kernel

Hello Wolfram,

On 13 March 2014 00:48, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Fri, Feb 07, 2014 at 10:12:51AM +0530, Naveen Krishna Chatradhi wrote:
>> This patch adds a new compatible and uses variant struct to support
>> HSI2C module on Exynos5260. Updates the Documentation dt bindings.
>> Also resets the module as an init sequence (Needed by Exynos5260).
>>
>> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>
> This patch has clearly not been tested :( Build failure!
comma was missing, Not sure, how i missed it.
Will fix it.
>
>> +struct exynos_hsi2c_variant {
>> +     unsigned int                fifo_depth;
>> +};
>
> Why so many tabs? In general, I'd prefer one space.
>
>> -     exynos5_i2c_init(i2c);
>> +     exynos5_i2c_reset(i2c);
>
> Is this a related change?
Exynos5260 needs the HSI2C module to be reset during the init.
As per Tomasz's comment on earlier version. We will reset the status
during init for every SoC.
>



-- 
Shine bright,
(: Nav :)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2 v4] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2014-04-28  8:15       ` Naveen Krishna Ch
  0 siblings, 0 replies; 16+ messages in thread
From: Naveen Krishna Ch @ 2014-04-28  8:15 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Naveen Krishna Chatradhi, linux-i2c, linux-arm-kernel,
	linux-samsung-soc, Kukjin Kim, linux-kernel

Hello Wolfram,

On 13 March 2014 00:48, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Fri, Feb 07, 2014 at 10:12:51AM +0530, Naveen Krishna Chatradhi wrote:
>> This patch adds a new compatible and uses variant struct to support
>> HSI2C module on Exynos5260. Updates the Documentation dt bindings.
>> Also resets the module as an init sequence (Needed by Exynos5260).
>>
>> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>
> This patch has clearly not been tested :( Build failure!
comma was missing, Not sure, how i missed it.
Will fix it.
>
>> +struct exynos_hsi2c_variant {
>> +     unsigned int                fifo_depth;
>> +};
>
> Why so many tabs? In general, I'd prefer one space.
>
>> -     exynos5_i2c_init(i2c);
>> +     exynos5_i2c_reset(i2c);
>
> Is this a related change?
Exynos5260 needs the HSI2C module to be reset during the init.
As per Tomasz's comment on earlier version. We will reset the status
during init for every SoC.
>



-- 
Shine bright,
(: Nav :)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/2 v4] i2c: exynos5: add support for HSI2C on Exynos5260 SoC
@ 2014-04-28  8:15       ` Naveen Krishna Ch
  0 siblings, 0 replies; 16+ messages in thread
From: Naveen Krishna Ch @ 2014-04-28  8:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Wolfram,

On 13 March 2014 00:48, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Fri, Feb 07, 2014 at 10:12:51AM +0530, Naveen Krishna Chatradhi wrote:
>> This patch adds a new compatible and uses variant struct to support
>> HSI2C module on Exynos5260. Updates the Documentation dt bindings.
>> Also resets the module as an init sequence (Needed by Exynos5260).
>>
>> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>
> This patch has clearly not been tested :( Build failure!
comma was missing, Not sure, how i missed it.
Will fix it.
>
>> +struct exynos_hsi2c_variant {
>> +     unsigned int                fifo_depth;
>> +};
>
> Why so many tabs? In general, I'd prefer one space.
>
>> -     exynos5_i2c_init(i2c);
>> +     exynos5_i2c_reset(i2c);
>
> Is this a related change?
Exynos5260 needs the HSI2C module to be reset during the init.
As per Tomasz's comment on earlier version. We will reset the status
during init for every SoC.
>



-- 
Shine bright,
(: Nav :)

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-04-28  8:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-22  6:12 [PATCH 1/2] i2c: exynos5: add support for HSI2C on Exynos5260 SoC Naveen Krishna Chatradhi
2013-11-22  6:46 ` Yuvaraj Cd
2013-11-22  7:32   ` Naveen Krishna Ch
2013-11-26  4:26 ` [PATCH 1/2 v2] " Naveen Krishna Chatradhi
2013-11-26 11:29   ` Sachin Kamat
2013-11-26 11:29     ` Sachin Kamat
2013-11-26 11:53     ` Naveen Krishna Ch
2013-12-09 16:27   ` Tomasz Figa
2014-02-07  4:42 ` [PATCH 1/2 v4] " Naveen Krishna Chatradhi
2014-02-07  4:42   ` Naveen Krishna Chatradhi
2014-03-12 19:18   ` Wolfram Sang
2014-03-12 19:18     ` Wolfram Sang
2014-03-12 19:18     ` Wolfram Sang
2014-04-28  8:15     ` Naveen Krishna Ch
2014-04-28  8:15       ` Naveen Krishna Ch
2014-04-28  8:15       ` Naveen Krishna Ch

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.