RE: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display
-Original Message- From: G, Manjunath Kondaiah Sent: Tuesday, November 24, 2009 9:44 PM To: Y, Kishore; linux-omap@vger.kernel.org Subject: RE: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display -Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Y, Kishore Sent: Friday, November 20, 2009 7:58 PM To: linux-omap@vger.kernel.org Subject: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display From df64194feedc16c3f3f552dc26bc3050b7245005 Mon Sep 17 00:00:00 2001 From: Mukund Mittal mmit...@ti.com Date: Fri, 20 Nov 2009 18:35:26 +0530 Subject: [PATCH] ZOOM: DSS2: Add nec panel for zoom display Nec panel has been added which is used on both zoom2 and zoom3 boards Signed-off-by: Kishore Y kishor...@ti.com --- drivers/video/omap2/displays/panel-nec.c | 291 ++ 1 files changed, 291 insertions(+), 0 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-nec.c diff --git a/drivers/video/omap2/displays/panel-nec.c b/drivers/video/omap2/displays/panel-nec.c new file mode 100644 index 000..c18f3ba --- /dev/null +++ b/drivers/video/omap2/displays/panel-nec.c @@ -0,0 +1,291 @@ +/* + * NEC panel support + * + * Copyright (C) 2008 Nokia Corporation + * Author: Tomi Valkeinen tomi.valkei...@nokia.com + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see http://www.gnu.org/licenses/. + */ + +#include linux/module.h +#include linux/delay.h +#include linux/platform_device.h +#include linux/i2c/twl4030.h +#include linux/spi/spi.h + +#include mach/gpio.h This will break the build since header files are moved to plat-omap. Comments taken. I will release v2 soon with all comments incorporated +#include mach/gpio.h Remove this. +#include plat/mux.h +#include asm/mach-types.h +#include plat/control.h + Remove extra line. Comments taken +#include plat/display.h + +#define LCD_XRES 800 +#define LCD_YRES 480 + Remove extra line. +#define LCD_PIXCLOCK_MIN 21800 /* NEC MIN PIX Clock is 21.8MHz */ +#define LCD_PIXCLOCK_TYP 23800 /* Typical PIX clock is 23.8MHz */ +#define LCD_PIXCLOCK_MAX 25700 /* Maximum is 25.7MHz */ + -Ditto- +/* Current Pixel clock */ +#define LCD_PIXEL_CLOCKLCD_PIXCLOCK_MIN + + -Ditto- +/*NEC NL8048HL11-01B Manual + * defines HFB, HSW, HBP, VFP, VSW, VBP as shown below + */ + +static struct omap_video_timings nec_panel_timings = { + /* 800 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ + .x_res = LCD_XRES, + .y_res = LCD_YRES, + .pixel_clock= LCD_PIXEL_CLOCK, + .hfp= 6, + .hsw= 1, + .hbp= 4, + .vfp= 3, + .vsw= 1, + .vbp= 4, +}; + +static int nec_panel_probe(struct omap_dss_device *dssdev) +{ + dssdev-panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | +OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_RF | +OMAP_DSS_LCD_ONOFF; Checkpatch error - ERROR: code indent should use tabs where possible + dssdev-panel.timings = nec_panel_timings; + dssdev-panel.recommended_bpp = 16; + + return 0; +} This function will always return zero. Either check for sanity of function Parameters or change return value of the API to void. + +static void nec_panel_remove(struct omap_dss_device *dssdev) +{ +} + +static int nec_panel_enable(struct omap_dss_device *dssdev) +{ + int r = 0; + + mdelay(4); Add comment to justify the delay values used. + if (dssdev-platform_enable) + r = dssdev-platform_enable(dssdev); + + return r; dssdev parameter is never used inside platform_enable. I guess platform_enable will always return zero. Please take care of error checking conditions. +} + +static void nec_panel_disable(struct omap_dss_device *dssdev) +{ + if (dssdev-platform_disable) + dssdev-platform_disable(dssdev); dssdev parameter is never used inside platform_disable + mdelay(4); Add comment to justify the delay values used. +} + +static int nec_panel_suspend(struct omap_dss_device *dssdev) +{ + nec_panel_disable
Re: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display
Hi, On Fri, 2009-11-20 at 15:27 +0100, ext Y, Kishore wrote: From df64194feedc16c3f3f552dc26bc3050b7245005 Mon Sep 17 00:00:00 2001 From: Mukund Mittal mmit...@ti.com Date: Fri, 20 Nov 2009 18:35:26 +0530 Subject: [PATCH] ZOOM: DSS2: Add nec panel for zoom display Nec panel has been added which is used on both zoom2 and zoom3 boards Please name the file and the driver with a bit more spesific name. Like panel-nec-nl8048hl11-01b.c, if that is the code of the panel. I'm sure there are many other panels from NEC also =). And fix the copyright and author in the comment. Tomi Signed-off-by: Kishore Y kishor...@ti.com --- drivers/video/omap2/displays/panel-nec.c | 291 ++ 1 files changed, 291 insertions(+), 0 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-nec.c diff --git a/drivers/video/omap2/displays/panel-nec.c b/drivers/video/omap2/displays/panel-nec.c new file mode 100644 index 000..c18f3ba --- /dev/null +++ b/drivers/video/omap2/displays/panel-nec.c @@ -0,0 +1,291 @@ +/* + * NEC panel support + * + * Copyright (C) 2008 Nokia Corporation + * Author: Tomi Valkeinen tomi.valkei...@nokia.com + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see http://www.gnu.org/licenses/. + */ + +#include linux/module.h +#include linux/delay.h +#include linux/platform_device.h +#include linux/i2c/twl4030.h +#include linux/spi/spi.h + +#include mach/gpio.h +#include mach/gpio.h +#include plat/mux.h +#include asm/mach-types.h +#include plat/control.h + +#include plat/display.h + +#define LCD_XRES 800 +#define LCD_YRES 480 + +#define LCD_PIXCLOCK_MIN 21800 /* NEC MIN PIX Clock is 21.8MHz */ +#define LCD_PIXCLOCK_TYP 23800 /* Typical PIX clock is 23.8MHz */ +#define LCD_PIXCLOCK_MAX 25700 /* Maximum is 25.7MHz */ + +/* Current Pixel clock */ +#define LCD_PIXEL_CLOCK LCD_PIXCLOCK_MIN + + +/*NEC NL8048HL11-01B Manual + * defines HFB, HSW, HBP, VFP, VSW, VBP as shown below + */ + +static struct omap_video_timings nec_panel_timings = { + /* 800 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ + .x_res = LCD_XRES, + .y_res = LCD_YRES, + .pixel_clock= LCD_PIXEL_CLOCK, + .hfp= 6, + .hsw= 1, + .hbp= 4, + .vfp= 3, + .vsw= 1, + .vbp= 4, +}; + +static int nec_panel_probe(struct omap_dss_device *dssdev) +{ + dssdev-panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | +OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_RF | +OMAP_DSS_LCD_ONOFF; + dssdev-panel.timings = nec_panel_timings; + dssdev-panel.recommended_bpp = 16; + + return 0; +} + +static void nec_panel_remove(struct omap_dss_device *dssdev) +{ +} + +static int nec_panel_enable(struct omap_dss_device *dssdev) +{ + int r = 0; + + mdelay(4); + if (dssdev-platform_enable) + r = dssdev-platform_enable(dssdev); + + return r; +} + +static void nec_panel_disable(struct omap_dss_device *dssdev) +{ + if (dssdev-platform_disable) + dssdev-platform_disable(dssdev); + mdelay(4); +} + +static int nec_panel_suspend(struct omap_dss_device *dssdev) +{ + nec_panel_disable(dssdev); + return 0; +} + +static int nec_panel_resume(struct omap_dss_device *dssdev) +{ + return nec_panel_enable(dssdev); +} + +static struct omap_dss_driver nec_driver = { + .probe = nec_panel_probe, + .remove = nec_panel_remove, + + .enable = nec_panel_enable, + .disable= nec_panel_disable, + .suspend= nec_panel_suspend, + .resume = nec_panel_resume, + + .driver = { + .name = NEC_panel, + .owner = THIS_MODULE, + }, +}; + +static int +spi_send(struct spi_device *spi, unsigned char reg_addr, unsigned char reg_data) +{ + int ret = 0; + unsigned int cmd = 0; + unsigned int data = 0; + + cmd = 0x | reg_addr; /* register address write */ + data = 0x0100 | reg_data ; /* register data write */ + data = (cmd 16) | data; + if (spi_write(spi, (unsigned char *)data, 4)) + printk(KERN_WARNING error in spi_write %x\n, data); +
RE: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display
-Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Y, Kishore Sent: Friday, November 20, 2009 7:58 PM To: linux-omap@vger.kernel.org Subject: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display From df64194feedc16c3f3f552dc26bc3050b7245005 Mon Sep 17 00:00:00 2001 From: Mukund Mittal mmit...@ti.com Date: Fri, 20 Nov 2009 18:35:26 +0530 Subject: [PATCH] ZOOM: DSS2: Add nec panel for zoom display Nec panel has been added which is used on both zoom2 and zoom3 boards Signed-off-by: Kishore Y kishor...@ti.com --- drivers/video/omap2/displays/panel-nec.c | 291 ++ 1 files changed, 291 insertions(+), 0 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-nec.c diff --git a/drivers/video/omap2/displays/panel-nec.c b/drivers/video/omap2/displays/panel-nec.c new file mode 100644 index 000..c18f3ba --- /dev/null +++ b/drivers/video/omap2/displays/panel-nec.c @@ -0,0 +1,291 @@ +/* + * NEC panel support + * + * Copyright (C) 2008 Nokia Corporation + * Author: Tomi Valkeinen tomi.valkei...@nokia.com + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see http://www.gnu.org/licenses/. + */ + +#include linux/module.h +#include linux/delay.h +#include linux/platform_device.h +#include linux/i2c/twl4030.h +#include linux/spi/spi.h + +#include mach/gpio.h This will break the build since header files are moved to plat-omap. +#include mach/gpio.h Remove this. +#include plat/mux.h +#include asm/mach-types.h +#include plat/control.h + Remove extra line. +#include plat/display.h + +#define LCD_XRES 800 +#define LCD_YRES 480 + Remove extra line. +#define LCD_PIXCLOCK_MIN 21800 /* NEC MIN PIX Clock is 21.8MHz */ +#define LCD_PIXCLOCK_TYP 23800 /* Typical PIX clock is 23.8MHz */ +#define LCD_PIXCLOCK_MAX 25700 /* Maximum is 25.7MHz */ + -Ditto- +/* Current Pixel clock */ +#define LCD_PIXEL_CLOCK LCD_PIXCLOCK_MIN + + -Ditto- +/*NEC NL8048HL11-01B Manual + * defines HFB, HSW, HBP, VFP, VSW, VBP as shown below + */ + +static struct omap_video_timings nec_panel_timings = { + /* 800 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ + .x_res = LCD_XRES, + .y_res = LCD_YRES, + .pixel_clock= LCD_PIXEL_CLOCK, + .hfp= 6, + .hsw= 1, + .hbp= 4, + .vfp= 3, + .vsw= 1, + .vbp= 4, +}; + +static int nec_panel_probe(struct omap_dss_device *dssdev) +{ + dssdev-panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | +OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_RF | +OMAP_DSS_LCD_ONOFF; Checkpatch error - ERROR: code indent should use tabs where possible + dssdev-panel.timings = nec_panel_timings; + dssdev-panel.recommended_bpp = 16; + + return 0; +} This function will always return zero. Either check for sanity of function Parameters or change return value of the API to void. + +static void nec_panel_remove(struct omap_dss_device *dssdev) +{ +} + +static int nec_panel_enable(struct omap_dss_device *dssdev) +{ + int r = 0; + + mdelay(4); Add comment to justify the delay values used. + if (dssdev-platform_enable) + r = dssdev-platform_enable(dssdev); + + return r; dssdev parameter is never used inside platform_enable. I guess platform_enable will always return zero. Please take care of error checking conditions. +} + +static void nec_panel_disable(struct omap_dss_device *dssdev) +{ + if (dssdev-platform_disable) + dssdev-platform_disable(dssdev); dssdev parameter is never used inside platform_disable + mdelay(4); Add comment to justify the delay values used. +} + +static int nec_panel_suspend(struct omap_dss_device *dssdev) +{ + nec_panel_disable(dssdev); + return 0; +} No error checking. Always returns zero. + +static int nec_panel_resume(struct omap_dss_device *dssdev) +{ + return nec_panel_enable(dssdev); +} dssdev parameter is never used inside nec_panel_enable(...) No error checking. Always returns zero. + +static struct omap_dss_driver nec_driver = { + .probe = nec_panel_probe, + .remove
RE: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display
-Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- ow...@vger.kernel.org] On Behalf Of Y, Kishore Sent: Friday, November 20, 2009 7:58 PM To: linux-omap@vger.kernel.org Subject: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display From df64194feedc16c3f3f552dc26bc3050b7245005 Mon Sep 17 00:00:00 2001 From: Mukund Mittal mmit...@ti.com Date: Fri, 20 Nov 2009 18:35:26 +0530 Subject: [PATCH] ZOOM: DSS2: Add nec panel for zoom display Nec panel has been added which is used on both zoom2 and zoom3 boards Signed-off-by: Kishore Y kishor...@ti.com --- drivers/video/omap2/displays/panel-nec.c | 291 ++ 1 files changed, 291 insertions(+), 0 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-nec.c diff --git a/drivers/video/omap2/displays/panel-nec.c b/drivers/video/omap2/displays/panel-nec.c new file mode 100644 index 000..c18f3ba --- /dev/null +++ b/drivers/video/omap2/displays/panel-nec.c @@ -0,0 +1,291 @@ +/* + * NEC panel support + * + * Copyright (C) 2008 Nokia Corporation + * Author: Tomi Valkeinen tomi.valkei...@nokia.com + * [Hiremath, Vaibhav] Can you please verify/cross-check this? Thanks, Vaibhav + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see http://www.gnu.org/licenses/. + */ + +#include linux/module.h +#include linux/delay.h +#include linux/platform_device.h +#include linux/i2c/twl4030.h +#include linux/spi/spi.h + +#include mach/gpio.h +#include mach/gpio.h +#include plat/mux.h +#include asm/mach-types.h +#include plat/control.h + +#include plat/display.h + +#define LCD_XRES 800 +#define LCD_YRES 480 + +#define LCD_PIXCLOCK_MIN 21800 /* NEC MIN PIX Clock is 21.8MHz */ +#define LCD_PIXCLOCK_TYP 23800 /* Typical PIX clock is 23.8MHz */ +#define LCD_PIXCLOCK_MAX 25700 /* Maximum is 25.7MHz */ + +/* Current Pixel clock */ +#define LCD_PIXEL_CLOCK LCD_PIXCLOCK_MIN + + +/*NEC NL8048HL11-01B Manual + * defines HFB, HSW, HBP, VFP, VSW, VBP as shown below + */ + +static struct omap_video_timings nec_panel_timings = { + /* 800 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ + .x_res = LCD_XRES, + .y_res = LCD_YRES, + .pixel_clock= LCD_PIXEL_CLOCK, + .hfp= 6, + .hsw= 1, + .hbp= 4, + .vfp= 3, + .vsw= 1, + .vbp= 4, +}; + +static int nec_panel_probe(struct omap_dss_device *dssdev) +{ + dssdev-panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | +OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_RF | +OMAP_DSS_LCD_ONOFF; + dssdev-panel.timings = nec_panel_timings; + dssdev-panel.recommended_bpp = 16; + + return 0; +} + +static void nec_panel_remove(struct omap_dss_device *dssdev) +{ +} + +static int nec_panel_enable(struct omap_dss_device *dssdev) +{ + int r = 0; + + mdelay(4); + if (dssdev-platform_enable) + r = dssdev-platform_enable(dssdev); + + return r; +} + +static void nec_panel_disable(struct omap_dss_device *dssdev) +{ + if (dssdev-platform_disable) + dssdev-platform_disable(dssdev); + mdelay(4); +} + +static int nec_panel_suspend(struct omap_dss_device *dssdev) +{ + nec_panel_disable(dssdev); + return 0; +} + +static int nec_panel_resume(struct omap_dss_device *dssdev) +{ + return nec_panel_enable(dssdev); +} + +static struct omap_dss_driver nec_driver = { + .probe = nec_panel_probe, + .remove = nec_panel_remove, + + .enable = nec_panel_enable, + .disable= nec_panel_disable, + .suspend= nec_panel_suspend, + .resume = nec_panel_resume, + + .driver = { + .name = NEC_panel, + .owner = THIS_MODULE, + }, +}; + +static int +spi_send(struct spi_device *spi, unsigned char reg_addr, unsigned char reg_data) +{ + int ret = 0; + unsigned int cmd = 0; + unsigned int data = 0; + + cmd = 0x | reg_addr; /* register address write */ + data = 0x0100 | reg_data ; /* register data write */ + data = (cmd 16) | data; + if (spi_write(spi, (unsigned char *)data, 4)) +
RE: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display
-Original Message- From: Hiremath, Vaibhav Sent: Monday, November 23, 2009 3:06 PM To: Y, Kishore; linux-omap@vger.kernel.org Subject: RE: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display -Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- ow...@vger.kernel.org] On Behalf Of Y, Kishore Sent: Friday, November 20, 2009 7:58 PM To: linux-omap@vger.kernel.org Subject: [PATCH 2/5] ZOOM: DSS2: Add nec panel for zoom display From df64194feedc16c3f3f552dc26bc3050b7245005 Mon Sep 17 00:00:00 2001 From: Mukund Mittal mmit...@ti.com Date: Fri, 20 Nov 2009 18:35:26 +0530 Subject: [PATCH] ZOOM: DSS2: Add nec panel for zoom display Nec panel has been added which is used on both zoom2 and zoom3 boards Signed-off-by: Kishore Y kishor...@ti.com --- drivers/video/omap2/displays/panel-nec.c | 291 ++ 1 files changed, 291 insertions(+), 0 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-nec.c diff --git a/drivers/video/omap2/displays/panel-nec.c b/drivers/video/omap2/displays/panel-nec.c new file mode 100644 index 000..c18f3ba --- /dev/null +++ b/drivers/video/omap2/displays/panel-nec.c @@ -0,0 +1,291 @@ +/* + * NEC panel support + * + * Copyright (C) 2008 Nokia Corporation + * Author: Tomi Valkeinen tomi.valkei...@nokia.com + * [Hiremath, Vaibhav] Can you please verify/cross-check this? Thanks, Vaibhav Mistake from my side. I will check it out and update the patch. Regards, Kishore Y + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see http://www.gnu.org/licenses/. + */ + +#include linux/module.h +#include linux/delay.h +#include linux/platform_device.h +#include linux/i2c/twl4030.h +#include linux/spi/spi.h + +#include mach/gpio.h +#include mach/gpio.h +#include plat/mux.h +#include asm/mach-types.h +#include plat/control.h + +#include plat/display.h + +#define LCD_XRES 800 +#define LCD_YRES 480 + +#define LCD_PIXCLOCK_MIN 21800 /* NEC MIN PIX Clock is 21.8MHz */ +#define LCD_PIXCLOCK_TYP 23800 /* Typical PIX clock is 23.8MHz */ +#define LCD_PIXCLOCK_MAX 25700 /* Maximum is 25.7MHz */ + +/* Current Pixel clock */ +#define LCD_PIXEL_CLOCKLCD_PIXCLOCK_MIN + + +/*NEC NL8048HL11-01B Manual + * defines HFB, HSW, HBP, VFP, VSW, VBP as shown below + */ + +static struct omap_video_timings nec_panel_timings = { + /* 800 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ + .x_res = LCD_XRES, + .y_res = LCD_YRES, + .pixel_clock= LCD_PIXEL_CLOCK, + .hfp= 6, + .hsw= 1, + .hbp= 4, + .vfp= 3, + .vsw= 1, + .vbp= 4, +}; + +static int nec_panel_probe(struct omap_dss_device *dssdev) +{ + dssdev-panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | +OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_RF | +OMAP_DSS_LCD_ONOFF; + dssdev-panel.timings = nec_panel_timings; + dssdev-panel.recommended_bpp = 16; + + return 0; +} + +static void nec_panel_remove(struct omap_dss_device *dssdev) +{ +} + +static int nec_panel_enable(struct omap_dss_device *dssdev) +{ + int r = 0; + + mdelay(4); + if (dssdev-platform_enable) + r = dssdev-platform_enable(dssdev); + + return r; +} + +static void nec_panel_disable(struct omap_dss_device *dssdev) +{ + if (dssdev-platform_disable) + dssdev-platform_disable(dssdev); + mdelay(4); +} + +static int nec_panel_suspend(struct omap_dss_device *dssdev) +{ + nec_panel_disable(dssdev); + return 0; +} + +static int nec_panel_resume(struct omap_dss_device *dssdev) +{ + return nec_panel_enable(dssdev); +} + +static struct omap_dss_driver nec_driver = { + .probe = nec_panel_probe, + .remove = nec_panel_remove, + + .enable = nec_panel_enable, + .disable= nec_panel_disable, + .suspend= nec_panel_suspend, + .resume = nec_panel_resume, + + .driver = { + .name = NEC_panel, + .owner = THIS_MODULE, + }, +}; + +static int +spi_send(struct