public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Please fix lcd_sx1.c
@ 2008-11-23 16:46 Russell King - ARM Linux
  2008-11-23 16:57 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2008-11-23 16:46 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel

kautobuild is reporting this error against sx1_defconfig:

drivers/video/omap/lcd_sx1.c: In function 'epson_sendbyte':
drivers/video/omap/lcd_sx1.c:90: error: implicit declaration of function 'OMAP_MCBSP_WRITE'
drivers/video/omap/lcd_sx1.c:90: error: 'PCR0' undeclared (first use in this function)
drivers/video/omap/lcd_sx1.c:90: error: (Each undeclared identifier is reported only once
drivers/video/omap/lcd_sx1.c:90: error: for each function it appears in.)
make[3]: *** [drivers/video/omap/lcd_sx1.o] Error 1

Some comments on this:

1. Unused definitions:

#define GPIO_DATA_INPUT         0xfffce000
#define GPIO_DATA_OUTPUT        0xfffce004
#define GPIO_DIR_CONTROL        0xfffce008
#define GPIO_INT_CONTROL        0xfffce00c
#define GPIO_INT_MASK           0xfffce010
#define GPIO_INT_STATUS         0xfffce014
#define GPIO_PIN_CONTROL        0xfffce018
...
#define DSP_REG         0xE1017024

2. Interferes with MCBSP3 by writing direct to the control register.
   What if someone else is using MCBSP3?

        OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200);
        OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202);

   Besides, these aren't available for this driver (and quite
   rightfully so.)

3. doesn't check the omap_mcbsp_request() return value:

        omap_mcbsp_request(OMAP_MCBSP3);

4. doesn't check the return code from gpio_request():

        gpio_request(A_LCD_SSC_RD, "lcd_ssc_rd");
        gpio_request(A_LCD_SSC_SD, "lcd_ssc_sd");
        gpio_request(_A_LCD_RESET, "lcd_reset");
        gpio_request(_A_LCD_SSC_CS, "lcd_ssc_cs");
        gpio_request(_A_LCD_SSC_A0, "lcd_ssc_a0");

To me, it looks like this driver was tossed over into mainline without
any thought - it has never been in a buildable state.  Please fix or
remove this driver from mainline.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-25  2:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-23 16:46 Please fix lcd_sx1.c Russell King - ARM Linux
2008-11-23 16:57 ` Russell King - ARM Linux
2008-11-24 21:20   ` Tony Lindgren
2008-11-25  2:22     ` [PATCH] ARM: OMAP: Remove broken LCD driver for SX1 (Re: Please fix lcd_sx1.c) Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox