Hi Prabhakar, On 8/20/2012 7:38 PM, Prabhakar Lad wrote: > From: Manjunath Hadli <manjunath.ha...@ti.com> > > Add clock, pin mux definitions and registration function for > VPIF capture and display driver on DA850/OMAP-L138 SoC. > > Signed-off-by: Manjunath Hadli <manjunath.ha...@ti.com> > Signed-off-by: Lad, Prabhakar <prabhakar....@ti.com> > Cc: Sekhar Nori <nsek...@ti.com> > ---
> +/* VPIF resource, platform data */ > +static u64 da850_vpif_dma_mask = DMA_BIT_MASK(32); > + > +static struct resource da850_vpif_resource[] = { > + { > + .start = DA8XX_VPIF_BASE, > + .end = DA8XX_VPIF_BASE + 0xfff, > + .flags = IORESOURCE_MEM, > + } > +}; > + > +static struct platform_device da850_vpif_dev = { > + .name = "vpif", > + .id = -1, > + .dev = { > + .dma_mask = &da850_vpif_dma_mask, > + .coherent_dma_mask = DMA_BIT_MASK(32), > + }, > + .resource = da850_vpif_resource, > + .num_resources = ARRAY_SIZE(da850_vpif_resource), > +}; > + > +static struct platform_device da850_vpif_display_dev = { > + .name = "vpif_display", > + .id = -1, > + .dev = { > + .dma_mask = &da850_vpif_dma_mask, > + .coherent_dma_mask = DMA_BIT_MASK(32), > + }, > +}; > + > +static struct platform_device da850_vpif_capture_dev = { > + .name = "vpif_capture", > + .id = -1, > + .dev = { > + .dma_mask = &da850_vpif_dma_mask, > + .coherent_dma_mask = DMA_BIT_MASK(32), > + }, > +}; > + > +int __init da850_register_vpif(void) > +{ > + return platform_device_register(&da850_vpif_dev); > +} > + > +int __init da850_register_vpif_display(struct vpif_display_config > + *display_config) > +{ > + struct resource da850_vpif_display_resource[] = { > + { > + .start = IRQ_DA850_VPIFINT, > + .end = IRQ_DA850_VPIFINT, > + .flags = IORESOURCE_IRQ, > + }, > + }; > + int ret; > + > + ret = platform_device_add_resources(&da850_vpif_display_dev, > + da850_vpif_display_resource, > + ARRAY_SIZE(da850_vpif_display_resource)); Its not obvious to me why you need to add the resources here instead of just statically defining them as is usually done. Thanks, Sekhar -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/