> -----Original Message----- > From: Tomi Valkeinen [mailto:tomi.valkeinen@xxxxxxxxx] > Sent: Wednesday, August 25, 2010 2:01 PM > To: Guruswamy, Senthilvadivu > Cc: linux-omap@xxxxxxxxxxxxxxx; paul@xxxxxxxxx; Hilman, Kevin > Subject: Re: [PATCH 02/20] Move DSS driver register from > board to mach_omap2 > > On Mon, 2010-08-23 at 17:57 +0200, ext Guruswamy Senthilvadivu wrote: > > From: Senthilvadivu Guruswamy <svadivu@xxxxxx> > > > > Move the DSS driver register from board file to devices.c. > > Regulator initialisation done with driver name instead of > the device name. > > > > Signed-off-by: Senthilvadivu Guruswamy <svadivu@xxxxxx> > > --- > > > > > > /*------------------------------------------------------------ > ---------------*/ > > +#ifdef CONFIG_OMAP2_DSS > > + > > +static struct platform_device omap_display_device = { > > + .name = "omapdss", > > + .id = -1, > > + .dev = { > > + .platform_data = NULL, > > + }, > > +}; > > Could we call these "dss" instead of "display". Display sounds that it > could include panel. This includes panel data, as we assign board_data to the platform_data in the below function. In fact we could even change the .name = "omapdisplay" instead of "omapdss". > > > + > > +void __init omap_display_init(struct omap_dss_board_info > > + *board_data) > > +{ > > + > > + omap_display_device.dev.platform_data = board_data; > > + > > + if (platform_device_register(&omap_display_device) < 0) > > + printk(KERN_ERR "Unable to register > OMAP-Display device\n"); > > + > > + > > + return ; > > +} > > + > > +#else > > +void __init omap_display_init(struct omap_dss_board_info > *board_data) > > +{ > > +} > > +#endif > > + > > + > > > +/*----------------------------------------------------------- > ----------------*/ > > > > #if defined(CONFIG_VIDEO_OMAP2_VOUT) || \ > > defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE) > > diff --git a/arch/arm/plat-omap/include/plat/display.h > b/arch/arm/plat-omap/include/plat/display.h > > index 1c529ce..f5da4ae 100644 > > --- a/arch/arm/plat-omap/include/plat/display.h > > +++ b/arch/arm/plat-omap/include/plat/display.h > > @@ -23,6 +23,7 @@ > > #include <linux/list.h> > > #include <linux/kobject.h> > > #include <linux/device.h> > > +#include <linux/platform_device.h> > > #include <asm/atomic.h> > > > > #define DISPC_IRQ_FRAMEDONE (1 << 0) > > @@ -251,6 +252,9 @@ struct omap_dss_board_info { > > struct omap_dss_device *default_device; > > }; > > > > +/* Init with the board info */ > > +extern void omap_display_init(struct omap_dss_board_info > *board_data); > > + > > struct omap_video_timings { > > /* Unit: pixels */ > > u16 x_res; > > diff --git a/drivers/video/omap2/dss/core.c > b/drivers/video/omap2/dss/core.c > > index b3a498f..bcbb077 100644 > > --- a/drivers/video/omap2/dss/core.c > > +++ b/drivers/video/omap2/dss/core.c > > @@ -52,6 +52,7 @@ static struct { > > struct regulator *vdds_dsi_reg; > > struct regulator *vdds_sdi_reg; > > struct regulator *vdda_dac_reg; > > + struct omap_dss_board_info *pdata; > > } core; > > > > static void dss_clk_enable_all_no_ctx(void); > > @@ -501,6 +502,7 @@ static int omap_dss_probe(struct > platform_device *pdev) > > int i; > > > > core.pdev = pdev; > > + core.pdata = pdev->dev.platform_data; > > Why is pdata stored? It is available through pdev anyway. Yes, could be avoided. > > Tomi > > > ��.n��������+%������w��{.n�����{�������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f