[U-Boot] [PATCH 09/13 v5] ARM: OMAP3: Add I2C support

Wolfgang Denk wd at denx.de
Mon Nov 3 23:55:36 CET 2008


Dear Dirk Behme,

In message <490F5EBF.9080102 at googlemail.com> you wrote:
>
> >>+#define inb(a) __raw_readb(a)
> >>+#define outb(a, v) __raw_writeb(a, v)
> >> #define inw(a) __raw_readw(a)
> >> #define outw(a,v) __raw_writew(a,v)
> > 
> > This 4 macro is supposed to be defined in io.h
> 
> Even if I have to touch a global/common file for this?

If they are missing in io.h, this should be fixed, indeed.

> >> 		status = wait_for_pin ();
> >> 		if (status & I2C_STAT_RRDY) {
> >>+#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
> >>+			*value = inb(I2C_DATA);
> > 
> > please respect the file style, add a space before '('
> > and so on
> 
> You prefer file style over global coding style? As I understand it 
> "inb(" is global coding style, and I tried to be in sync with global 
> coding style at least with code I add.

It is more important to use a consistent style in a single source file,
indeed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It seems intuitively obvious to me, which  means  that  it  might  be
wrong.                                                 -- Chris Torek


More information about the U-Boot mailing list