* [PATCH 2/3] ARM: OMAP: menelaus chip info for H4 board.
@ 2007-05-26 8:28 Trilok Soni
2007-05-27 2:44 ` David Brownell
0 siblings, 1 reply; 5+ messages in thread
From: Trilok Soni @ 2007-05-26 8:28 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 18 bytes --]
--
--Trilok Soni
[-- Attachment #2: 0002-ARM-OMAP-menelaus-chip-info-for-H4-board.patch --]
[-- Type: text/x-patch, Size: 1417 bytes --]
From 0fc7c6966ef0732184c6680b2aa21351fe4382ff Mon Sep 17 00:00:00 2001
From: Trilok Soni <soni.trilok@gmail.com>
Date: Sat, 26 May 2007 19:19:19 +0530
Subject: [PATCH 2/3] ARM: OMAP: menelaus chip info for H4 board.
- Add menelaus i2c chip info for H4 board.
Signed-off-by: Trilok Soni <soni.trilok@gmail.com>
---
arch/arm/mach-omap2/board-h4.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index c4ca225..97ce0c6 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -21,6 +21,7 @@
#include <linux/input.h>
#include <linux/err.h>
#include <linux/clk.h>
+#include <linux/i2c.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
@@ -492,6 +493,15 @@ static void __init tusb_evm_setup(void)
#endif
+static struct i2c_board_info __initdata h4_i2c_board_info[] = {
+#ifdef CONFIG_MENELAUS
+ {
+ I2C_BOARD_INFO("menelaus", 0x72),
+ .irq = INT_24XX_SYS_NIRQ,
+ },
+#endif
+};
+
static void __init omap_h4_init(void)
{
/*
@@ -520,6 +530,9 @@ static void __init omap_h4_init(void)
omap_cfg_reg(V19_24XX_USB1_RCV);
#endif
+ i2c_register_board_info(1, h4_i2c_board_info,
+ ARRAY_SIZE(h4_i2c_board_info));
+
platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
omap_board_config = h4_config;
omap_board_config_size = ARRAY_SIZE(h4_config);
--
1.5.0
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] ARM: OMAP: menelaus chip info for H4 board.
2007-05-26 8:28 [PATCH 2/3] ARM: OMAP: menelaus chip info for H4 board Trilok Soni
@ 2007-05-27 2:44 ` David Brownell
2007-05-29 12:33 ` Trilok Soni
0 siblings, 1 reply; 5+ messages in thread
From: David Brownell @ 2007-05-27 2:44 UTC (permalink / raw)
To: linux-omap-open-source
See the appended patch ... the #ifdefs shouldn't exist, and
if you're going to define the IRQ there (as you should) then
the pinmux must move out of the driver (maybe the board uses
a GPIO for some reason).
I threw in another I2C device too.
- Dave
============== CUT HERE
Tweak Trilok's h4 i2c boardinfo patch:
- Don't #ifdef
- Declare the rv5c387a RTC too
- Move irq pinmux out of the driver into board-specific init
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
NOTE: board-n800 may need a similar pinmux change... and yes,
I prefer the "one board-X.c" style.
arch/arm/mach-omap2/board-h4.c | 10 ++++++++--
drivers/i2c/chips/menelaus.c | 4 ----
2 files changed, 8 insertions(+), 6 deletions(-)
--- h4.orig/arch/arm/mach-omap2/board-h4.c 2007-05-26 19:35:17.000000000 -0700
+++ h4/arch/arm/mach-omap2/board-h4.c 2007-05-26 19:35:24.000000000 -0700
@@ -493,12 +493,15 @@ static void __init tusb_evm_setup(void)
#endif
static struct i2c_board_info __initdata h4_i2c_board_info[] = {
-#ifdef CONFIG_MENELAUS
+ {
+ I2C_BOARD_INFO("rtc-rs5c372", 0x32),
+ .type = "rv5c387a",
+ /* no IRQ wired to OMAP; nINTB goes to AGPS */
+ },
{
I2C_BOARD_INFO("menelaus", 0x72),
.irq = INT_24XX_SYS_NIRQ,
},
-#endif
};
static void __init omap_h4_init(void)
@@ -529,6 +532,9 @@ static void __init omap_h4_init(void)
omap_cfg_reg(V19_24XX_USB1_RCV);
#endif
+ /* Menelaus interrupt */
+ omap_cfg_reg(W19_24XX_SYS_NIRQ);
+
i2c_register_board_info(1, h4_i2c_board_info,
ARRAY_SIZE(h4_i2c_board_info));
--- h4.orig/drivers/i2c/chips/menelaus.c 2007-05-26 19:35:15.000000000 -0700
+++ h4/drivers/i2c/chips/menelaus.c 2007-05-26 19:35:24.000000000 -0700
@@ -43,7 +43,6 @@
#include <asm/mach-types.h>
#include <asm/mach/irq.h>
-#include <asm/arch/mux.h>
#include <asm/arch/gpio.h>
#include <asm/arch/menelaus.h>
@@ -834,9 +833,6 @@ static int menelaus_probe(struct i2c_cli
goto fail1;
}
- /* Most likely Menelaus interrupt is at SYS_NIRQ */
- omap_cfg_reg(W19_24XX_SYS_NIRQ);
-
/* Ack and disable all Menelaus interrupts */
menelaus_write_reg(MENELAUS_INT_ACK1, 0xff);
menelaus_write_reg(MENELAUS_INT_ACK2, 0xff);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] ARM: OMAP: menelaus chip info for H4 board.
2007-05-27 2:44 ` David Brownell
@ 2007-05-29 12:33 ` Trilok Soni
2007-05-29 13:09 ` David Brownell
0 siblings, 1 reply; 5+ messages in thread
From: Trilok Soni @ 2007-05-29 12:33 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
On 5/27/07, David Brownell <david-b@pacbell.net> wrote:
> See the appended patch ... the #ifdefs shouldn't exist, and
> if you're going to define the IRQ there (as you should) then
> the pinmux must move out of the driver (maybe the board uses
> a GPIO for some reason).
>
> I threw in another I2C device too.
>
> - Dave
>
> ============== CUT HERE
> Tweak Trilok's h4 i2c boardinfo patch:
>
> - Don't #ifdef
> - Declare the rv5c387a RTC too
> - Move irq pinmux out of the driver into board-specific init
>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
>
> ---
> NOTE: board-n800 may need a similar pinmux change... and yes,
> I prefer the "one board-X.c" style.
>
> arch/arm/mach-omap2/board-h4.c | 10 ++++++++--
> drivers/i2c/chips/menelaus.c | 4 ----
> 2 files changed, 8 insertions(+), 6 deletions(-)
>
> --- h4.orig/arch/arm/mach-omap2/board-h4.c 2007-05-26 19:35:17.000000000 -0700
> +++ h4/arch/arm/mach-omap2/board-h4.c 2007-05-26 19:35:24.000000000 -0700
> @@ -493,12 +493,15 @@ static void __init tusb_evm_setup(void)
> #endif
>
> static struct i2c_board_info __initdata h4_i2c_board_info[] = {
> -#ifdef CONFIG_MENELAUS
> + {
> + I2C_BOARD_INFO("rtc-rs5c372", 0x32),
> + .type = "rv5c387a",
Where you have used driver_name "rtc-rs5c372" in the menelaus.c
driver? while registering rtc device you have used same "menelaus" as
DRIVER_NAME.
Actually I am trying to use new I2C style to TWL4030 core driver, as
it has four slaves which I want to register with i2c_board_info
structure along with main driver name "twl4030" and slaves being
"twl4030:0", "twl4030:1" and so on. But ->probe will be called for
only main driver "twl4030" not for each slaves as per the i2c core
correct?
--
--Trilok Soni
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] ARM: OMAP: menelaus chip info for H4 board.
2007-05-29 12:33 ` Trilok Soni
@ 2007-05-29 13:09 ` David Brownell
2007-05-29 13:29 ` Trilok Soni
0 siblings, 1 reply; 5+ messages in thread
From: David Brownell @ 2007-05-29 13:09 UTC (permalink / raw)
To: Trilok Soni; +Cc: linux-omap-open-source
On Tuesday 29 May 2007, Trilok Soni wrote:
> > --- h4.orig/arch/arm/mach-omap2/board-h4.c 2007-05-26 19:35:17.000000000 -0700
> > +++ h4/arch/arm/mach-omap2/board-h4.c 2007-05-26 19:35:24.000000000 -0700
> > @@ -493,12 +493,15 @@ static void __init tusb_evm_setup(void)
> > #endif
> >
> > static struct i2c_board_info __initdata h4_i2c_board_info[] = {
> > -#ifdef CONFIG_MENELAUS
> > + {
> > + I2C_BOARD_INFO("rtc-rs5c372", 0x32),
> > + .type = "rv5c387a",
>
> Where you have used driver_name "rtc-rs5c372" in the menelaus.c
> driver?
There's an rv5c387a chip on the board too. See
http://groups.google.com/group/rtc-linux/msg/fa462b52470149d8
> while registering rtc device you have used same "menelaus" as
> DRIVER_NAME.
Sure, but that's for a different chip. Both need i2c_board_info.
> Actually I am trying to use new I2C style to TWL4030 core driver, as
> it has four slaves which I want to register with i2c_board_info
> structure along with main driver name "twl4030" and slaves being
> "twl4030:0", "twl4030:1" and so on. But ->probe will be called for
> only main driver "twl4030" not for each slaves as per the i2c core
> correct?
I have no idea what you're talking about here. Menelaus is
twl92330, yes? H4 doesn't have a twl4030...
- Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] ARM: OMAP: menelaus chip info for H4 board.
2007-05-29 13:09 ` David Brownell
@ 2007-05-29 13:29 ` Trilok Soni
0 siblings, 0 replies; 5+ messages in thread
From: Trilok Soni @ 2007-05-29 13:29 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
On 5/29/07, David Brownell <david-b@pacbell.net> wrote:
> On Tuesday 29 May 2007, Trilok Soni wrote:
> > > --- h4.orig/arch/arm/mach-omap2/board-h4.c 2007-05-26 19:35:17.000000000 -0700
> > > +++ h4/arch/arm/mach-omap2/board-h4.c 2007-05-26 19:35:24.000000000 -0700
> > > @@ -493,12 +493,15 @@ static void __init tusb_evm_setup(void)
> > > #endif
> > >
> > > static struct i2c_board_info __initdata h4_i2c_board_info[] = {
> > > -#ifdef CONFIG_MENELAUS
> > > + {
> > > + I2C_BOARD_INFO("rtc-rs5c372", 0x32),
> > > + .type = "rv5c387a",
> >
> > Where you have used driver_name "rtc-rs5c372" in the menelaus.c
> > driver?
>
> There's an rv5c387a chip on the board too. See
>
> http://groups.google.com/group/rtc-linux/msg/fa462b52470149d8
>
>
> > while registering rtc device you have used same "menelaus" as
> > DRIVER_NAME.
>
> Sure, but that's for a different chip. Both need i2c_board_info.
Ok, understood now.
>
>
> > Actually I am trying to use new I2C style to TWL4030 core driver, as
> > it has four slaves which I want to register with i2c_board_info
> > structure along with main driver name "twl4030" and slaves being
> > "twl4030:0", "twl4030:1" and so on. But ->probe will be called for
> > only main driver "twl4030" not for each slaves as per the i2c core
> > correct?
>
> I have no idea what you're talking about here. Menelaus is
> twl92330, yes? H4 doesn't have a twl4030...
>
Yes, H4 doesn't have twl4030. 2430SDP has TWL4030, but ofcourse this
needs different e-mail thread for discussion.
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;h=2278b5c7412b647615b01bf54963aa3c94aaac2e;hb=411029608d73b6d391f9e9ce08e5252c6ce53682;f=drivers/i2c/chips/twl4030_core.c
--
--Trilok Soni
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-29 13:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-26 8:28 [PATCH 2/3] ARM: OMAP: menelaus chip info for H4 board Trilok Soni
2007-05-27 2:44 ` David Brownell
2007-05-29 12:33 ` Trilok Soni
2007-05-29 13:09 ` David Brownell
2007-05-29 13:29 ` Trilok Soni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox