aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dsi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-08-03 07:00:57 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-30 09:16:05 -0400
commit7c68dd96d5a5eefe3ff6d9b94fc98fd9378aff1f (patch)
treea290698ee2c1b07679aec55523c06f3d71875e3e /drivers/video/omap2/dss/dsi.c
parentf36465822d2e2651e03baf5c4c1a90ee4c1f9cdd (diff)
OMAP: DSS2: Change DSI device naming
Currently, there are 2 differently named platform devices generated for the 2 DSS DSI modules. In order to use the same driver, the dsi devices should be 2 instances of the same platform device. Change the platform device names from "omapdss_dsi1" and "omapdss_dsi2" to omapdss_dsi", and set the device indices to 0 and 1. Signed-off-by: Archit Taneja <archit@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dsi.c')
-rw-r--r--drivers/video/omap2/dss/dsi.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index d167a5473c6..713e1d9ac0e 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -368,14 +368,9 @@ struct platform_device *dsi_get_dsidev_from_id(int module)
368 return dsi_pdev_map[module]; 368 return dsi_pdev_map[module];
369} 369}
370 370
371static int dsi_get_dsidev_id(struct platform_device *dsidev) 371static inline int dsi_get_dsidev_id(struct platform_device *dsidev)
372{ 372{
373 /* TEMP: Pass 0 as the dsi module index till the time the dsi platform 373 return dsidev->id;
374 * device names aren't changed to the form "omapdss_dsi.0",
375 * "omapdss_dsi.1" and so on */
376 BUG_ON(dsidev->id != -1);
377
378 return 0;
379} 374}
380 375
381static inline void dsi_write_reg(struct platform_device *dsidev, 376static inline void dsi_write_reg(struct platform_device *dsidev,
@@ -4465,7 +4460,7 @@ static void dsi_put_clocks(struct platform_device *dsidev)
4465} 4460}
4466 4461
4467/* DSI1 HW IP initialisation */ 4462/* DSI1 HW IP initialisation */
4468static int omap_dsi1hw_probe(struct platform_device *dsidev) 4463static int omap_dsihw_probe(struct platform_device *dsidev)
4469{ 4464{
4470 struct omap_display_platform_data *dss_plat_data; 4465 struct omap_display_platform_data *dss_plat_data;
4471 struct omap_dss_board_info *board_info; 4466 struct omap_dss_board_info *board_info;
@@ -4575,7 +4570,7 @@ err_alloc:
4575 return r; 4570 return r;
4576} 4571}
4577 4572
4578static int omap_dsi1hw_remove(struct platform_device *dsidev) 4573static int omap_dsihw_remove(struct platform_device *dsidev)
4579{ 4574{
4580 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 4575 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
4581 4576
@@ -4636,11 +4631,11 @@ static const struct dev_pm_ops dsi_pm_ops = {
4636 .runtime_resume = dsi_runtime_resume, 4631 .runtime_resume = dsi_runtime_resume,
4637}; 4632};
4638 4633
4639static struct platform_driver omap_dsi1hw_driver = { 4634static struct platform_driver omap_dsihw_driver = {
4640 .probe = omap_dsi1hw_probe, 4635 .probe = omap_dsihw_probe,
4641 .remove = omap_dsi1hw_remove, 4636 .remove = omap_dsihw_remove,
4642 .driver = { 4637 .driver = {
4643 .name = "omapdss_dsi1", 4638 .name = "omapdss_dsi",
4644 .owner = THIS_MODULE, 4639 .owner = THIS_MODULE,
4645 .pm = &dsi_pm_ops, 4640 .pm = &dsi_pm_ops,
4646 }, 4641 },
@@ -4648,10 +4643,10 @@ static struct platform_driver omap_dsi1hw_driver = {
4648 4643
4649int dsi_init_platform_driver(void) 4644int dsi_init_platform_driver(void)
4650{ 4645{
4651 return platform_driver_register(&omap_dsi1hw_driver); 4646 return platform_driver_register(&omap_dsihw_driver);
4652} 4647}
4653 4648
4654void dsi_uninit_platform_driver(void) 4649void dsi_uninit_platform_driver(void)
4655{ 4650{
4656 return platform_driver_unregister(&omap_dsi1hw_driver); 4651 return platform_driver_unregister(&omap_dsihw_driver);
4657} 4652}