[i2c] [patch 2.6.22] tps65010 new-style driver updates, part 2

David Brownell david-b at pacbell.net
Sat Aug 11 20:17:14 CEST 2007


> > Also remove some now-superfluous #includes.
>
> You've been overeager, see below.

It compiles and runs fine.  In what sense could it be over-eager?

Explicitly including every single file that's referenced is not a
requirement anywhere ... it's OK to let other headers include them
for you.  In fact that's common practice throughout Linux.


> > @@ -397,6 +413,14 @@ static void __init osk_init(void)
> >  	omap_board_config_size = ARRAY_SIZE(osk_config);
> >  	USB_TRANSCEIVER_CTRL_REG |= (3 << 1);
> >  
> > +	/* irq for tps65010 chip */
> > +	/* omap_cfg_reg(U19_1610_MPUIO1); */
>
> Why is this line commented out? Either it's needed, or it's not.

Call it documentation; and moving *everything* from the old "driver
does setup" to the preferred "board init does setup" model.  It just
happens that U19_1610_MPUIO1 is not defined, so that line couldn't
compile.  That setup code happens to work so far, since that mux
setting is the reset default and wasn't overridden by the particular
bootloader that's most often used on this board.  But that's the pinmux
setting needed for this board to operate...

It was there in the first place since it's really quite a PITA (*) to
find the correct pin mux options ... this way that info is ready in
case it's needed, maybe with an updated bootloader.  Bootloaders are
not generally worth trusting for anything more than starting Linux.

Maybe you'd just like the comment to say some of that?

- Dave

(*) For OMAP5912, consulting (a) schematics, using ZDY ballouts, then
    (b) one doc cross referencing big ZDY to smaller ZZG ballouts,
    then in turn (c) pinumx docs in ZZG terms, before (d) checking
    the platform-specific pinmux headers to make sure the published
    variant only enables an internal pullup or pulldown if that's
    really needed, and maybe defining a new mux option.  Then the
    fun starts:  debugging.  It often takes most of a week, mostly
    at the start of a project, to get the pinmux right.  And that's
    even if you know what you're doing!




More information about the i2c mailing list