linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] i2c: Add SDA and SCL pin numbers to i2c platform data
@ 2010-01-12 11:17 Philby John
       [not found] ` <1263295031.3437.16.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Philby John @ 2010-01-12 11:17 UTC (permalink / raw)
  To: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

>From cb3347e45449ff16a332aa164eae24ef6a2432e6 Mon Sep 17 00:00:00 2001
From: Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org>
Date: Mon, 11 Jan 2010 15:53:31 +0530
Subject: [PATCH 1/2] Add SDA and SCL pin numbers to i2c platform data

Patch adds SDA and SCL pin numbers to the i2c platform data
structure for Davinci DM355 and DM6446. This at present is
used for i2c bus recovery.
TODO: Add SDA and SCL pin number information to include all
Davinci platforms such as dm355-leopard, dm365, dm646x, da8xx etc.

Signed-off-by: Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org>
---
 arch/arm/mach-davinci/board-dm355-evm.c  |    2 ++
 arch/arm/mach-davinci/board-dm644x-evm.c |    2 ++
 arch/arm/mach-davinci/include/mach/i2c.h |    2 ++
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 077ecf4..aa48e3f 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -111,6 +111,8 @@ static struct platform_device davinci_nand_device = {
 static struct davinci_i2c_platform_data i2c_pdata = {
 	.bus_freq	= 400	/* kHz */,
 	.bus_delay	= 0	/* usec */,
+	.sda_pin        = 15,
+	.scl_pin        = 14,
 };
 
 static struct snd_platform_data dm355_evm_snd_data;
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index e9612cf..976e11b 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -629,6 +629,8 @@ static struct i2c_board_info __initdata i2c_info[] =  {
 static struct davinci_i2c_platform_data i2c_pdata = {
 	.bus_freq	= 20 /* kHz */,
 	.bus_delay	= 100 /* usec */,
+	.sda_pin        = 44,
+	.scl_pin        = 43,
 };
 
 static void __init evm_init_i2c(void)
diff --git a/arch/arm/mach-davinci/include/mach/i2c.h b/arch/arm/mach-davinci/include/mach/i2c.h
index c248e9b..39fdcea 100644
--- a/arch/arm/mach-davinci/include/mach/i2c.h
+++ b/arch/arm/mach-davinci/include/mach/i2c.h
@@ -16,6 +16,8 @@
 struct davinci_i2c_platform_data {
 	unsigned int	bus_freq;	/* standard bus frequency (kHz) */
 	unsigned int	bus_delay;	/* post-transaction delay (usec) */
+	unsigned int    sda_pin;        /* GPIO pin ID to use for SDA */
+	unsigned int    scl_pin;        /* GPIO pin ID to use for SCL */
 };
 
 /* for board setup code */
-- 
1.6.3.3.MVISTA

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

* Re: [PATCH v3 1/2] i2c: Add SDA and SCL pin numbers to i2c platform data
       [not found] ` <1263295031.3437.16.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2010-01-20  8:04   ` Philby John
       [not found]     ` <1263974661.3546.103.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  2010-02-01  6:05   ` Nori, Sekhar
  1 sibling, 1 reply; 5+ messages in thread
From: Philby John @ 2010-01-20  8:04 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

Kevin,

On Tue, 2010-01-12 at 16:47 +0530, Philby John wrote:
> >From cb3347e45449ff16a332aa164eae24ef6a2432e6 Mon Sep 17 00:00:00 2001
> From: Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org>
> Date: Mon, 11 Jan 2010 15:53:31 +0530
> Subject: [PATCH 1/2] Add SDA and SCL pin numbers to i2c platform data
> 
> Patch adds SDA and SCL pin numbers to the i2c platform data
> structure for Davinci DM355 and DM6446. This at present is
> used for i2c bus recovery.
> TODO: Add SDA and SCL pin number information to include all
> Davinci platforms such as dm355-leopard, dm365, dm646x, da8xx etc.


Will this be included in your next pull? My concern was [PATCH v3 2/2]
would fail as it depends on data structures in this patch least it be
pulled into the i2c git repo by Jean, though chances of that happening
are highly unlikely. Would like to follow up with Jean once you include
this into your tree.


Thanks,
Philby

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

* Re: [PATCH v3 1/2] i2c: Add SDA and SCL pin numbers to i2c platform data
       [not found]     ` <1263974661.3546.103.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2010-01-25 23:27       ` Kevin Hilman
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2010-01-25 23:27 UTC (permalink / raw)
  To: Philby John
  Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org> writes:

> Kevin,
>
> On Tue, 2010-01-12 at 16:47 +0530, Philby John wrote:
>> >From cb3347e45449ff16a332aa164eae24ef6a2432e6 Mon Sep 17 00:00:00 2001
>> From: Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org>
>> Date: Mon, 11 Jan 2010 15:53:31 +0530
>> Subject: [PATCH 1/2] Add SDA and SCL pin numbers to i2c platform data
>> 
>> Patch adds SDA and SCL pin numbers to the i2c platform data
>> structure for Davinci DM355 and DM6446. This at present is
>> used for i2c bus recovery.
>> TODO: Add SDA and SCL pin number information to include all
>> Davinci platforms such as dm355-leopard, dm365, dm646x, da8xx etc.
>
>
> Will this be included in your next pull? My concern was [PATCH v3 2/2]
> would fail as it depends on data structures in this patch least it be
> pulled into the i2c git repo by Jean, though chances of that happening
> are highly unlikely. Would like to follow up with Jean once you include
> this into your tree.

Hello,

This looks good, I will queue in davinci-next for 2.6.34.

Kevin

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

* RE: [PATCH v3 1/2] i2c: Add SDA and SCL pin numbers to i2c platform data
       [not found] ` <1263295031.3437.16.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  2010-01-20  8:04   ` Philby John
@ 2010-02-01  6:05   ` Nori, Sekhar
       [not found]     ` <B85A65D85D7EB246BE421B3FB0FBB59301E235A3DA-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Nori, Sekhar @ 2010-02-01  6:05 UTC (permalink / raw)
  To: Philby John
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org

Hi Philby,

On Tue, Jan 12, 2010 at 16:47:11, Philby John wrote:
> >From cb3347e45449ff16a332aa164eae24ef6a2432e6 Mon Sep 17 00:00:00 2001
> From: Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org>
> Date: Mon, 11 Jan 2010 15:53:31 +0530
> Subject: [PATCH 1/2] Add SDA and SCL pin numbers to i2c platform data
>
> Patch adds SDA and SCL pin numbers to the i2c platform data
> structure for Davinci DM355 and DM6446. This at present is
> used for i2c bus recovery.
> TODO: Add SDA and SCL pin number information to include all
> Davinci platforms such as dm355-leopard, dm365, dm646x, da8xx etc.
>
> Signed-off-by: Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org>
> ---
>  arch/arm/mach-davinci/board-dm355-evm.c  |    2 ++
>  arch/arm/mach-davinci/board-dm644x-evm.c |    2 ++
>  arch/arm/mach-davinci/include/mach/i2c.h |    2 ++
>  3 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
> index 077ecf4..aa48e3f 100644
> --- a/arch/arm/mach-davinci/board-dm355-evm.c
> +++ b/arch/arm/mach-davinci/board-dm355-evm.c
> @@ -111,6 +111,8 @@ static struct platform_device davinci_nand_device = {
>  static struct davinci_i2c_platform_data i2c_pdata = {
>       .bus_freq       = 400   /* kHz */,
>       .bus_delay      = 0     /* usec */,
> +     .sda_pin        = 15,
> +     .scl_pin        = 14,
>  };
>
>  static struct snd_platform_data dm355_evm_snd_data;
> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
> index e9612cf..976e11b 100644
> --- a/arch/arm/mach-davinci/board-dm644x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
> @@ -629,6 +629,8 @@ static struct i2c_board_info __initdata i2c_info[] =  {
>  static struct davinci_i2c_platform_data i2c_pdata = {
>       .bus_freq       = 20 /* kHz */,
>       .bus_delay      = 100 /* usec */,
> +     .sda_pin        = 44,
> +     .scl_pin        = 43,
>  };
>
>  static void __init evm_init_i2c(void)
> diff --git a/arch/arm/mach-davinci/include/mach/i2c.h b/arch/arm/mach-davinci/include/mach/i2c.h
> index c248e9b..39fdcea 100644
> --- a/arch/arm/mach-davinci/include/mach/i2c.h
> +++ b/arch/arm/mach-davinci/include/mach/i2c.h
> @@ -16,6 +16,8 @@
>  struct davinci_i2c_platform_data {
>       unsigned int    bus_freq;       /* standard bus frequency (kHz) */
>       unsigned int    bus_delay;      /* post-transaction delay (usec) */
> +     unsigned int    sda_pin;        /* GPIO pin ID to use for SDA */

It doesn't look like you need the SDA pin to be
a GPIO in patch 2/2 - can you drop it from platform
data in that case?

Thanks,
Sekhar

> +     unsigned int    scl_pin;        /* GPIO pin ID to use for SCL */
>  };
>
>  /* for board setup code */
> --
> 1.6.3.3.MVISTA
>
>
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>

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

* Re: [PATCH v3 1/2] i2c: Add SDA and SCL pin numbers to i2c platform data
       [not found]     ` <B85A65D85D7EB246BE421B3FB0FBB59301E235A3DA-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
@ 2010-02-05 13:58       ` Philby John
  0 siblings, 0 replies; 5+ messages in thread
From: Philby John @ 2010-02-05 13:58 UTC (permalink / raw)
  To: Nori, Sekhar
  Cc: Philby John,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hello Sekhar,

On Mon, Feb 1, 2010 at 11:35 AM, Nori, Sekhar <nsekhar-l0cyMroinI0@public.gmane.org> wrote:
> Hi Philby,
>
> On Tue, Jan 12, 2010 at 16:47:11, Philby John wrote:
>> >From cb3347e45449ff16a332aa164eae24ef6a2432e6 Mon Sep 17 00:00:00 2001
>> From: Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org>
>> Date: Mon, 11 Jan 2010 15:53:31 +0530
>> Subject: [PATCH 1/2] Add SDA and SCL pin numbers to i2c platform data
>>
>> Patch adds SDA and SCL pin numbers to the i2c platform data
>> structure for Davinci DM355 and DM6446. This at present is
>> used for i2c bus recovery.
>> TODO: Add SDA and SCL pin number information to include all
>> Davinci platforms such as dm355-leopard, dm365, dm646x, da8xx etc.
>>
>> Signed-off-by: Philby John <pjohn-k0rHJ+Hhz/SB+jHODAdFcQ@public.gmane.org>
>> ---
>>  arch/arm/mach-davinci/board-dm355-evm.c  |    2 ++
>>  arch/arm/mach-davinci/board-dm644x-evm.c |    2 ++
>>  arch/arm/mach-davinci/include/mach/i2c.h |    2 ++
>>  3 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
>> index 077ecf4..aa48e3f 100644
>> --- a/arch/arm/mach-davinci/board-dm355-evm.c
>> +++ b/arch/arm/mach-davinci/board-dm355-evm.c
>> @@ -111,6 +111,8 @@ static struct platform_device davinci_nand_device = {
>>  static struct davinci_i2c_platform_data i2c_pdata = {
>>       .bus_freq       = 400   /* kHz */,
>>       .bus_delay      = 0     /* usec */,
>> +     .sda_pin        = 15,
>> +     .scl_pin        = 14,
>>  };
>>
>>  static struct snd_platform_data dm355_evm_snd_data;
>> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
>> index e9612cf..976e11b 100644
>> --- a/arch/arm/mach-davinci/board-dm644x-evm.c
>> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
>> @@ -629,6 +629,8 @@ static struct i2c_board_info __initdata i2c_info[] =  {
>>  static struct davinci_i2c_platform_data i2c_pdata = {
>>       .bus_freq       = 20 /* kHz */,
>>       .bus_delay      = 100 /* usec */,
>> +     .sda_pin        = 44,
>> +     .scl_pin        = 43,
>>  };
>>
>>  static void __init evm_init_i2c(void)
>> diff --git a/arch/arm/mach-davinci/include/mach/i2c.h b/arch/arm/mach-davinci/include/mach/i2c.h
>> index c248e9b..39fdcea 100644
>> --- a/arch/arm/mach-davinci/include/mach/i2c.h
>> +++ b/arch/arm/mach-davinci/include/mach/i2c.h
>> @@ -16,6 +16,8 @@
>>  struct davinci_i2c_platform_data {
>>       unsigned int    bus_freq;       /* standard bus frequency (kHz) */
>>       unsigned int    bus_delay;      /* post-transaction delay (usec) */
>> +     unsigned int    sda_pin;        /* GPIO pin ID to use for SDA */
>
> It doesn't look like you need the SDA pin to be
> a GPIO in patch 2/2 - can you drop it from platform
> data in that case?

Yes, SDA pin can be dropped. I merely added it for the sake of completeness.

Regards,
Philby

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

end of thread, other threads:[~2010-02-05 13:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 11:17 [PATCH v3 1/2] i2c: Add SDA and SCL pin numbers to i2c platform data Philby John
     [not found] ` <1263295031.3437.16.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-20  8:04   ` Philby John
     [not found]     ` <1263974661.3546.103.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-25 23:27       ` Kevin Hilman
2010-02-01  6:05   ` Nori, Sekhar
     [not found]     ` <B85A65D85D7EB246BE421B3FB0FBB59301E235A3DA-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-02-05 13:58       ` Philby John

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).