Lines Matching refs:dp
27 static int exynos_dp_init_dp(struct exynos_dp_device *dp) in exynos_dp_init_dp() argument
29 exynos_dp_reset(dp); in exynos_dp_init_dp()
31 exynos_dp_swreset(dp); in exynos_dp_init_dp()
33 exynos_dp_init_analog_param(dp); in exynos_dp_init_dp()
34 exynos_dp_init_interrupt(dp); in exynos_dp_init_dp()
37 exynos_dp_enable_sw_function(dp); in exynos_dp_init_dp()
39 exynos_dp_config_interrupt(dp); in exynos_dp_init_dp()
40 exynos_dp_init_analog_func(dp); in exynos_dp_init_dp()
42 exynos_dp_init_hpd(dp); in exynos_dp_init_dp()
43 exynos_dp_init_aux(dp); in exynos_dp_init_dp()
48 static int exynos_dp_detect_hpd(struct exynos_dp_device *dp) in exynos_dp_detect_hpd() argument
52 while (exynos_dp_get_plug_in_status(dp) != 0) { in exynos_dp_detect_hpd()
55 dev_err(dp->dev, "failed to get hpd plug status\n"); in exynos_dp_detect_hpd()
75 static int exynos_dp_read_edid(struct exynos_dp_device *dp) in exynos_dp_read_edid() argument
90 retval = exynos_dp_read_byte_from_i2c(dp, I2C_EDID_DEVICE_ADDR, in exynos_dp_read_edid()
97 dev_dbg(dp->dev, "EDID data includes a single extension!\n"); in exynos_dp_read_edid()
100 retval = exynos_dp_read_bytes_from_i2c(dp, I2C_EDID_DEVICE_ADDR, in exynos_dp_read_edid()
105 dev_err(dp->dev, "EDID Read failed!\n"); in exynos_dp_read_edid()
110 dev_err(dp->dev, "EDID bad checksum!\n"); in exynos_dp_read_edid()
115 retval = exynos_dp_read_bytes_from_i2c(dp, in exynos_dp_read_edid()
121 dev_err(dp->dev, "EDID Read failed!\n"); in exynos_dp_read_edid()
126 dev_err(dp->dev, "EDID bad checksum!\n"); in exynos_dp_read_edid()
130 exynos_dp_read_byte_from_dpcd(dp, DPCD_ADDR_TEST_REQUEST, in exynos_dp_read_edid()
133 exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_read_edid()
136 exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_read_edid()
141 dev_info(dp->dev, "EDID data does not include any extensions.\n"); in exynos_dp_read_edid()
144 retval = exynos_dp_read_bytes_from_i2c(dp, in exynos_dp_read_edid()
150 dev_err(dp->dev, "EDID Read failed!\n"); in exynos_dp_read_edid()
155 dev_err(dp->dev, "EDID bad checksum!\n"); in exynos_dp_read_edid()
159 exynos_dp_read_byte_from_dpcd(dp, in exynos_dp_read_edid()
163 exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_read_edid()
166 exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_read_edid()
172 dev_err(dp->dev, "EDID Read success!\n"); in exynos_dp_read_edid()
176 static int exynos_dp_handle_edid(struct exynos_dp_device *dp) in exynos_dp_handle_edid() argument
183 retval = exynos_dp_read_bytes_from_dpcd(dp, DPCD_ADDR_DPCD_REV, in exynos_dp_handle_edid()
190 retval = exynos_dp_read_edid(dp); in exynos_dp_handle_edid()
198 static void exynos_dp_enable_rx_to_enhanced_mode(struct exynos_dp_device *dp, in exynos_dp_enable_rx_to_enhanced_mode() argument
203 exynos_dp_read_byte_from_dpcd(dp, DPCD_ADDR_LANE_COUNT_SET, &data); in exynos_dp_enable_rx_to_enhanced_mode()
206 exynos_dp_write_byte_to_dpcd(dp, DPCD_ADDR_LANE_COUNT_SET, in exynos_dp_enable_rx_to_enhanced_mode()
210 exynos_dp_write_byte_to_dpcd(dp, DPCD_ADDR_LANE_COUNT_SET, in exynos_dp_enable_rx_to_enhanced_mode()
214 static int exynos_dp_is_enhanced_mode_available(struct exynos_dp_device *dp) in exynos_dp_is_enhanced_mode_available() argument
219 exynos_dp_read_byte_from_dpcd(dp, DPCD_ADDR_MAX_LANE_COUNT, &data); in exynos_dp_is_enhanced_mode_available()
225 static void exynos_dp_set_enhanced_mode(struct exynos_dp_device *dp) in exynos_dp_set_enhanced_mode() argument
229 data = exynos_dp_is_enhanced_mode_available(dp); in exynos_dp_set_enhanced_mode()
230 exynos_dp_enable_rx_to_enhanced_mode(dp, data); in exynos_dp_set_enhanced_mode()
231 exynos_dp_enable_enhanced_mode(dp, data); in exynos_dp_set_enhanced_mode()
234 static void exynos_dp_training_pattern_dis(struct exynos_dp_device *dp) in exynos_dp_training_pattern_dis() argument
236 exynos_dp_set_training_pattern(dp, DP_NONE); in exynos_dp_training_pattern_dis()
238 exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_training_pattern_dis()
243 static void exynos_dp_set_lane_lane_pre_emphasis(struct exynos_dp_device *dp, in exynos_dp_set_lane_lane_pre_emphasis() argument
248 exynos_dp_set_lane0_pre_emphasis(dp, pre_emphasis); in exynos_dp_set_lane_lane_pre_emphasis()
251 exynos_dp_set_lane1_pre_emphasis(dp, pre_emphasis); in exynos_dp_set_lane_lane_pre_emphasis()
255 exynos_dp_set_lane2_pre_emphasis(dp, pre_emphasis); in exynos_dp_set_lane_lane_pre_emphasis()
259 exynos_dp_set_lane3_pre_emphasis(dp, pre_emphasis); in exynos_dp_set_lane_lane_pre_emphasis()
264 static int exynos_dp_link_start(struct exynos_dp_device *dp) in exynos_dp_link_start() argument
269 lane_count = dp->link_train.lane_count; in exynos_dp_link_start()
271 dp->link_train.lt_state = CLOCK_RECOVERY; in exynos_dp_link_start()
272 dp->link_train.eq_loop = 0; in exynos_dp_link_start()
275 dp->link_train.cr_loop[lane] = 0; in exynos_dp_link_start()
278 exynos_dp_set_link_bandwidth(dp, dp->link_train.link_rate); in exynos_dp_link_start()
279 exynos_dp_set_lane_count(dp, dp->link_train.lane_count); in exynos_dp_link_start()
282 buf[0] = dp->link_train.link_rate; in exynos_dp_link_start()
283 buf[1] = dp->link_train.lane_count; in exynos_dp_link_start()
284 retval = exynos_dp_write_bytes_to_dpcd(dp, DPCD_ADDR_LINK_BW_SET, in exynos_dp_link_start()
291 exynos_dp_set_lane_lane_pre_emphasis(dp, in exynos_dp_link_start()
296 while (exynos_dp_get_pll_lock_status(dp) == PLL_UNLOCKED) { in exynos_dp_link_start()
298 dev_err(dp->dev, "Wait for PLL lock timed out\n"); in exynos_dp_link_start()
307 exynos_dp_set_training_pattern(dp, TRAINING_PTN1); in exynos_dp_link_start()
310 retval = exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_link_start()
320 retval = exynos_dp_write_bytes_to_dpcd(dp, DPCD_ADDR_TRAINING_LANE0_SET, in exynos_dp_link_start()
385 static void exynos_dp_set_lane_link_training(struct exynos_dp_device *dp, in exynos_dp_set_lane_link_training() argument
390 exynos_dp_set_lane0_link_training(dp, training_lane_set); in exynos_dp_set_lane_link_training()
393 exynos_dp_set_lane1_link_training(dp, training_lane_set); in exynos_dp_set_lane_link_training()
397 exynos_dp_set_lane2_link_training(dp, training_lane_set); in exynos_dp_set_lane_link_training()
401 exynos_dp_set_lane3_link_training(dp, training_lane_set); in exynos_dp_set_lane_link_training()
407 struct exynos_dp_device *dp, in exynos_dp_get_lane_link_training() argument
414 reg = exynos_dp_get_lane0_link_training(dp); in exynos_dp_get_lane_link_training()
417 reg = exynos_dp_get_lane1_link_training(dp); in exynos_dp_get_lane_link_training()
420 reg = exynos_dp_get_lane2_link_training(dp); in exynos_dp_get_lane_link_training()
423 reg = exynos_dp_get_lane3_link_training(dp); in exynos_dp_get_lane_link_training()
433 static void exynos_dp_reduce_link_rate(struct exynos_dp_device *dp) in exynos_dp_reduce_link_rate() argument
435 exynos_dp_training_pattern_dis(dp); in exynos_dp_reduce_link_rate()
436 exynos_dp_set_enhanced_mode(dp); in exynos_dp_reduce_link_rate()
438 dp->link_train.lt_state = FAILED; in exynos_dp_reduce_link_rate()
441 static void exynos_dp_get_adjust_training_lane(struct exynos_dp_device *dp, in exynos_dp_get_adjust_training_lane() argument
447 lane_count = dp->link_train.lane_count; in exynos_dp_get_adjust_training_lane()
461 dp->link_train.training_lane[lane] = training_lane; in exynos_dp_get_adjust_training_lane()
465 static int exynos_dp_process_clock_recovery(struct exynos_dp_device *dp) in exynos_dp_process_clock_recovery() argument
473 lane_count = dp->link_train.lane_count; in exynos_dp_process_clock_recovery()
475 retval = exynos_dp_read_bytes_from_dpcd(dp, in exynos_dp_process_clock_recovery()
480 retval = exynos_dp_read_bytes_from_dpcd(dp, in exynos_dp_process_clock_recovery()
487 exynos_dp_set_training_pattern(dp, TRAINING_PTN2); in exynos_dp_process_clock_recovery()
489 retval = exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_process_clock_recovery()
496 dev_info(dp->dev, "Link Training Clock Recovery success\n"); in exynos_dp_process_clock_recovery()
497 dp->link_train.lt_state = EQUALIZER_TRAINING; in exynos_dp_process_clock_recovery()
501 dp, lane); in exynos_dp_process_clock_recovery()
511 dp->link_train.cr_loop[lane]++; in exynos_dp_process_clock_recovery()
513 if (dp->link_train.cr_loop[lane] == MAX_CR_LOOP || in exynos_dp_process_clock_recovery()
516 dev_err(dp->dev, "CR Max reached (%d,%d,%d)\n", in exynos_dp_process_clock_recovery()
517 dp->link_train.cr_loop[lane], in exynos_dp_process_clock_recovery()
519 exynos_dp_reduce_link_rate(dp); in exynos_dp_process_clock_recovery()
525 exynos_dp_get_adjust_training_lane(dp, adjust_request); in exynos_dp_process_clock_recovery()
528 exynos_dp_set_lane_link_training(dp, in exynos_dp_process_clock_recovery()
529 dp->link_train.training_lane[lane], lane); in exynos_dp_process_clock_recovery()
531 retval = exynos_dp_write_bytes_to_dpcd(dp, in exynos_dp_process_clock_recovery()
533 dp->link_train.training_lane); in exynos_dp_process_clock_recovery()
540 static int exynos_dp_process_equalizer_training(struct exynos_dp_device *dp) in exynos_dp_process_equalizer_training() argument
548 lane_count = dp->link_train.lane_count; in exynos_dp_process_equalizer_training()
550 retval = exynos_dp_read_bytes_from_dpcd(dp, in exynos_dp_process_equalizer_training()
556 exynos_dp_reduce_link_rate(dp); in exynos_dp_process_equalizer_training()
560 retval = exynos_dp_read_bytes_from_dpcd(dp, in exynos_dp_process_equalizer_training()
565 retval = exynos_dp_read_byte_from_dpcd(dp, in exynos_dp_process_equalizer_training()
570 exynos_dp_get_adjust_training_lane(dp, adjust_request); in exynos_dp_process_equalizer_training()
574 exynos_dp_training_pattern_dis(dp); in exynos_dp_process_equalizer_training()
576 dev_info(dp->dev, "Link Training success!\n"); in exynos_dp_process_equalizer_training()
578 exynos_dp_get_link_bandwidth(dp, ®); in exynos_dp_process_equalizer_training()
579 dp->link_train.link_rate = reg; in exynos_dp_process_equalizer_training()
580 dev_dbg(dp->dev, "final bandwidth = %.2x\n", in exynos_dp_process_equalizer_training()
581 dp->link_train.link_rate); in exynos_dp_process_equalizer_training()
583 exynos_dp_get_lane_count(dp, ®); in exynos_dp_process_equalizer_training()
584 dp->link_train.lane_count = reg; in exynos_dp_process_equalizer_training()
585 dev_dbg(dp->dev, "final lane count = %.2x\n", in exynos_dp_process_equalizer_training()
586 dp->link_train.lane_count); in exynos_dp_process_equalizer_training()
589 exynos_dp_set_enhanced_mode(dp); in exynos_dp_process_equalizer_training()
590 dp->link_train.lt_state = FINISHED; in exynos_dp_process_equalizer_training()
596 dp->link_train.eq_loop++; in exynos_dp_process_equalizer_training()
598 if (dp->link_train.eq_loop > MAX_EQ_LOOP) { in exynos_dp_process_equalizer_training()
599 dev_err(dp->dev, "EQ Max loop\n"); in exynos_dp_process_equalizer_training()
600 exynos_dp_reduce_link_rate(dp); in exynos_dp_process_equalizer_training()
605 exynos_dp_set_lane_link_training(dp, in exynos_dp_process_equalizer_training()
606 dp->link_train.training_lane[lane], lane); in exynos_dp_process_equalizer_training()
608 retval = exynos_dp_write_bytes_to_dpcd(dp, DPCD_ADDR_TRAINING_LANE0_SET, in exynos_dp_process_equalizer_training()
609 lane_count, dp->link_train.training_lane); in exynos_dp_process_equalizer_training()
614 static void exynos_dp_get_max_rx_bandwidth(struct exynos_dp_device *dp, in exynos_dp_get_max_rx_bandwidth() argument
623 exynos_dp_read_byte_from_dpcd(dp, DPCD_ADDR_MAX_LINK_RATE, &data); in exynos_dp_get_max_rx_bandwidth()
627 static void exynos_dp_get_max_rx_lane_count(struct exynos_dp_device *dp, in exynos_dp_get_max_rx_lane_count() argument
636 exynos_dp_read_byte_from_dpcd(dp, DPCD_ADDR_MAX_LANE_COUNT, &data); in exynos_dp_get_max_rx_lane_count()
640 static void exynos_dp_init_training(struct exynos_dp_device *dp, in exynos_dp_init_training() argument
648 exynos_dp_reset_macro(dp); in exynos_dp_init_training()
651 exynos_dp_get_max_rx_bandwidth(dp, &dp->link_train.link_rate); in exynos_dp_init_training()
652 exynos_dp_get_max_rx_lane_count(dp, &dp->link_train.lane_count); in exynos_dp_init_training()
654 if ((dp->link_train.link_rate != LINK_RATE_1_62GBPS) && in exynos_dp_init_training()
655 (dp->link_train.link_rate != LINK_RATE_2_70GBPS)) { in exynos_dp_init_training()
656 dev_err(dp->dev, "Rx Max Link Rate is abnormal :%x !\n", in exynos_dp_init_training()
657 dp->link_train.link_rate); in exynos_dp_init_training()
658 dp->link_train.link_rate = LINK_RATE_1_62GBPS; in exynos_dp_init_training()
661 if (dp->link_train.lane_count == 0) { in exynos_dp_init_training()
662 dev_err(dp->dev, "Rx Max Lane count is abnormal :%x !\n", in exynos_dp_init_training()
663 dp->link_train.lane_count); in exynos_dp_init_training()
664 dp->link_train.lane_count = (u8)LANE_COUNT1; in exynos_dp_init_training()
668 if (dp->link_train.lane_count > max_lane) in exynos_dp_init_training()
669 dp->link_train.lane_count = max_lane; in exynos_dp_init_training()
670 if (dp->link_train.link_rate > max_rate) in exynos_dp_init_training()
671 dp->link_train.link_rate = max_rate; in exynos_dp_init_training()
674 exynos_dp_set_analog_power_down(dp, POWER_ALL, 0); in exynos_dp_init_training()
677 static int exynos_dp_sw_link_training(struct exynos_dp_device *dp) in exynos_dp_sw_link_training() argument
681 dp->link_train.lt_state = START; in exynos_dp_sw_link_training()
685 switch (dp->link_train.lt_state) { in exynos_dp_sw_link_training()
687 retval = exynos_dp_link_start(dp); in exynos_dp_sw_link_training()
689 dev_err(dp->dev, "LT link start failed!\n"); in exynos_dp_sw_link_training()
692 retval = exynos_dp_process_clock_recovery(dp); in exynos_dp_sw_link_training()
694 dev_err(dp->dev, "LT CR failed!\n"); in exynos_dp_sw_link_training()
697 retval = exynos_dp_process_equalizer_training(dp); in exynos_dp_sw_link_training()
699 dev_err(dp->dev, "LT EQ failed!\n"); in exynos_dp_sw_link_training()
709 dev_err(dp->dev, "eDP link training failed (%d)\n", retval); in exynos_dp_sw_link_training()
714 static int exynos_dp_set_link_train(struct exynos_dp_device *dp, in exynos_dp_set_link_train() argument
722 exynos_dp_init_training(dp, count, bwtype); in exynos_dp_set_link_train()
723 retval = exynos_dp_sw_link_training(dp); in exynos_dp_set_link_train()
733 static int exynos_dp_config_video(struct exynos_dp_device *dp) in exynos_dp_config_video() argument
739 exynos_dp_config_video_slave_mode(dp); in exynos_dp_config_video()
741 exynos_dp_set_video_color_format(dp); in exynos_dp_config_video()
743 if (exynos_dp_get_pll_lock_status(dp) == PLL_UNLOCKED) { in exynos_dp_config_video()
744 dev_err(dp->dev, "PLL is not locked yet.\n"); in exynos_dp_config_video()
750 if (exynos_dp_is_slave_video_stream_clock_on(dp) == 0) in exynos_dp_config_video()
753 dev_err(dp->dev, "Timeout of video streamclk ok\n"); in exynos_dp_config_video()
761 exynos_dp_set_video_cr_mn(dp, CALCULATED_M, 0, 0); in exynos_dp_config_video()
764 exynos_dp_set_video_timing_mode(dp, VIDEO_TIMING_FROM_CAPTURE); in exynos_dp_config_video()
767 exynos_dp_enable_video_mute(dp, 0); in exynos_dp_config_video()
770 exynos_dp_enable_video_master(dp, 0); in exynos_dp_config_video()
773 exynos_dp_start_video(dp); in exynos_dp_config_video()
779 if (exynos_dp_is_video_stream_on(dp) == 0) { in exynos_dp_config_video()
787 dev_err(dp->dev, "Timeout of video streamclk ok\n"); in exynos_dp_config_video()
795 dev_err(dp->dev, "Video stream is not detected!\n"); in exynos_dp_config_video()
800 static void exynos_dp_enable_scramble(struct exynos_dp_device *dp, bool enable) in exynos_dp_enable_scramble() argument
805 exynos_dp_enable_scrambling(dp); in exynos_dp_enable_scramble()
807 exynos_dp_read_byte_from_dpcd(dp, in exynos_dp_enable_scramble()
810 exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_enable_scramble()
814 exynos_dp_disable_scrambling(dp); in exynos_dp_enable_scramble()
816 exynos_dp_read_byte_from_dpcd(dp, in exynos_dp_enable_scramble()
819 exynos_dp_write_byte_to_dpcd(dp, in exynos_dp_enable_scramble()
827 struct exynos_dp_device *dp = arg; in exynos_dp_irq_handler() local
831 irq_type = exynos_dp_get_irq_type(dp); in exynos_dp_irq_handler()
834 dev_dbg(dp->dev, "Received irq - cable in\n"); in exynos_dp_irq_handler()
835 schedule_work(&dp->hotplug_work); in exynos_dp_irq_handler()
836 exynos_dp_clear_hotplug_interrupts(dp); in exynos_dp_irq_handler()
839 dev_dbg(dp->dev, "Received irq - cable out\n"); in exynos_dp_irq_handler()
840 exynos_dp_clear_hotplug_interrupts(dp); in exynos_dp_irq_handler()
848 dev_dbg(dp->dev, "Received irq - hotplug change; ignoring.\n"); in exynos_dp_irq_handler()
849 exynos_dp_clear_hotplug_interrupts(dp); in exynos_dp_irq_handler()
852 dev_err(dp->dev, "Received irq - unknown type!\n"); in exynos_dp_irq_handler()
860 struct exynos_dp_device *dp; in exynos_dp_hotplug() local
863 dp = container_of(work, struct exynos_dp_device, hotplug_work); in exynos_dp_hotplug()
865 ret = exynos_dp_detect_hpd(dp); in exynos_dp_hotplug()
871 ret = exynos_dp_handle_edid(dp); in exynos_dp_hotplug()
873 dev_err(dp->dev, "unable to handle edid\n"); in exynos_dp_hotplug()
877 ret = exynos_dp_set_link_train(dp, dp->video_info->lane_count, in exynos_dp_hotplug()
878 dp->video_info->link_rate); in exynos_dp_hotplug()
880 dev_err(dp->dev, "unable to do link train\n"); in exynos_dp_hotplug()
884 exynos_dp_enable_scramble(dp, 1); in exynos_dp_hotplug()
885 exynos_dp_enable_rx_to_enhanced_mode(dp, 1); in exynos_dp_hotplug()
886 exynos_dp_enable_enhanced_mode(dp, 1); in exynos_dp_hotplug()
888 exynos_dp_set_lane_count(dp, dp->video_info->lane_count); in exynos_dp_hotplug()
889 exynos_dp_set_link_bandwidth(dp, dp->video_info->link_rate); in exynos_dp_hotplug()
891 exynos_dp_init_video(dp); in exynos_dp_hotplug()
892 ret = exynos_dp_config_video(dp); in exynos_dp_hotplug()
894 dev_err(dp->dev, "unable to config video\n"); in exynos_dp_hotplug()
966 static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) in exynos_dp_dt_parse_phydata() argument
968 struct device_node *dp_phy_node = of_node_get(dp->dev->of_node); in exynos_dp_dt_parse_phydata()
974 dev_err(dp->dev, "could not find dptx-phy node\n"); in exynos_dp_dt_parse_phydata()
979 dev_err(dp->dev, "failed to get reg for dptx-phy\n"); in exynos_dp_dt_parse_phydata()
985 &dp->enable_mask)) { in exynos_dp_dt_parse_phydata()
986 dev_err(dp->dev, "failed to get enable-mask for dptx-phy\n"); in exynos_dp_dt_parse_phydata()
991 dp->phy_addr = ioremap(phy_base, SZ_4); in exynos_dp_dt_parse_phydata()
992 if (!dp->phy_addr) { in exynos_dp_dt_parse_phydata()
993 dev_err(dp->dev, "failed to ioremap dp-phy\n"); in exynos_dp_dt_parse_phydata()
1004 static void exynos_dp_phy_init(struct exynos_dp_device *dp) in exynos_dp_phy_init() argument
1008 reg = __raw_readl(dp->phy_addr); in exynos_dp_phy_init()
1009 reg |= dp->enable_mask; in exynos_dp_phy_init()
1010 __raw_writel(reg, dp->phy_addr); in exynos_dp_phy_init()
1013 static void exynos_dp_phy_exit(struct exynos_dp_device *dp) in exynos_dp_phy_exit() argument
1017 reg = __raw_readl(dp->phy_addr); in exynos_dp_phy_exit()
1018 reg &= ~(dp->enable_mask); in exynos_dp_phy_exit()
1019 __raw_writel(reg, dp->phy_addr); in exynos_dp_phy_exit()
1027 static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) in exynos_dp_dt_parse_phydata() argument
1032 static void exynos_dp_phy_init(struct exynos_dp_device *dp) in exynos_dp_phy_init() argument
1037 static void exynos_dp_phy_exit(struct exynos_dp_device *dp) in exynos_dp_phy_exit() argument
1046 struct exynos_dp_device *dp; in exynos_dp_probe() local
1051 dp = devm_kzalloc(&pdev->dev, sizeof(struct exynos_dp_device), in exynos_dp_probe()
1053 if (!dp) { in exynos_dp_probe()
1058 dp->dev = &pdev->dev; in exynos_dp_probe()
1065 ret = exynos_dp_dt_parse_phydata(dp); in exynos_dp_probe()
1076 dp->clock = devm_clk_get(&pdev->dev, "dp"); in exynos_dp_probe()
1077 if (IS_ERR(dp->clock)) { in exynos_dp_probe()
1079 return PTR_ERR(dp->clock); in exynos_dp_probe()
1082 clk_prepare_enable(dp->clock); in exynos_dp_probe()
1086 dp->reg_base = devm_ioremap_resource(&pdev->dev, res); in exynos_dp_probe()
1087 if (IS_ERR(dp->reg_base)) in exynos_dp_probe()
1088 return PTR_ERR(dp->reg_base); in exynos_dp_probe()
1090 dp->irq = platform_get_irq(pdev, 0); in exynos_dp_probe()
1091 if (dp->irq == -ENXIO) { in exynos_dp_probe()
1096 INIT_WORK(&dp->hotplug_work, exynos_dp_hotplug); in exynos_dp_probe()
1098 dp->video_info = pdata->video_info; in exynos_dp_probe()
1101 if (dp->phy_addr) in exynos_dp_probe()
1102 exynos_dp_phy_init(dp); in exynos_dp_probe()
1108 exynos_dp_init_dp(dp); in exynos_dp_probe()
1110 ret = devm_request_irq(&pdev->dev, dp->irq, exynos_dp_irq_handler, 0, in exynos_dp_probe()
1111 "exynos-dp", dp); in exynos_dp_probe()
1117 platform_set_drvdata(pdev, dp); in exynos_dp_probe()
1125 struct exynos_dp_device *dp = platform_get_drvdata(pdev); in exynos_dp_remove() local
1127 flush_work(&dp->hotplug_work); in exynos_dp_remove()
1130 if (dp->phy_addr) in exynos_dp_remove()
1131 exynos_dp_phy_exit(dp); in exynos_dp_remove()
1137 clk_disable_unprepare(dp->clock); in exynos_dp_remove()
1147 struct exynos_dp_device *dp = dev_get_drvdata(dev); in exynos_dp_suspend() local
1149 disable_irq(dp->irq); in exynos_dp_suspend()
1151 flush_work(&dp->hotplug_work); in exynos_dp_suspend()
1154 if (dp->phy_addr) in exynos_dp_suspend()
1155 exynos_dp_phy_exit(dp); in exynos_dp_suspend()
1161 clk_disable_unprepare(dp->clock); in exynos_dp_suspend()
1169 struct exynos_dp_device *dp = dev_get_drvdata(dev); in exynos_dp_resume() local
1172 if (dp->phy_addr) in exynos_dp_resume()
1173 exynos_dp_phy_init(dp); in exynos_dp_resume()
1179 clk_prepare_enable(dp->clock); in exynos_dp_resume()
1181 exynos_dp_init_dp(dp); in exynos_dp_resume()
1183 enable_irq(dp->irq); in exynos_dp_resume()