Lines Matching refs:err

117 	int err;  in anx78xx_set_hpd()  local
119 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_set_hpd()
121 if (err) in anx78xx_set_hpd()
122 return err; in anx78xx_set_hpd()
124 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P2], SP_VID_CTRL3_REG, in anx78xx_set_hpd()
126 if (err) in anx78xx_set_hpd()
127 return err; in anx78xx_set_hpd()
134 int err; in anx78xx_clear_hpd() local
136 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2], SP_VID_CTRL3_REG, in anx78xx_clear_hpd()
138 if (err) in anx78xx_clear_hpd()
139 return err; in anx78xx_clear_hpd()
141 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_clear_hpd()
143 if (err) in anx78xx_clear_hpd()
144 return err; in anx78xx_clear_hpd()
161 int err; in anx78xx_rx_initialization() local
163 err = regmap_write(anx78xx->map[I2C_IDX_RX_P0], SP_HDMI_MUTE_CTRL_REG, in anx78xx_rx_initialization()
165 if (err) in anx78xx_rx_initialization()
166 return err; in anx78xx_rx_initialization()
168 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_RX_P0], SP_CHIP_CTRL_REG, in anx78xx_rx_initialization()
171 if (err) in anx78xx_rx_initialization()
172 return err; in anx78xx_rx_initialization()
174 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_rx_initialization()
177 if (err) in anx78xx_rx_initialization()
178 return err; in anx78xx_rx_initialization()
180 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_rx_initialization()
183 if (err) in anx78xx_rx_initialization()
184 return err; in anx78xx_rx_initialization()
187 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_rx_initialization()
190 if (err) in anx78xx_rx_initialization()
191 return err; in anx78xx_rx_initialization()
193 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_rx_initialization()
196 if (err) in anx78xx_rx_initialization()
197 return err; in anx78xx_rx_initialization()
199 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_RX_P0], SP_AUDVID_CTRL_REG, in anx78xx_rx_initialization()
201 if (err) in anx78xx_rx_initialization()
202 return err; in anx78xx_rx_initialization()
204 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_rx_initialization()
206 if (err) in anx78xx_rx_initialization()
207 return err; in anx78xx_rx_initialization()
209 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_rx_initialization()
211 if (err) in anx78xx_rx_initialization()
212 return err; in anx78xx_rx_initialization()
215 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_rx_initialization()
217 if (err) in anx78xx_rx_initialization()
218 return err; in anx78xx_rx_initialization()
221 err = regmap_multi_reg_write(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_rx_initialization()
224 if (err) in anx78xx_rx_initialization()
225 return err; in anx78xx_rx_initialization()
227 err = anx78xx_clear_hpd(anx78xx); in anx78xx_rx_initialization()
228 if (err) in anx78xx_rx_initialization()
229 return err; in anx78xx_rx_initialization()
242 int err; in anx78xx_link_phy_initialization() local
248 err = regmap_write(anx78xx->map[I2C_IDX_TX_P2], SP_ANALOG_CTRL0_REG, in anx78xx_link_phy_initialization()
250 if (err) in anx78xx_link_phy_initialization()
251 return err; in anx78xx_link_phy_initialization()
256 err = regmap_bulk_write(anx78xx->map[I2C_IDX_TX_P1], in anx78xx_link_phy_initialization()
261 if (err) in anx78xx_link_phy_initialization()
262 return err; in anx78xx_link_phy_initialization()
270 int err; in anx78xx_xtal_clk_sel() local
272 err = regmap_update_bits(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_xtal_clk_sel()
276 if (err) in anx78xx_xtal_clk_sel()
277 return err; in anx78xx_xtal_clk_sel()
279 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], SP_DP_AUX_CH_CTRL3_REG, in anx78xx_xtal_clk_sel()
281 if (err) in anx78xx_xtal_clk_sel()
282 return err; in anx78xx_xtal_clk_sel()
284 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], SP_DP_AUX_CH_CTRL4_REG, in anx78xx_xtal_clk_sel()
286 if (err) in anx78xx_xtal_clk_sel()
287 return err; in anx78xx_xtal_clk_sel()
289 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_xtal_clk_sel()
291 if (err) in anx78xx_xtal_clk_sel()
292 return err; in anx78xx_xtal_clk_sel()
294 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_xtal_clk_sel()
297 if (err) in anx78xx_xtal_clk_sel()
298 return err; in anx78xx_xtal_clk_sel()
300 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], SP_AUX_MISC_CTRL_REG, in anx78xx_xtal_clk_sel()
302 if (err) in anx78xx_xtal_clk_sel()
303 return err; in anx78xx_xtal_clk_sel()
305 err = regmap_read(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_xtal_clk_sel()
308 if (err) in anx78xx_xtal_clk_sel()
309 return err; in anx78xx_xtal_clk_sel()
311 err = regmap_write(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_xtal_clk_sel()
315 if (err) in anx78xx_xtal_clk_sel()
316 return err; in anx78xx_xtal_clk_sel()
329 int err; in anx78xx_tx_initialization() local
332 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], SP_DP_AUX_CH_CTRL2_REG, in anx78xx_tx_initialization()
334 if (err) in anx78xx_tx_initialization()
335 return err; in anx78xx_tx_initialization()
338 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
340 if (err) in anx78xx_tx_initialization()
341 return err; in anx78xx_tx_initialization()
343 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
346 if (err) in anx78xx_tx_initialization()
347 return err; in anx78xx_tx_initialization()
349 err = regmap_multi_reg_write(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
352 if (err) in anx78xx_tx_initialization()
353 return err; in anx78xx_tx_initialization()
355 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
357 if (err) in anx78xx_tx_initialization()
358 return err; in anx78xx_tx_initialization()
360 err = regmap_write(anx78xx->map[I2C_IDX_TX_P2], SP_VID_CTRL8_REG, in anx78xx_tx_initialization()
362 if (err) in anx78xx_tx_initialization()
363 return err; in anx78xx_tx_initialization()
369 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], SP_HDCP_AUTO_TIMER_REG, in anx78xx_tx_initialization()
371 if (err) in anx78xx_tx_initialization()
372 return err; in anx78xx_tx_initialization()
374 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
376 if (err) in anx78xx_tx_initialization()
377 return err; in anx78xx_tx_initialization()
379 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
381 if (err) in anx78xx_tx_initialization()
382 return err; in anx78xx_tx_initialization()
384 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_tx_initialization()
386 if (err) in anx78xx_tx_initialization()
387 return err; in anx78xx_tx_initialization()
389 err = anx78xx_xtal_clk_sel(anx78xx); in anx78xx_tx_initialization()
390 if (err) in anx78xx_tx_initialization()
391 return err; in anx78xx_tx_initialization()
393 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], SP_AUX_DEFER_CTRL_REG, in anx78xx_tx_initialization()
395 if (err) in anx78xx_tx_initialization()
396 return err; in anx78xx_tx_initialization()
398 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
401 if (err) in anx78xx_tx_initialization()
402 return err; in anx78xx_tx_initialization()
408 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
410 if (err) in anx78xx_tx_initialization()
411 return err; in anx78xx_tx_initialization()
413 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
415 if (err) in anx78xx_tx_initialization()
416 return err; in anx78xx_tx_initialization()
419 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
421 if (err) in anx78xx_tx_initialization()
422 return err; in anx78xx_tx_initialization()
424 err = anx78xx_link_phy_initialization(anx78xx); in anx78xx_tx_initialization()
425 if (err) in anx78xx_tx_initialization()
426 return err; in anx78xx_tx_initialization()
429 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_tx_initialization()
431 if (err) in anx78xx_tx_initialization()
432 return err; in anx78xx_tx_initialization()
439 int err; in anx78xx_enable_interrupts() local
445 err = regmap_write(anx78xx->map[I2C_IDX_TX_P2], SP_INT_CTRL_REG, 0x01); in anx78xx_enable_interrupts()
446 if (err) in anx78xx_enable_interrupts()
447 return err; in anx78xx_enable_interrupts()
449 err = regmap_write(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_enable_interrupts()
451 if (err) in anx78xx_enable_interrupts()
452 return err; in anx78xx_enable_interrupts()
454 err = regmap_write(anx78xx->map[I2C_IDX_TX_P2], SP_DP_INT_MASK1_REG, in anx78xx_enable_interrupts()
456 if (err) in anx78xx_enable_interrupts()
457 return err; in anx78xx_enable_interrupts()
459 err = regmap_write(anx78xx->map[I2C_IDX_RX_P0], SP_INT_MASK1_REG, in anx78xx_enable_interrupts()
461 if (err) in anx78xx_enable_interrupts()
462 return err; in anx78xx_enable_interrupts()
470 int err; in anx78xx_poweron() local
476 err = regulator_enable(pdata->dvdd10); in anx78xx_poweron()
477 if (err) { in anx78xx_poweron()
479 err); in anx78xx_poweron()
506 int err; in anx78xx_poweroff() local
518 err = regulator_disable(pdata->dvdd10); in anx78xx_poweroff()
519 if (err) { in anx78xx_poweroff()
521 err); in anx78xx_poweroff()
533 int err; in anx78xx_start() local
536 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_start()
541 err = anx78xx_enable_interrupts(anx78xx); in anx78xx_start()
542 if (err) { in anx78xx_start()
543 DRM_ERROR("Failed to enable interrupts: %d\n", err); in anx78xx_start()
547 err = anx78xx_rx_initialization(anx78xx); in anx78xx_start()
548 if (err) { in anx78xx_start()
549 DRM_ERROR("Failed receiver initialization: %d\n", err); in anx78xx_start()
553 err = anx78xx_tx_initialization(anx78xx); in anx78xx_start()
554 if (err) { in anx78xx_start()
555 DRM_ERROR("Failed transmitter initialization: %d\n", err); in anx78xx_start()
568 DRM_ERROR("Failed SlimPort transmitter initialization: %d\n", err); in anx78xx_start()
571 return err; in anx78xx_start()
607 int err; in anx78xx_dp_link_training() local
609 err = regmap_write(anx78xx->map[I2C_IDX_RX_P0], SP_HDMI_MUTE_CTRL_REG, in anx78xx_dp_link_training()
611 if (err) in anx78xx_dp_link_training()
612 return err; in anx78xx_dp_link_training()
614 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_dp_link_training()
617 if (err) in anx78xx_dp_link_training()
618 return err; in anx78xx_dp_link_training()
620 err = drm_dp_dpcd_readb(&anx78xx->aux, DP_MAX_LINK_RATE, &dp_bw); in anx78xx_dp_link_training()
621 if (err < 0) in anx78xx_dp_link_training()
622 return err; in anx78xx_dp_link_training()
635 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P2], SP_VID_CTRL1_REG, in anx78xx_dp_link_training()
637 if (err) in anx78xx_dp_link_training()
638 return err; in anx78xx_dp_link_training()
640 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_dp_link_training()
642 if (err) in anx78xx_dp_link_training()
643 return err; in anx78xx_dp_link_training()
646 err = drm_dp_dpcd_read(&anx78xx->aux, DP_DPCD_REV, in anx78xx_dp_link_training()
648 if (err < 0) { in anx78xx_dp_link_training()
649 DRM_ERROR("Failed to read DPCD: %d\n", err); in anx78xx_dp_link_training()
650 return err; in anx78xx_dp_link_training()
654 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_dp_link_training()
656 if (err) in anx78xx_dp_link_training()
657 return err; in anx78xx_dp_link_training()
664 err = drm_dp_dpcd_readb(&anx78xx->aux, DP_SET_POWER, &dpcd[0]); in anx78xx_dp_link_training()
665 if (err < 0) { in anx78xx_dp_link_training()
667 err); in anx78xx_dp_link_training()
668 return err; in anx78xx_dp_link_training()
674 err = drm_dp_dpcd_writeb(&anx78xx->aux, DP_SET_POWER, dpcd[0]); in anx78xx_dp_link_training()
675 if (err < 0) { in anx78xx_dp_link_training()
677 err); in anx78xx_dp_link_training()
678 return err; in anx78xx_dp_link_training()
690 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_dp_link_training()
692 if (err) in anx78xx_dp_link_training()
693 return err; in anx78xx_dp_link_training()
698 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_dp_link_training()
700 if (err) in anx78xx_dp_link_training()
701 return err; in anx78xx_dp_link_training()
703 err = drm_dp_dpcd_writeb(&anx78xx->aux, DP_DOWNSPREAD_CTRL, in anx78xx_dp_link_training()
705 if (err < 0) in anx78xx_dp_link_training()
706 return err; in anx78xx_dp_link_training()
708 err = drm_dp_dpcd_writeb(&anx78xx->aux, DP_DOWNSPREAD_CTRL, 0); in anx78xx_dp_link_training()
709 if (err < 0) in anx78xx_dp_link_training()
710 return err; in anx78xx_dp_link_training()
715 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_dp_link_training()
719 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_dp_link_training()
722 if (err) in anx78xx_dp_link_training()
723 return err; in anx78xx_dp_link_training()
725 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_dp_link_training()
728 if (err) in anx78xx_dp_link_training()
729 return err; in anx78xx_dp_link_training()
736 err = drm_dp_dpcd_write(&anx78xx->aux, DP_LINK_BW_SET, dpcd, in anx78xx_dp_link_training()
738 if (err < 0) { in anx78xx_dp_link_training()
739 DRM_ERROR("Failed to configure link: %d\n", err); in anx78xx_dp_link_training()
740 return err; in anx78xx_dp_link_training()
744 err = regmap_write(anx78xx->map[I2C_IDX_TX_P0], SP_DP_LT_CTRL_REG, in anx78xx_dp_link_training()
746 if (err) in anx78xx_dp_link_training()
747 return err; in anx78xx_dp_link_training()
754 int err; in anx78xx_config_dp_output() local
756 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2], SP_VID_CTRL1_REG, in anx78xx_config_dp_output()
758 if (err) in anx78xx_config_dp_output()
759 return err; in anx78xx_config_dp_output()
762 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P2], SP_VID_CTRL1_REG, in anx78xx_config_dp_output()
764 if (err) in anx78xx_config_dp_output()
765 return err; in anx78xx_config_dp_output()
774 int err; in anx78xx_send_video_infoframe() local
776 err = hdmi_avi_infoframe_pack(frame, buffer, sizeof(buffer)); in anx78xx_send_video_infoframe()
777 if (err < 0) { in anx78xx_send_video_infoframe()
778 DRM_ERROR("Failed to pack AVI infoframe: %d\n", err); in anx78xx_send_video_infoframe()
779 return err; in anx78xx_send_video_infoframe()
782 err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_send_video_infoframe()
784 if (err) in anx78xx_send_video_infoframe()
785 return err; in anx78xx_send_video_infoframe()
787 err = regmap_bulk_write(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_send_video_infoframe()
790 if (err) in anx78xx_send_video_infoframe()
791 return err; in anx78xx_send_video_infoframe()
793 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_send_video_infoframe()
795 if (err) in anx78xx_send_video_infoframe()
796 return err; in anx78xx_send_video_infoframe()
798 err = anx78xx_set_bits(anx78xx->map[I2C_IDX_TX_P0], in anx78xx_send_video_infoframe()
800 if (err) in anx78xx_send_video_infoframe()
801 return err; in anx78xx_send_video_infoframe()
809 int err; in anx78xx_get_downstream_info() local
811 err = drm_dp_dpcd_readb(&anx78xx->aux, DP_SINK_COUNT, &value); in anx78xx_get_downstream_info()
812 if (err < 0) { in anx78xx_get_downstream_info()
813 DRM_ERROR("Get sink count failed %d\n", err); in anx78xx_get_downstream_info()
814 return err; in anx78xx_get_downstream_info()
828 int err, num_modes = 0; in anx78xx_get_modes() local
838 err = anx78xx_get_downstream_info(anx78xx); in anx78xx_get_modes()
839 if (err) { in anx78xx_get_modes()
840 DRM_ERROR("Failed to get downstream info: %d\n", err); in anx78xx_get_modes()
846 err = drm_edid_connector_update(connector, anx78xx->drm_edid); in anx78xx_get_modes()
853 if (err) { in anx78xx_get_modes()
854 DRM_ERROR("Failed to update EDID property: %d\n", err); in anx78xx_get_modes()
894 int err; in anx78xx_bridge_attach() local
907 err = drm_dp_aux_register(&anx78xx->aux); in anx78xx_bridge_attach()
908 if (err < 0) { in anx78xx_bridge_attach()
909 DRM_ERROR("Failed to register aux channel: %d\n", err); in anx78xx_bridge_attach()
910 return err; in anx78xx_bridge_attach()
913 err = drm_connector_init(bridge->dev, &anx78xx->connector, in anx78xx_bridge_attach()
916 if (err) { in anx78xx_bridge_attach()
917 DRM_ERROR("Failed to initialize connector: %d\n", err); in anx78xx_bridge_attach()
926 err = drm_connector_attach_encoder(&anx78xx->connector, in anx78xx_bridge_attach()
928 if (err) { in anx78xx_bridge_attach()
929 DRM_ERROR("Failed to link up connector to encoder: %d\n", err); in anx78xx_bridge_attach()
933 err = drm_connector_register(&anx78xx->connector); in anx78xx_bridge_attach()
934 if (err) { in anx78xx_bridge_attach()
935 DRM_ERROR("Failed to register connector: %d\n", err); in anx78xx_bridge_attach()
944 return err; in anx78xx_bridge_attach()
982 int err; in anx78xx_bridge_mode_set() local
989 err = drm_hdmi_avi_infoframe_from_display_mode(&frame, in anx78xx_bridge_mode_set()
992 if (err) { in anx78xx_bridge_mode_set()
993 DRM_ERROR("Failed to setup AVI infoframe: %d\n", err); in anx78xx_bridge_mode_set()
997 err = anx78xx_send_video_infoframe(anx78xx, &frame); in anx78xx_bridge_mode_set()
998 if (err) in anx78xx_bridge_mode_set()
999 DRM_ERROR("Failed to send AVI infoframe: %d\n", err); in anx78xx_bridge_mode_set()
1008 int err; in anx78xx_bridge_enable() local
1010 err = anx78xx_start(anx78xx); in anx78xx_bridge_enable()
1011 if (err) { in anx78xx_bridge_enable()
1012 DRM_ERROR("Failed to initialize: %d\n", err); in anx78xx_bridge_enable()
1016 err = anx78xx_set_hpd(anx78xx); in anx78xx_bridge_enable()
1017 if (err) in anx78xx_bridge_enable()
1018 DRM_ERROR("Failed to set HPD: %d\n", err); in anx78xx_bridge_enable()
1033 int err; in anx78xx_hpd_threaded_handler() local
1043 err = anx78xx_enable_interrupts(anx78xx); in anx78xx_hpd_threaded_handler()
1044 if (err) in anx78xx_hpd_threaded_handler()
1045 DRM_ERROR("Failed to enable interrupts: %d\n", err); in anx78xx_hpd_threaded_handler()
1054 int err; in anx78xx_handle_dp_int_1() local
1058 err = regmap_write(anx78xx->map[I2C_IDX_TX_P2], SP_DP_INT_STATUS1_REG, in anx78xx_handle_dp_int_1()
1060 if (err) in anx78xx_handle_dp_int_1()
1061 return err; in anx78xx_handle_dp_int_1()
1065 err = anx78xx_config_dp_output(anx78xx); in anx78xx_handle_dp_int_1()
1068 return err; in anx78xx_handle_dp_int_1()
1074 int err; in anx78xx_handle_common_int_4() local
1078 err = regmap_write(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_handle_common_int_4()
1080 if (err) { in anx78xx_handle_common_int_4()
1081 DRM_ERROR("Failed to write SP_COMMON_INT_STATUS4 %d\n", err); in anx78xx_handle_common_int_4()
1103 int err; in anx78xx_handle_hdmi_int_1() local
1107 err = regmap_write(anx78xx->map[I2C_IDX_RX_P0], SP_INT_STATUS1_REG, in anx78xx_handle_hdmi_int_1()
1109 if (err) { in anx78xx_handle_hdmi_int_1()
1110 DRM_ERROR("Write HDMI int 1 failed: %d\n", err); in anx78xx_handle_hdmi_int_1()
1117 err = regmap_read(anx78xx->map[I2C_IDX_RX_P0], in anx78xx_handle_hdmi_int_1()
1119 if (err) { in anx78xx_handle_hdmi_int_1()
1120 DRM_ERROR("Read system status reg failed: %d\n", err); in anx78xx_handle_hdmi_int_1()
1134 err = anx78xx_dp_link_training(anx78xx); in anx78xx_handle_hdmi_int_1()
1135 if (err) in anx78xx_handle_hdmi_int_1()
1136 DRM_ERROR("Failed to start link training: %d\n", err); in anx78xx_handle_hdmi_int_1()
1145 int err; in anx78xx_intp_threaded_handler() local
1149 err = regmap_read(anx78xx->map[I2C_IDX_TX_P2], SP_DP_INT_STATUS1_REG, in anx78xx_intp_threaded_handler()
1151 if (err) { in anx78xx_intp_threaded_handler()
1152 DRM_ERROR("Failed to read DP interrupt 1 status: %d\n", err); in anx78xx_intp_threaded_handler()
1159 err = regmap_read(anx78xx->map[I2C_IDX_TX_P2], in anx78xx_intp_threaded_handler()
1161 if (err) { in anx78xx_intp_threaded_handler()
1163 err); in anx78xx_intp_threaded_handler()
1174 err = regmap_read(anx78xx->map[I2C_IDX_RX_P0], SP_INT_STATUS1_REG, in anx78xx_intp_threaded_handler()
1176 if (err) { in anx78xx_intp_threaded_handler()
1177 DRM_ERROR("Failed to read HDMI int 1 status: %d\n", err); in anx78xx_intp_threaded_handler()
1221 int err; in anx78xx_i2c_probe() local
1236 err = anx78xx_init_pdata(anx78xx); in anx78xx_i2c_probe()
1237 if (err) { in anx78xx_i2c_probe()
1238 if (err != -EPROBE_DEFER) in anx78xx_i2c_probe()
1239 DRM_ERROR("Failed to initialize pdata: %d\n", err); in anx78xx_i2c_probe()
1241 return err; in anx78xx_i2c_probe()
1264 err = PTR_ERR(i2c_dummy); in anx78xx_i2c_probe()
1266 i2c_addresses[i], err); in anx78xx_i2c_probe()
1274 err = PTR_ERR(anx78xx->map[i]); in anx78xx_i2c_probe()
1284 err = regmap_read(anx78xx->map[I2C_IDX_TX_P2], SP_DEVICE_IDL_REG, in anx78xx_i2c_probe()
1286 if (err) in anx78xx_i2c_probe()
1289 err = regmap_read(anx78xx->map[I2C_IDX_TX_P2], SP_DEVICE_IDH_REG, in anx78xx_i2c_probe()
1291 if (err) in anx78xx_i2c_probe()
1296 err = regmap_read(anx78xx->map[I2C_IDX_TX_P2], SP_DEVICE_VERSION_REG, in anx78xx_i2c_probe()
1298 if (err) in anx78xx_i2c_probe()
1313 err = -ENODEV; in anx78xx_i2c_probe()
1317 err = devm_request_threaded_irq(&client->dev, pdata->hpd_irq, NULL, in anx78xx_i2c_probe()
1321 if (err) { in anx78xx_i2c_probe()
1323 err); in anx78xx_i2c_probe()
1327 err = devm_request_threaded_irq(&client->dev, pdata->intp_irq, NULL, in anx78xx_i2c_probe()
1331 if (err) { in anx78xx_i2c_probe()
1332 DRM_ERROR("Failed to request INTP threaded IRQ: %d\n", err); in anx78xx_i2c_probe()
1351 return err; in anx78xx_i2c_probe()