Re: [PATCH v3 1/2] i2c: Add SDA and SCL pin numbers to i2c platform data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Sekhar,

On Mon, Feb 1, 2010 at 11:35 AM, Nori, Sekhar <nsekhar@xxxxxx> 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@xxxxxxxxxxxxx>
>> 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@xxxxxxxxxxxxx>
>> ---
>>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux