On Mon, 2010-08-23 at 17:57 +0200, ext Guruswamy Senthilvadivu wrote:
> From: Senthilvadivu Guruswamy <svad...@ti.com>
> 
> 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 <svad...@ti.com>
> ---

>  
>  
> /*---------------------------------------------------------------------------*/
> +#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.

> +
> +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.

 Tomi


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

Reply via email to