Re: [PATCH] Fix OMAP H3 touchscreen.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Eduardo Valentin <edubezval@xxxxxxxxx> [071223 19:14]:
> Hi Lauro,
> 
> 
> Just a little style suggestion:
> 
> On Dec 21, 2007 5:03 PM, Lauro Ramos Venancio <lauro.venancio@xxxxxxxxx> wrote:
> > Use the newer touchscreen driver (tsc210x).
> > The old one doesn't compile anymore.
> >
> > Signed-off-by: Lauro Ramos Venancio <lauro.venancio@xxxxxxxxxxx>
> > ---
> >  arch/arm/mach-omap1/board-h3.c |   86 ++++++----------------------------------
> >  1 files changed, 13 insertions(+), 73 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
> > index df77cf5..3371446 100644
> >
> > --- a/arch/arm/mach-omap1/board-h3.c
> > +++ b/arch/arm/mach-omap1/board-h3.c

<snip>

> > @@ -452,8 +385,9 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
> >                 .modalias       = "tsc2101",
> >                 .bus_num        = 2,
> >                 .chip_select    = 0,
> > +               .irq            = OMAP_GPIO_IRQ(48),
> 
> Avoid using magic numbers in these cases. The code would be clearer if
> you'd #define'd the gpio number.
> 
> >                 .max_speed_hz   = 16000000,
> > -               .platform_data  = &h3_tsc2101_platform_data,
> > +               .platform_data  = &tsc_platform_data,
> >         },
> >  };
> >
> > @@ -569,6 +503,12 @@ static void __init h3_init(void)
> >         /* GPIO10 pullup/down register, Enable pullup on GPIO10 */
> >         omap_cfg_reg(V2_1710_GPIO10);
> >
> > +       /* TSC2101 */
> > +       omap_cfg_reg(W19_1610_GPIO48);
> 
> > +       gpio_request(48, "tsc_irq");
> >
> > +       gpio_direction_input(48);
> 
> Here too.

I've changed these to a define, and will push today.

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux