public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: "Pillai, Manikandan" <mani.pillai@ti.com>
Cc: "me@felipebalbi.com" <me@felipebalbi.com>,
	Koen Kooi <k.kooi@student.utwente.nl>,
	"felipe.balbi@nokia.com" <felipe.balbi@nokia.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 1/3] Adding-support-framework for PR785 board.
Date: Fri, 28 Nov 2008 13:17:53 +0200	[thread overview]
Message-ID: <20081128111753.GC6525@frodo> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E739403E904EC45@dbde02.ent.ti.com>

On Fri, Nov 28, 2008 at 04:34:30PM +0530, Pillai, Manikandan wrote:
> Hi,
> 
> Mani
> 
> -----Original Message-----
> From: Felipe Balbi [mailto:me@felipebalbi.com] 
> Sent: Friday, November 28, 2008 4:21 PM
> To: Koen Kooi
> Cc: felipe.balbi@nokia.com; Pillai, Manikandan; linux-omap@vger.kernel.org
> Subject: Re: [PATCH 1/3] Adding-support-framework for PR785 board.
> 
> On Fri, Nov 28, 2008 at 11:11:29AM +0100, Koen Kooi wrote:
> >> Yes... you should for example:
> >>
> >> static struct i2c_board_info omap3evm_i2c_board_info[] __initdata = {
> >> ... (all devices but tps and twl) ...
> >> };
> >>
> >> static struct i2c_board_info pr785_i2c_board_info[] __initdata = {
> >> 	{
> >> 		I2C_BOARD_INFO("tps62352_core_pwr", 0x4A),
> >> 		.flags = I2C_CLIENT_WAKE,
> >> 	}, {
> >> 		I2C_BOARD_INFO("tps62353_mpu_pwr", 0x48),
> >> 		.flags = I2C_CLIENT_WAKE,
> >> 	},
> >> };
> >>
> >> static struct i2c_board_info twl4030_i2c_board_info[] __initdata = {
> >> 	{
> >> 		I2C_BOARD_INFO("twl4030", 0x48),
> >> 	},
> >> };
> >>
> >> Then on init:
> >>
> >> ...
> >>
> >> omap_register_i2c_bus(1, omap3_evm_i2c_board_info,
> >> 		ARRAY_SIZE(omap3evm_i2c_board_info);
> >>
> >> if (machine_is_pr785())
> >> 	i2c_register_board_info(1, pr785_i2c_board_info,
> >> 		ARRAY_SIZE(pr785_i2c_board_info));
> >
> > That's looks like unreachable code to me, since the pr785 is a  
> > daughterboard of the omap3evm machine.
> 
> Hmm... that's news to me. But make it runtime check somehow. We can't
> accept this kind of ifdefs in the i2c_board_info since it breaks multiomap.
> 
> And Tony has been pushing for it for quite a while, so let's not make
> his life more difficult.
> >>>Mani:  I was planning to have a machine_is_omap3evmpr785(). Any other ideas on how to get a runtime check somehow ?

It's not really a machine, so you won't have a machine ID for it. The
bootloader will always pass the OMAP3EVM machine id, so that's out of
context.

Isn't there any revision register somewhere you can use ??

-- 
balbi

      reply	other threads:[~2008-11-28 11:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28  5:27 [PATCH 1/3] Adding-support-framework for PR785 board Manikandan Pillai
2008-11-28  6:51 ` Felipe Balbi
     [not found]   ` <19F8576C6E063C45BE387C64729E739403E904EBE3@dbde02.ent.ti.com>
2008-11-28  9:46     ` Felipe Balbi
2008-11-28 10:11       ` Koen Kooi
2008-11-28 10:50         ` Felipe Balbi
2008-11-28 11:02           ` Koen Kooi
2008-11-28 11:04           ` Pillai, Manikandan
2008-11-28 11:17             ` Felipe Balbi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081128111753.GC6525@frodo \
    --to=me@felipebalbi.com \
    --cc=felipe.balbi@nokia.com \
    --cc=k.kooi@student.utwente.nl \
    --cc=linux-omap@vger.kernel.org \
    --cc=mani.pillai@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox