Lines Matching refs:lt9611
34 struct lt9611 { struct
87 static struct lt9611 *bridge_to_lt9611(struct drm_bridge *bridge) in bridge_to_lt9611()
89 return container_of(bridge, struct lt9611, bridge); in bridge_to_lt9611()
92 static int lt9611_mipi_input_analog(struct lt9611 *lt9611) in lt9611_mipi_input_analog() argument
106 return regmap_multi_reg_write(lt9611->regmap, reg_cfg, ARRAY_SIZE(reg_cfg)); in lt9611_mipi_input_analog()
109 static int lt9611_mipi_input_digital(struct lt9611 *lt9611, in lt9611_mipi_input_digital() argument
121 if (lt9611->dsi1_node) in lt9611_mipi_input_digital()
124 return regmap_multi_reg_write(lt9611->regmap, reg_cfg, ARRAY_SIZE(reg_cfg)); in lt9611_mipi_input_digital()
127 static void lt9611_mipi_video_setup(struct lt9611 *lt9611, in lt9611_mipi_video_setup() argument
146 regmap_write(lt9611->regmap, 0x830d, (u8)(v_total / 256)); in lt9611_mipi_video_setup()
147 regmap_write(lt9611->regmap, 0x830e, (u8)(v_total % 256)); in lt9611_mipi_video_setup()
149 regmap_write(lt9611->regmap, 0x830f, (u8)(vactive / 256)); in lt9611_mipi_video_setup()
150 regmap_write(lt9611->regmap, 0x8310, (u8)(vactive % 256)); in lt9611_mipi_video_setup()
152 regmap_write(lt9611->regmap, 0x8311, (u8)(h_total / 256)); in lt9611_mipi_video_setup()
153 regmap_write(lt9611->regmap, 0x8312, (u8)(h_total % 256)); in lt9611_mipi_video_setup()
155 regmap_write(lt9611->regmap, 0x8313, (u8)(hactive / 256)); in lt9611_mipi_video_setup()
156 regmap_write(lt9611->regmap, 0x8314, (u8)(hactive % 256)); in lt9611_mipi_video_setup()
158 regmap_write(lt9611->regmap, 0x8315, (u8)(vsync_len % 256)); in lt9611_mipi_video_setup()
159 regmap_write(lt9611->regmap, 0x8316, (u8)(hsync_len % 256)); in lt9611_mipi_video_setup()
161 regmap_write(lt9611->regmap, 0x8317, (u8)(vfront_porch % 256)); in lt9611_mipi_video_setup()
163 regmap_write(lt9611->regmap, 0x8318, (u8)(vsync_porch % 256)); in lt9611_mipi_video_setup()
165 regmap_write(lt9611->regmap, 0x8319, (u8)(hfront_porch % 256)); in lt9611_mipi_video_setup()
167 regmap_write(lt9611->regmap, 0x831a, (u8)(hsync_porch / 256) | in lt9611_mipi_video_setup()
169 regmap_write(lt9611->regmap, 0x831b, (u8)(hsync_porch % 256)); in lt9611_mipi_video_setup()
172 static void lt9611_pcr_setup(struct lt9611 *lt9611, const struct drm_display_mode *mode, unsigned i… in lt9611_pcr_setup() argument
200 regmap_write(lt9611->regmap, 0x831d, pol); in lt9611_pcr_setup()
202 regmap_multi_reg_write(lt9611->regmap, reg_cfg, ARRAY_SIZE(reg_cfg)); in lt9611_pcr_setup()
203 if (lt9611->dsi1_node) { in lt9611_pcr_setup()
209 regmap_write(lt9611->regmap, 0x830b, hact / 256); in lt9611_pcr_setup()
210 regmap_write(lt9611->regmap, 0x830c, hact % 256); in lt9611_pcr_setup()
211 regmap_write(lt9611->regmap, 0x8348, hact / 256); in lt9611_pcr_setup()
212 regmap_write(lt9611->regmap, 0x8349, hact % 256); in lt9611_pcr_setup()
215 regmap_write(lt9611->regmap, 0x8326, pcr_m); in lt9611_pcr_setup()
218 regmap_write(lt9611->regmap, 0x8011, 0x5a); in lt9611_pcr_setup()
219 regmap_write(lt9611->regmap, 0x8011, 0xfa); in lt9611_pcr_setup()
222 static int lt9611_pll_setup(struct lt9611 *lt9611, const struct drm_display_mode *mode, unsigned in… in lt9611_pll_setup() argument
239 regmap_multi_reg_write(lt9611->regmap, reg_cfg, ARRAY_SIZE(reg_cfg)); in lt9611_pll_setup()
242 regmap_write(lt9611->regmap, 0x812d, 0x88); in lt9611_pll_setup()
245 regmap_write(lt9611->regmap, 0x812d, 0x99); in lt9611_pll_setup()
248 regmap_write(lt9611->regmap, 0x812d, 0xaa); in lt9611_pll_setup()
258 regmap_write(lt9611->regmap, 0x82e3, pclk >> 17); /* pclk[19:16] */ in lt9611_pll_setup()
259 regmap_write(lt9611->regmap, 0x82e4, pclk >> 9); /* pclk[15:8] */ in lt9611_pll_setup()
260 regmap_write(lt9611->regmap, 0x82e5, pclk >> 1); /* pclk[7:0] */ in lt9611_pll_setup()
262 regmap_write(lt9611->regmap, 0x82de, 0x20); in lt9611_pll_setup()
263 regmap_write(lt9611->regmap, 0x82de, 0xe0); in lt9611_pll_setup()
265 regmap_write(lt9611->regmap, 0x8016, 0xf1); in lt9611_pll_setup()
266 regmap_write(lt9611->regmap, 0x8016, 0xf3); in lt9611_pll_setup()
271 static int lt9611_read_video_check(struct lt9611 *lt9611, unsigned int reg) in lt9611_read_video_check() argument
276 ret = regmap_read(lt9611->regmap, reg, &temp); in lt9611_read_video_check()
280 ret = regmap_read(lt9611->regmap, reg + 1, &temp2); in lt9611_read_video_check()
287 static int lt9611_video_check(struct lt9611 *lt9611) in lt9611_video_check() argument
295 temp = lt9611_read_video_check(lt9611, 0x8282); in lt9611_video_check()
301 temp = lt9611_read_video_check(lt9611, 0x826c); in lt9611_video_check()
307 temp = lt9611_read_video_check(lt9611, 0x8286); in lt9611_video_check()
313 temp = lt9611_read_video_check(lt9611, 0x8382); in lt9611_video_check()
319 temp = lt9611_read_video_check(lt9611, 0x8386); in lt9611_video_check()
324 dev_info(lt9611->dev, in lt9611_video_check()
331 dev_err(lt9611->dev, "read video check error\n"); in lt9611_video_check()
335 static void lt9611_hdmi_set_infoframes(struct lt9611 *lt9611, in lt9611_hdmi_set_infoframes() argument
357 regmap_write(lt9611->regmap, 0x8440 + i, buf[i]); in lt9611_hdmi_set_infoframes()
370 regmap_write(lt9611->regmap, 0x8474 + i, buf[i]); in lt9611_hdmi_set_infoframes()
375 regmap_write(lt9611->regmap, 0x843d, iframes); /* UD1 infoframe */ in lt9611_hdmi_set_infoframes()
378 static void lt9611_hdmi_tx_digital(struct lt9611 *lt9611, bool is_hdmi) in lt9611_hdmi_tx_digital() argument
381 regmap_write(lt9611->regmap, 0x82d6, 0x8c); in lt9611_hdmi_tx_digital()
383 regmap_write(lt9611->regmap, 0x82d6, 0x0c); in lt9611_hdmi_tx_digital()
384 regmap_write(lt9611->regmap, 0x82d7, 0x04); in lt9611_hdmi_tx_digital()
387 static void lt9611_hdmi_tx_phy(struct lt9611 *lt9611) in lt9611_hdmi_tx_phy() argument
407 if (lt9611->ac_mode) in lt9611_hdmi_tx_phy()
410 regmap_multi_reg_write(lt9611->regmap, reg_cfg, ARRAY_SIZE(reg_cfg)); in lt9611_hdmi_tx_phy()
415 struct lt9611 *lt9611 = dev_id; in lt9611_irq_thread_handler() local
419 regmap_read(lt9611->regmap, 0x820f, &irq_flag3); in lt9611_irq_thread_handler()
420 regmap_read(lt9611->regmap, 0x820c, &irq_flag0); in lt9611_irq_thread_handler()
424 dev_info(lt9611->dev, "hdmi cable disconnected\n"); in lt9611_irq_thread_handler()
426 regmap_write(lt9611->regmap, 0x8207, 0xbf); in lt9611_irq_thread_handler()
427 regmap_write(lt9611->regmap, 0x8207, 0x3f); in lt9611_irq_thread_handler()
432 dev_info(lt9611->dev, "hdmi cable connected\n"); in lt9611_irq_thread_handler()
434 regmap_write(lt9611->regmap, 0x8207, 0x7f); in lt9611_irq_thread_handler()
435 regmap_write(lt9611->regmap, 0x8207, 0x3f); in lt9611_irq_thread_handler()
438 if (irq_flag3 & 0xc0 && lt9611->bridge.dev) in lt9611_irq_thread_handler()
439 drm_kms_helper_hotplug_event(lt9611->bridge.dev); in lt9611_irq_thread_handler()
443 dev_info(lt9611->dev, "video input changed\n"); in lt9611_irq_thread_handler()
444 regmap_write(lt9611->regmap, 0x829e, 0xff); in lt9611_irq_thread_handler()
445 regmap_write(lt9611->regmap, 0x829e, 0xf7); in lt9611_irq_thread_handler()
446 regmap_write(lt9611->regmap, 0x8204, 0xff); in lt9611_irq_thread_handler()
447 regmap_write(lt9611->regmap, 0x8204, 0xfe); in lt9611_irq_thread_handler()
453 static void lt9611_enable_hpd_interrupts(struct lt9611 *lt9611) in lt9611_enable_hpd_interrupts() argument
457 regmap_read(lt9611->regmap, 0x8203, &val); in lt9611_enable_hpd_interrupts()
460 regmap_write(lt9611->regmap, 0x8203, val); in lt9611_enable_hpd_interrupts()
461 regmap_write(lt9611->regmap, 0x8207, 0xff); /* clear */ in lt9611_enable_hpd_interrupts()
462 regmap_write(lt9611->regmap, 0x8207, 0x3f); in lt9611_enable_hpd_interrupts()
465 static void lt9611_sleep_setup(struct lt9611 *lt9611) in lt9611_sleep_setup() argument
479 regmap_multi_reg_write(lt9611->regmap, in lt9611_sleep_setup()
481 lt9611->sleep = true; in lt9611_sleep_setup()
484 static int lt9611_power_on(struct lt9611 *lt9611) in lt9611_power_on() argument
512 if (lt9611->power_on) in lt9611_power_on()
515 ret = regmap_multi_reg_write(lt9611->regmap, seq, ARRAY_SIZE(seq)); in lt9611_power_on()
517 lt9611->power_on = true; in lt9611_power_on()
522 static int lt9611_power_off(struct lt9611 *lt9611) in lt9611_power_off() argument
526 ret = regmap_write(lt9611->regmap, 0x8130, 0x6a); in lt9611_power_off()
528 lt9611->power_on = false; in lt9611_power_off()
533 static void lt9611_reset(struct lt9611 *lt9611) in lt9611_reset() argument
535 gpiod_set_value_cansleep(lt9611->reset_gpio, 1); in lt9611_reset()
538 gpiod_set_value_cansleep(lt9611->reset_gpio, 0); in lt9611_reset()
541 gpiod_set_value_cansleep(lt9611->reset_gpio, 1); in lt9611_reset()
545 static void lt9611_assert_5v(struct lt9611 *lt9611) in lt9611_assert_5v() argument
547 if (!lt9611->enable_gpio) in lt9611_assert_5v()
550 gpiod_set_value_cansleep(lt9611->enable_gpio, 1); in lt9611_assert_5v()
554 static int lt9611_regulator_init(struct lt9611 *lt9611) in lt9611_regulator_init() argument
558 lt9611->supplies[0].supply = "vdd"; in lt9611_regulator_init()
559 lt9611->supplies[1].supply = "vcc"; in lt9611_regulator_init()
561 ret = devm_regulator_bulk_get(lt9611->dev, 2, lt9611->supplies); in lt9611_regulator_init()
565 return regulator_set_load(lt9611->supplies[0].consumer, 300000); in lt9611_regulator_init()
568 static int lt9611_regulator_enable(struct lt9611 *lt9611) in lt9611_regulator_enable() argument
572 ret = regulator_enable(lt9611->supplies[0].consumer); in lt9611_regulator_enable()
578 ret = regulator_enable(lt9611->supplies[1].consumer); in lt9611_regulator_enable()
580 regulator_disable(lt9611->supplies[0].consumer); in lt9611_regulator_enable()
589 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_detect() local
593 regmap_read(lt9611->regmap, 0x825e, ®_val); in lt9611_bridge_detect()
596 lt9611->status = connected ? connector_status_connected : in lt9611_bridge_detect()
599 return lt9611->status; in lt9611_bridge_detect()
602 static int lt9611_read_edid(struct lt9611 *lt9611) in lt9611_read_edid() argument
609 memset(lt9611->edid_buf, 0, sizeof(lt9611->edid_buf)); in lt9611_read_edid()
611 regmap_write(lt9611->regmap, 0x8503, 0xc9); in lt9611_read_edid()
614 regmap_write(lt9611->regmap, 0x8504, 0xa0); in lt9611_read_edid()
616 regmap_write(lt9611->regmap, 0x8505, 0x00); in lt9611_read_edid()
619 regmap_write(lt9611->regmap, 0x8506, EDID_LEN); in lt9611_read_edid()
620 regmap_write(lt9611->regmap, 0x8514, 0x7f); in lt9611_read_edid()
624 regmap_write(lt9611->regmap, 0x8505, i * EDID_LEN); in lt9611_read_edid()
625 regmap_write(lt9611->regmap, 0x8507, 0x36); in lt9611_read_edid()
626 regmap_write(lt9611->regmap, 0x8507, 0x31); in lt9611_read_edid()
627 regmap_write(lt9611->regmap, 0x8507, 0x37); in lt9611_read_edid()
630 regmap_read(lt9611->regmap, 0x8540, &temp); in lt9611_read_edid()
634 regmap_read(lt9611->regmap, 0x8583, &temp); in lt9611_read_edid()
635 lt9611->edid_buf[i * EDID_LEN + j] = temp; in lt9611_read_edid()
639 dev_err(lt9611->dev, "read edid failed: no ack\n"); in lt9611_read_edid()
644 dev_err(lt9611->dev, "read edid failed: access not done\n"); in lt9611_read_edid()
651 regmap_write(lt9611->regmap, 0x8507, 0x1f); in lt9611_read_edid()
658 struct lt9611 *lt9611 = data; in lt9611_get_edid_block() local
670 ret = lt9611_read_edid(lt9611); in lt9611_get_edid_block()
672 dev_err(lt9611->dev, "edid read failed\n"); in lt9611_get_edid_block()
678 memcpy(buf, lt9611->edid_buf + (block * 128), len); in lt9611_get_edid_block()
688 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_atomic_enable() local
710 lt9611_mipi_input_digital(lt9611, mode); in lt9611_bridge_atomic_enable()
711 lt9611_pll_setup(lt9611, mode, &postdiv); in lt9611_bridge_atomic_enable()
712 lt9611_mipi_video_setup(lt9611, mode); in lt9611_bridge_atomic_enable()
713 lt9611_pcr_setup(lt9611, mode, postdiv); in lt9611_bridge_atomic_enable()
715 if (lt9611_power_on(lt9611)) { in lt9611_bridge_atomic_enable()
716 dev_err(lt9611->dev, "power on failed\n"); in lt9611_bridge_atomic_enable()
720 lt9611_mipi_input_analog(lt9611); in lt9611_bridge_atomic_enable()
721 lt9611_hdmi_set_infoframes(lt9611, connector, mode); in lt9611_bridge_atomic_enable()
722 lt9611_hdmi_tx_digital(lt9611, connector->display_info.is_hdmi); in lt9611_bridge_atomic_enable()
723 lt9611_hdmi_tx_phy(lt9611); in lt9611_bridge_atomic_enable()
727 lt9611_video_check(lt9611); in lt9611_bridge_atomic_enable()
730 regmap_write(lt9611->regmap, 0x8130, 0xea); in lt9611_bridge_atomic_enable()
737 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_atomic_disable() local
741 ret = regmap_write(lt9611->regmap, 0x8130, 0x6a); in lt9611_bridge_atomic_disable()
743 dev_err(lt9611->dev, "video on failed\n"); in lt9611_bridge_atomic_disable()
747 if (lt9611_power_off(lt9611)) { in lt9611_bridge_atomic_disable()
748 dev_err(lt9611->dev, "power on failed\n"); in lt9611_bridge_atomic_disable()
753 static struct mipi_dsi_device *lt9611_attach_dsi(struct lt9611 *lt9611, in lt9611_attach_dsi() argument
756 const struct mipi_dsi_device_info info = { "lt9611", 0, lt9611->dev->of_node}; in lt9611_attach_dsi()
759 struct device *dev = lt9611->dev; in lt9611_attach_dsi()
764 return ERR_PTR(dev_err_probe(lt9611->dev, -EPROBE_DEFER, "failed to find dsi host\n")); in lt9611_attach_dsi()
768 dev_err(lt9611->dev, "failed to create dsi device\n"); in lt9611_attach_dsi()
789 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_attach() local
791 return drm_bridge_attach(bridge->encoder, lt9611->next_bridge, in lt9611_bridge_attach()
799 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_mode_valid() local
812 if (mode->hdisplay > 2000 && !lt9611->dsi1_node) in lt9611_bridge_mode_valid()
821 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_atomic_pre_enable() local
829 if (!lt9611->sleep) in lt9611_bridge_atomic_pre_enable()
832 regmap_multi_reg_write(lt9611->regmap, in lt9611_bridge_atomic_pre_enable()
835 lt9611->sleep = false; in lt9611_bridge_atomic_pre_enable()
842 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_atomic_post_disable() local
844 lt9611_sleep_setup(lt9611); in lt9611_bridge_atomic_post_disable()
850 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_get_edid() local
852 lt9611_power_on(lt9611); in lt9611_bridge_get_edid()
853 return drm_do_get_edid(connector, lt9611_get_edid_block, lt9611); in lt9611_bridge_get_edid()
858 struct lt9611 *lt9611 = bridge_to_lt9611(bridge); in lt9611_bridge_hpd_enable() local
860 lt9611_enable_hpd_interrupts(lt9611); in lt9611_bridge_hpd_enable()
907 struct lt9611 *lt9611) in lt9611_parse_dt() argument
909 lt9611->dsi0_node = of_graph_get_remote_node(dev->of_node, 0, -1); in lt9611_parse_dt()
910 if (!lt9611->dsi0_node) { in lt9611_parse_dt()
911 dev_err(lt9611->dev, "failed to get remote node for primary dsi\n"); in lt9611_parse_dt()
915 lt9611->dsi1_node = of_graph_get_remote_node(dev->of_node, 1, -1); in lt9611_parse_dt()
917 lt9611->ac_mode = of_property_read_bool(dev->of_node, "lt,ac-mode"); in lt9611_parse_dt()
919 return drm_of_find_panel_or_bridge(dev->of_node, 2, -1, NULL, <9611->next_bridge); in lt9611_parse_dt()
922 static int lt9611_gpio_init(struct lt9611 *lt9611) in lt9611_gpio_init() argument
924 struct device *dev = lt9611->dev; in lt9611_gpio_init()
926 lt9611->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in lt9611_gpio_init()
927 if (IS_ERR(lt9611->reset_gpio)) { in lt9611_gpio_init()
929 return PTR_ERR(lt9611->reset_gpio); in lt9611_gpio_init()
932 lt9611->enable_gpio = devm_gpiod_get_optional(dev, "enable", in lt9611_gpio_init()
934 if (IS_ERR(lt9611->enable_gpio)) { in lt9611_gpio_init()
936 return PTR_ERR(lt9611->enable_gpio); in lt9611_gpio_init()
942 static int lt9611_read_device_rev(struct lt9611 *lt9611) in lt9611_read_device_rev() argument
947 regmap_write(lt9611->regmap, 0x80ee, 0x01); in lt9611_read_device_rev()
948 ret = regmap_read(lt9611->regmap, 0x8002, &rev); in lt9611_read_device_rev()
950 dev_err(lt9611->dev, "failed to read revision: %d\n", ret); in lt9611_read_device_rev()
952 dev_info(lt9611->dev, "LT9611 revision: 0x%x\n", rev); in lt9611_read_device_rev()
961 struct lt9611 *lt9611 = data; in lt9611_hdmi_hw_params() local
964 regmap_write(lt9611->regmap, 0x840f, 0x2b); in lt9611_hdmi_hw_params()
966 regmap_write(lt9611->regmap, 0x840f, 0xab); in lt9611_hdmi_hw_params()
970 regmap_write(lt9611->regmap, 0x8435, 0x00); in lt9611_hdmi_hw_params()
971 regmap_write(lt9611->regmap, 0x8436, 0x18); in lt9611_hdmi_hw_params()
972 regmap_write(lt9611->regmap, 0x8437, 0x00); in lt9611_hdmi_hw_params()
979 struct lt9611 *lt9611 = data; in lt9611_audio_startup() local
981 regmap_write(lt9611->regmap, 0x82d6, 0x8c); in lt9611_audio_startup()
982 regmap_write(lt9611->regmap, 0x82d7, 0x04); in lt9611_audio_startup()
984 regmap_write(lt9611->regmap, 0x8406, 0x08); in lt9611_audio_startup()
985 regmap_write(lt9611->regmap, 0x8407, 0x10); in lt9611_audio_startup()
987 regmap_write(lt9611->regmap, 0x8434, 0xd5); in lt9611_audio_startup()
994 struct lt9611 *lt9611 = data; in lt9611_audio_shutdown() local
996 regmap_write(lt9611->regmap, 0x8406, 0x00); in lt9611_audio_shutdown()
997 regmap_write(lt9611->regmap, 0x8407, 0x00); in lt9611_audio_shutdown()
1033 static int lt9611_audio_init(struct device *dev, struct lt9611 *lt9611) in lt9611_audio_init() argument
1035 codec_data.data = lt9611; in lt9611_audio_init()
1036 lt9611->audio_pdev = in lt9611_audio_init()
1041 return PTR_ERR_OR_ZERO(lt9611->audio_pdev); in lt9611_audio_init()
1044 static void lt9611_audio_exit(struct lt9611 *lt9611) in lt9611_audio_exit() argument
1046 if (lt9611->audio_pdev) { in lt9611_audio_exit()
1047 platform_device_unregister(lt9611->audio_pdev); in lt9611_audio_exit()
1048 lt9611->audio_pdev = NULL; in lt9611_audio_exit()
1054 struct lt9611 *lt9611; in lt9611_probe() local
1063 lt9611 = devm_kzalloc(dev, sizeof(*lt9611), GFP_KERNEL); in lt9611_probe()
1064 if (!lt9611) in lt9611_probe()
1067 lt9611->dev = dev; in lt9611_probe()
1068 lt9611->client = client; in lt9611_probe()
1069 lt9611->sleep = false; in lt9611_probe()
1071 lt9611->regmap = devm_regmap_init_i2c(client, <9611_regmap_config); in lt9611_probe()
1072 if (IS_ERR(lt9611->regmap)) { in lt9611_probe()
1073 dev_err(lt9611->dev, "regmap i2c init failed\n"); in lt9611_probe()
1074 return PTR_ERR(lt9611->regmap); in lt9611_probe()
1077 ret = lt9611_parse_dt(dev, lt9611); in lt9611_probe()
1083 ret = lt9611_gpio_init(lt9611); in lt9611_probe()
1087 ret = lt9611_regulator_init(lt9611); in lt9611_probe()
1091 lt9611_assert_5v(lt9611); in lt9611_probe()
1093 ret = lt9611_regulator_enable(lt9611); in lt9611_probe()
1097 lt9611_reset(lt9611); in lt9611_probe()
1099 ret = lt9611_read_device_rev(lt9611); in lt9611_probe()
1107 IRQF_ONESHOT, "lt9611", lt9611); in lt9611_probe()
1113 i2c_set_clientdata(client, lt9611); in lt9611_probe()
1115 lt9611->bridge.funcs = <9611_bridge_funcs; in lt9611_probe()
1116 lt9611->bridge.of_node = client->dev.of_node; in lt9611_probe()
1117 lt9611->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | in lt9611_probe()
1119 lt9611->bridge.type = DRM_MODE_CONNECTOR_HDMIA; in lt9611_probe()
1121 drm_bridge_add(<9611->bridge); in lt9611_probe()
1124 lt9611->dsi0 = lt9611_attach_dsi(lt9611, lt9611->dsi0_node); in lt9611_probe()
1125 if (IS_ERR(lt9611->dsi0)) { in lt9611_probe()
1126 ret = PTR_ERR(lt9611->dsi0); in lt9611_probe()
1131 if (lt9611->dsi1_node) { in lt9611_probe()
1132 lt9611->dsi1 = lt9611_attach_dsi(lt9611, lt9611->dsi1_node); in lt9611_probe()
1133 if (IS_ERR(lt9611->dsi1)) { in lt9611_probe()
1134 ret = PTR_ERR(lt9611->dsi1); in lt9611_probe()
1139 lt9611_enable_hpd_interrupts(lt9611); in lt9611_probe()
1141 ret = lt9611_audio_init(dev, lt9611); in lt9611_probe()
1148 drm_bridge_remove(<9611->bridge); in lt9611_probe()
1151 regulator_bulk_disable(ARRAY_SIZE(lt9611->supplies), lt9611->supplies); in lt9611_probe()
1154 of_node_put(lt9611->dsi1_node); in lt9611_probe()
1155 of_node_put(lt9611->dsi0_node); in lt9611_probe()
1162 struct lt9611 *lt9611 = i2c_get_clientdata(client); in lt9611_remove() local
1165 lt9611_audio_exit(lt9611); in lt9611_remove()
1166 drm_bridge_remove(<9611->bridge); in lt9611_remove()
1168 regulator_bulk_disable(ARRAY_SIZE(lt9611->supplies), lt9611->supplies); in lt9611_remove()
1170 of_node_put(lt9611->dsi1_node); in lt9611_remove()
1171 of_node_put(lt9611->dsi0_node); in lt9611_remove()