public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omap: Add I2C bus 1 initialisation
@ 2010-04-12  4:31 viral.mehta
  2010-04-12  4:55 ` Felipe Balbi
       [not found] ` <1271046704-10444-1-git-send-email-viral.mehta-oonXi/34qI7c+919tysfdA@public.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: viral.mehta @ 2010-04-12  4:31 UTC (permalink / raw)
  To: linux-omap; +Cc: linux-usb, Viral Mehta

From: Viral Mehta <viral.mehta@lntinfotech.com>

Initialize isp1301 FS USB transceiver and
add I2C bus1 initialization code for OMAP2430 SDP

Signed-off-by: Viral Mehta <viral.mehta@lntinfotech.com>
---
 arch/arm/mach-omap2/board-2430sdp.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 01d113f..346e1d2 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -174,9 +174,17 @@ static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = {
        },
 };

+static struct i2c_board_info __initdata sdp2430_i2c1_boardinfo[] = {
+       {
+               I2C_BOARD_INFO("isp1301_omap", 0x2D),
+               .flags = I2C_CLIENT_WAKE,
+               .irq = OMAP_GPIO_IRQ(78),
+       },
+}
 static int __init omap2430_i2c_init(void)
 {
-       omap_register_i2c_bus(1, 400, NULL, 0);
+       omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
+                       ARRAY_SIZE(sdp2430_i2c1_boardinfo));
        omap_register_i2c_bus(2, 2600, sdp2430_i2c_boardinfo,
                        ARRAY_SIZE(sdp2430_i2c_boardinfo));
        return 0;
--
1.6.6


This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.

______________________________________________________________________

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

* Re: [PATCH] omap: Add I2C bus 1 initialisation
  2010-04-12  4:31 [PATCH] omap: Add I2C bus 1 initialisation viral.mehta
@ 2010-04-12  4:55 ` Felipe Balbi
  2010-04-12  5:50   ` Viral Mehta
       [not found] ` <1271046704-10444-1-git-send-email-viral.mehta-oonXi/34qI7c+919tysfdA@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2010-04-12  4:55 UTC (permalink / raw)
  To: ext viral.mehta@lntinfotech.com
  Cc: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org

On Mon, Apr 12, 2010 at 06:31:44AM +0200, ext viral.mehta@lntinfotech.com wrote:
> static int __init omap2430_i2c_init(void)
> {
>-       omap_register_i2c_bus(1, 400, NULL, 0);
>+       omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
>+                       ARRAY_SIZE(sdp2430_i2c1_boardinfo));

why do you decrease bus frequency ?

-- 
balbi

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

* RE: [PATCH] omap: Add I2C bus 1 initialisation
       [not found] ` <1271046704-10444-1-git-send-email-viral.mehta-oonXi/34qI7c+919tysfdA@public.gmane.org>
@ 2010-04-12  5:31   ` Maulik
  0 siblings, 0 replies; 4+ messages in thread
From: Maulik @ 2010-04-12  5:31 UTC (permalink / raw)
  To: viral.mehta-oonXi/34qI7c+919tysfdA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA

> +static struct i2c_board_info __initdata sdp2430_i2c1_boardinfo[] = {
> +       {
> +               I2C_BOARD_INFO("isp1301_omap", 0x2D),
> +               .flags = I2C_CLIENT_WAKE,
> +               .irq = OMAP_GPIO_IRQ(78),
> +       },
> +}

Use tabs instead of spaces. 

>  static int __init omap2430_i2c_init(void)
>  {
> -       omap_register_i2c_bus(1, 400, NULL, 0);
> +       omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
> +                       ARRAY_SIZE(sdp2430_i2c1_boardinfo));

Same here.

Maulik

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH] omap: Add I2C bus 1 initialisation
  2010-04-12  4:55 ` Felipe Balbi
@ 2010-04-12  5:50   ` Viral Mehta
  0 siblings, 0 replies; 4+ messages in thread
From: Viral Mehta @ 2010-04-12  5:50 UTC (permalink / raw)
  To: felipe.balbi@nokia.com
  Cc: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org

>On Mon, Apr 12, 2010 at 06:31:44AM +0200, ext viral.mehta@lntinfotech.com wrote:
>> static int __init omap2430_i2c_init(void)
>> {
>>-       omap_register_i2c_bus(1, 400, NULL, 0);
>>+       omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
>>+                       ARRAY_SIZE(sdp2430_i2c1_boardinfo));

>why do you decrease bus frequency ?

1. This works for me.
2. I took refernce from http://linux.omap.com/pub/kernel/2430sdp/source/linux-2.6.14-omap2-v3.tgz
It uses same clock rate, this kernel is again fully working on OMAP2430 sdp board.
3. setting bus0 speed to 100 is Standard Mode and 400 is Fast Mode, may be working on fast mode is requiring some another changes which I am not aware of.
4. Sorry, dont have access to all HW manuals so that I can clearly point out about clk rate/bus speed data and settings.

--
Viral

______________________________________________________________________

This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.

______________________________________________________________________

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

end of thread, other threads:[~2010-04-12  5:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-12  4:31 [PATCH] omap: Add I2C bus 1 initialisation viral.mehta
2010-04-12  4:55 ` Felipe Balbi
2010-04-12  5:50   ` Viral Mehta
     [not found] ` <1271046704-10444-1-git-send-email-viral.mehta-oonXi/34qI7c+919tysfdA@public.gmane.org>
2010-04-12  5:31   ` Maulik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox