diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:38:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:38:49 -0500 |
commit | 7c2db36e730ee4facd341679ecb21ee73ba92831 (patch) | |
tree | 75016fba72aaf0581b9263f7fa4c565e6e634f3c /drivers/video/exynos | |
parent | 8b5628ab83b671f96ac9f174c1bd51c92589fc82 (diff) | |
parent | a47a376f1c025e23e836c0376813c0424de665c2 (diff) |
Merge branch 'akpm' (incoming from Andrew)
Merge misc patches from Andrew Morton:
- Florian has vanished so I appear to have become fbdev maintainer
again :(
- Joel and Mark are distracted to welcome to the new OCFS2 maintainer
- The backlight queue
- Small core kernel changes
- lib/ updates
- The rtc queue
- Various random bits
* akpm: (164 commits)
rtc: rtc-davinci: use devm_*() functions
rtc: rtc-max8997: use devm_request_threaded_irq()
rtc: rtc-max8907: use devm_request_threaded_irq()
rtc: rtc-da9052: use devm_request_threaded_irq()
rtc: rtc-wm831x: use devm_request_threaded_irq()
rtc: rtc-tps80031: use devm_request_threaded_irq()
rtc: rtc-lp8788: use devm_request_threaded_irq()
rtc: rtc-coh901331: use devm_clk_get()
rtc: rtc-vt8500: use devm_*() functions
rtc: rtc-tps6586x: use devm_request_threaded_irq()
rtc: rtc-imxdi: use devm_clk_get()
rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug()
rtc: rtc-pcf8583: use dev_warn() instead of printk()
rtc: rtc-sun4v: use pr_warn() instead of printk()
rtc: rtc-vr41xx: use dev_info() instead of printk()
rtc: rtc-rs5c313: use pr_err() instead of printk()
rtc: rtc-at91rm9200: use dev_dbg()/dev_err() instead of printk()/pr_debug()
rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug()
rtc: rtc-ds2404: use dev_err() instead of printk()
rtc: rtc-efi: use dev_err()/dev_warn()/pr_err() instead of printk()
...
Diffstat (limited to 'drivers/video/exynos')
-rw-r--r-- | drivers/video/exynos/exynos_dp_core.c | 23 | ||||
-rw-r--r-- | drivers/video/exynos/exynos_mipi_dsi.c | 70 | ||||
-rw-r--r-- | drivers/video/exynos/s6e8ax0.c | 14 |
3 files changed, 37 insertions, 70 deletions
diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index 2ed97769aa6d..de9d4da0e3da 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c | |||
@@ -965,10 +965,11 @@ static struct exynos_dp_platdata *exynos_dp_dt_parse_pdata(struct device *dev) | |||
965 | 965 | ||
966 | static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) | 966 | static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) |
967 | { | 967 | { |
968 | struct device_node *dp_phy_node; | 968 | struct device_node *dp_phy_node = of_node_get(dp->dev->of_node); |
969 | u32 phy_base; | 969 | u32 phy_base; |
970 | int ret = 0; | ||
970 | 971 | ||
971 | dp_phy_node = of_find_node_by_name(dp->dev->of_node, "dptx-phy"); | 972 | dp_phy_node = of_find_node_by_name(dp_phy_node, "dptx-phy"); |
972 | if (!dp_phy_node) { | 973 | if (!dp_phy_node) { |
973 | dev_err(dp->dev, "could not find dptx-phy node\n"); | 974 | dev_err(dp->dev, "could not find dptx-phy node\n"); |
974 | return -ENODEV; | 975 | return -ENODEV; |
@@ -976,22 +977,28 @@ static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) | |||
976 | 977 | ||
977 | if (of_property_read_u32(dp_phy_node, "reg", &phy_base)) { | 978 | if (of_property_read_u32(dp_phy_node, "reg", &phy_base)) { |
978 | dev_err(dp->dev, "faild to get reg for dptx-phy\n"); | 979 | dev_err(dp->dev, "faild to get reg for dptx-phy\n"); |
979 | return -EINVAL; | 980 | ret = -EINVAL; |
981 | goto err; | ||
980 | } | 982 | } |
981 | 983 | ||
982 | if (of_property_read_u32(dp_phy_node, "samsung,enable-mask", | 984 | if (of_property_read_u32(dp_phy_node, "samsung,enable-mask", |
983 | &dp->enable_mask)) { | 985 | &dp->enable_mask)) { |
984 | dev_err(dp->dev, "faild to get enable-mask for dptx-phy\n"); | 986 | dev_err(dp->dev, "faild to get enable-mask for dptx-phy\n"); |
985 | return -EINVAL; | 987 | ret = -EINVAL; |
988 | goto err; | ||
986 | } | 989 | } |
987 | 990 | ||
988 | dp->phy_addr = ioremap(phy_base, SZ_4); | 991 | dp->phy_addr = ioremap(phy_base, SZ_4); |
989 | if (!dp->phy_addr) { | 992 | if (!dp->phy_addr) { |
990 | dev_err(dp->dev, "failed to ioremap dp-phy\n"); | 993 | dev_err(dp->dev, "failed to ioremap dp-phy\n"); |
991 | return -ENOMEM; | 994 | ret = -ENOMEM; |
995 | goto err; | ||
992 | } | 996 | } |
993 | 997 | ||
994 | return 0; | 998 | err: |
999 | of_node_put(dp_phy_node); | ||
1000 | |||
1001 | return ret; | ||
995 | } | 1002 | } |
996 | 1003 | ||
997 | static void exynos_dp_phy_init(struct exynos_dp_device *dp) | 1004 | static void exynos_dp_phy_init(struct exynos_dp_device *dp) |
@@ -1117,8 +1124,6 @@ static int exynos_dp_remove(struct platform_device *pdev) | |||
1117 | struct exynos_dp_platdata *pdata = pdev->dev.platform_data; | 1124 | struct exynos_dp_platdata *pdata = pdev->dev.platform_data; |
1118 | struct exynos_dp_device *dp = platform_get_drvdata(pdev); | 1125 | struct exynos_dp_device *dp = platform_get_drvdata(pdev); |
1119 | 1126 | ||
1120 | disable_irq(dp->irq); | ||
1121 | |||
1122 | flush_work(&dp->hotplug_work); | 1127 | flush_work(&dp->hotplug_work); |
1123 | 1128 | ||
1124 | if (pdev->dev.of_node) { | 1129 | if (pdev->dev.of_node) { |
@@ -1141,6 +1146,8 @@ static int exynos_dp_suspend(struct device *dev) | |||
1141 | struct exynos_dp_platdata *pdata = dev->platform_data; | 1146 | struct exynos_dp_platdata *pdata = dev->platform_data; |
1142 | struct exynos_dp_device *dp = dev_get_drvdata(dev); | 1147 | struct exynos_dp_device *dp = dev_get_drvdata(dev); |
1143 | 1148 | ||
1149 | disable_irq(dp->irq); | ||
1150 | |||
1144 | flush_work(&dp->hotplug_work); | 1151 | flush_work(&dp->hotplug_work); |
1145 | 1152 | ||
1146 | if (dev->of_node) { | 1153 | if (dev->of_node) { |
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c index 4a17cdccef34..fac7df6d1aba 100644 --- a/drivers/video/exynos/exynos_mipi_dsi.c +++ b/drivers/video/exynos/exynos_mipi_dsi.c | |||
@@ -338,7 +338,8 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) | |||
338 | struct mipi_dsim_ddi *dsim_ddi; | 338 | struct mipi_dsim_ddi *dsim_ddi; |
339 | int ret = -EINVAL; | 339 | int ret = -EINVAL; |
340 | 340 | ||
341 | dsim = kzalloc(sizeof(struct mipi_dsim_device), GFP_KERNEL); | 341 | dsim = devm_kzalloc(&pdev->dev, sizeof(struct mipi_dsim_device), |
342 | GFP_KERNEL); | ||
342 | if (!dsim) { | 343 | if (!dsim) { |
343 | dev_err(&pdev->dev, "failed to allocate dsim object.\n"); | 344 | dev_err(&pdev->dev, "failed to allocate dsim object.\n"); |
344 | return -ENOMEM; | 345 | return -ENOMEM; |
@@ -352,13 +353,13 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) | |||
352 | dsim_pd = (struct mipi_dsim_platform_data *)dsim->pd; | 353 | dsim_pd = (struct mipi_dsim_platform_data *)dsim->pd; |
353 | if (dsim_pd == NULL) { | 354 | if (dsim_pd == NULL) { |
354 | dev_err(&pdev->dev, "failed to get platform data for dsim.\n"); | 355 | dev_err(&pdev->dev, "failed to get platform data for dsim.\n"); |
355 | goto err_clock_get; | 356 | return -EINVAL; |
356 | } | 357 | } |
357 | /* get mipi_dsim_config. */ | 358 | /* get mipi_dsim_config. */ |
358 | dsim_config = dsim_pd->dsim_config; | 359 | dsim_config = dsim_pd->dsim_config; |
359 | if (dsim_config == NULL) { | 360 | if (dsim_config == NULL) { |
360 | dev_err(&pdev->dev, "failed to get dsim config data.\n"); | 361 | dev_err(&pdev->dev, "failed to get dsim config data.\n"); |
361 | goto err_clock_get; | 362 | return -EINVAL; |
362 | } | 363 | } |
363 | 364 | ||
364 | dsim->dsim_config = dsim_config; | 365 | dsim->dsim_config = dsim_config; |
@@ -366,41 +367,28 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) | |||
366 | 367 | ||
367 | mutex_init(&dsim->lock); | 368 | mutex_init(&dsim->lock); |
368 | 369 | ||
369 | ret = regulator_bulk_get(&pdev->dev, ARRAY_SIZE(supplies), supplies); | 370 | ret = devm_regulator_bulk_get(&pdev->dev, ARRAY_SIZE(supplies), |
371 | supplies); | ||
370 | if (ret) { | 372 | if (ret) { |
371 | dev_err(&pdev->dev, "Failed to get regulators: %d\n", ret); | 373 | dev_err(&pdev->dev, "Failed to get regulators: %d\n", ret); |
372 | goto err_clock_get; | 374 | return ret; |
373 | } | 375 | } |
374 | 376 | ||
375 | dsim->clock = clk_get(&pdev->dev, "dsim0"); | 377 | dsim->clock = devm_clk_get(&pdev->dev, "dsim0"); |
376 | if (IS_ERR(dsim->clock)) { | 378 | if (IS_ERR(dsim->clock)) { |
377 | dev_err(&pdev->dev, "failed to get dsim clock source\n"); | 379 | dev_err(&pdev->dev, "failed to get dsim clock source\n"); |
378 | ret = -ENODEV; | 380 | return -ENODEV; |
379 | goto err_clock_get; | ||
380 | } | 381 | } |
381 | 382 | ||
382 | clk_enable(dsim->clock); | 383 | clk_enable(dsim->clock); |
383 | 384 | ||
384 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 385 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
385 | if (!res) { | ||
386 | dev_err(&pdev->dev, "failed to get io memory region\n"); | ||
387 | ret = -ENODEV; | ||
388 | goto err_platform_get; | ||
389 | } | ||
390 | |||
391 | dsim->res = request_mem_region(res->start, resource_size(res), | ||
392 | dev_name(&pdev->dev)); | ||
393 | if (!dsim->res) { | ||
394 | dev_err(&pdev->dev, "failed to request io memory region\n"); | ||
395 | ret = -ENOMEM; | ||
396 | goto err_mem_region; | ||
397 | } | ||
398 | 386 | ||
399 | dsim->reg_base = ioremap(res->start, resource_size(res)); | 387 | dsim->reg_base = devm_request_and_ioremap(&pdev->dev, res); |
400 | if (!dsim->reg_base) { | 388 | if (!dsim->reg_base) { |
401 | dev_err(&pdev->dev, "failed to remap io region\n"); | 389 | dev_err(&pdev->dev, "failed to remap io region\n"); |
402 | ret = -ENOMEM; | 390 | ret = -ENOMEM; |
403 | goto err_ioremap; | 391 | goto error; |
404 | } | 392 | } |
405 | 393 | ||
406 | mutex_init(&dsim->lock); | 394 | mutex_init(&dsim->lock); |
@@ -410,26 +398,27 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev) | |||
410 | if (!dsim_ddi) { | 398 | if (!dsim_ddi) { |
411 | dev_err(&pdev->dev, "mipi_dsim_ddi object not found.\n"); | 399 | dev_err(&pdev->dev, "mipi_dsim_ddi object not found.\n"); |
412 | ret = -EINVAL; | 400 | ret = -EINVAL; |
413 | goto err_bind; | 401 | goto error; |
414 | } | 402 | } |
415 | 403 | ||
416 | dsim->irq = platform_get_irq(pdev, 0); | 404 | dsim->irq = platform_get_irq(pdev, 0); |
417 | if (dsim->irq < 0) { | 405 | if (IS_ERR_VALUE(dsim->irq)) { |
418 | dev_err(&pdev->dev, "failed to request dsim irq resource\n"); | 406 | dev_err(&pdev->dev, "failed to request dsim irq resource\n"); |
419 | ret = -EINVAL; | 407 | ret = -EINVAL; |
420 | goto err_platform_get_irq; | 408 | goto error; |
421 | } | 409 | } |
422 | 410 | ||
423 | init_completion(&dsim_wr_comp); | 411 | init_completion(&dsim_wr_comp); |
424 | init_completion(&dsim_rd_comp); | 412 | init_completion(&dsim_rd_comp); |
425 | platform_set_drvdata(pdev, dsim); | 413 | platform_set_drvdata(pdev, dsim); |
426 | 414 | ||
427 | ret = request_irq(dsim->irq, exynos_mipi_dsi_interrupt_handler, | 415 | ret = devm_request_irq(&pdev->dev, dsim->irq, |
416 | exynos_mipi_dsi_interrupt_handler, | ||
428 | IRQF_SHARED, dev_name(&pdev->dev), dsim); | 417 | IRQF_SHARED, dev_name(&pdev->dev), dsim); |
429 | if (ret != 0) { | 418 | if (ret != 0) { |
430 | dev_err(&pdev->dev, "failed to request dsim irq\n"); | 419 | dev_err(&pdev->dev, "failed to request dsim irq\n"); |
431 | ret = -EINVAL; | 420 | ret = -EINVAL; |
432 | goto err_bind; | 421 | goto error; |
433 | } | 422 | } |
434 | 423 | ||
435 | /* enable interrupts */ | 424 | /* enable interrupts */ |
@@ -471,22 +460,8 @@ done: | |||
471 | 460 | ||
472 | return 0; | 461 | return 0; |
473 | 462 | ||
474 | err_bind: | 463 | error: |
475 | iounmap(dsim->reg_base); | ||
476 | |||
477 | err_ioremap: | ||
478 | release_mem_region(dsim->res->start, resource_size(dsim->res)); | ||
479 | |||
480 | err_mem_region: | ||
481 | release_resource(dsim->res); | ||
482 | |||
483 | err_platform_get: | ||
484 | clk_disable(dsim->clock); | 464 | clk_disable(dsim->clock); |
485 | clk_put(dsim->clock); | ||
486 | err_clock_get: | ||
487 | kfree(dsim); | ||
488 | |||
489 | err_platform_get_irq: | ||
490 | return ret; | 465 | return ret; |
491 | } | 466 | } |
492 | 467 | ||
@@ -496,13 +471,7 @@ static int exynos_mipi_dsi_remove(struct platform_device *pdev) | |||
496 | struct mipi_dsim_ddi *dsim_ddi, *next; | 471 | struct mipi_dsim_ddi *dsim_ddi, *next; |
497 | struct mipi_dsim_lcd_driver *dsim_lcd_drv; | 472 | struct mipi_dsim_lcd_driver *dsim_lcd_drv; |
498 | 473 | ||
499 | iounmap(dsim->reg_base); | ||
500 | |||
501 | clk_disable(dsim->clock); | 474 | clk_disable(dsim->clock); |
502 | clk_put(dsim->clock); | ||
503 | |||
504 | release_resource(dsim->res); | ||
505 | release_mem_region(dsim->res->start, resource_size(dsim->res)); | ||
506 | 475 | ||
507 | list_for_each_entry_safe(dsim_ddi, next, &dsim_ddi_list, list) { | 476 | list_for_each_entry_safe(dsim_ddi, next, &dsim_ddi_list, list) { |
508 | if (dsim_ddi) { | 477 | if (dsim_ddi) { |
@@ -518,9 +487,6 @@ static int exynos_mipi_dsi_remove(struct platform_device *pdev) | |||
518 | } | 487 | } |
519 | } | 488 | } |
520 | 489 | ||
521 | regulator_bulk_free(ARRAY_SIZE(supplies), supplies); | ||
522 | kfree(dsim); | ||
523 | |||
524 | return 0; | 490 | return 0; |
525 | } | 491 | } |
526 | 492 | ||
diff --git a/drivers/video/exynos/s6e8ax0.c b/drivers/video/exynos/s6e8ax0.c index 05d080b63bc0..ca2602413aa4 100644 --- a/drivers/video/exynos/s6e8ax0.c +++ b/drivers/video/exynos/s6e8ax0.c | |||
@@ -776,7 +776,7 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev) | |||
776 | int ret; | 776 | int ret; |
777 | u8 mtp_id[3] = {0, }; | 777 | u8 mtp_id[3] = {0, }; |
778 | 778 | ||
779 | lcd = kzalloc(sizeof(struct s6e8ax0), GFP_KERNEL); | 779 | lcd = devm_kzalloc(&dsim_dev->dev, sizeof(struct s6e8ax0), GFP_KERNEL); |
780 | if (!lcd) { | 780 | if (!lcd) { |
781 | dev_err(&dsim_dev->dev, "failed to allocate s6e8ax0 structure.\n"); | 781 | dev_err(&dsim_dev->dev, "failed to allocate s6e8ax0 structure.\n"); |
782 | return -ENOMEM; | 782 | return -ENOMEM; |
@@ -788,18 +788,17 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev) | |||
788 | 788 | ||
789 | mutex_init(&lcd->lock); | 789 | mutex_init(&lcd->lock); |
790 | 790 | ||
791 | ret = regulator_bulk_get(lcd->dev, ARRAY_SIZE(supplies), supplies); | 791 | ret = devm_regulator_bulk_get(lcd->dev, ARRAY_SIZE(supplies), supplies); |
792 | if (ret) { | 792 | if (ret) { |
793 | dev_err(lcd->dev, "Failed to get regulators: %d\n", ret); | 793 | dev_err(lcd->dev, "Failed to get regulators: %d\n", ret); |
794 | goto err_lcd_register; | 794 | return ret; |
795 | } | 795 | } |
796 | 796 | ||
797 | lcd->ld = lcd_device_register("s6e8ax0", lcd->dev, lcd, | 797 | lcd->ld = lcd_device_register("s6e8ax0", lcd->dev, lcd, |
798 | &s6e8ax0_lcd_ops); | 798 | &s6e8ax0_lcd_ops); |
799 | if (IS_ERR(lcd->ld)) { | 799 | if (IS_ERR(lcd->ld)) { |
800 | dev_err(lcd->dev, "failed to register lcd ops.\n"); | 800 | dev_err(lcd->dev, "failed to register lcd ops.\n"); |
801 | ret = PTR_ERR(lcd->ld); | 801 | return PTR_ERR(lcd->ld); |
802 | goto err_lcd_register; | ||
803 | } | 802 | } |
804 | 803 | ||
805 | lcd->bd = backlight_device_register("s6e8ax0-bl", lcd->dev, lcd, | 804 | lcd->bd = backlight_device_register("s6e8ax0-bl", lcd->dev, lcd, |
@@ -838,11 +837,6 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev) | |||
838 | 837 | ||
839 | err_backlight_register: | 838 | err_backlight_register: |
840 | lcd_device_unregister(lcd->ld); | 839 | lcd_device_unregister(lcd->ld); |
841 | |||
842 | err_lcd_register: | ||
843 | regulator_bulk_free(ARRAY_SIZE(supplies), supplies); | ||
844 | kfree(lcd); | ||
845 | |||
846 | return ret; | 840 | return ret; |
847 | } | 841 | } |
848 | 842 | ||