Lines Matching +full:lvds +full:- +full:decoder

1 // SPDX-License-Identifier: GPL-2.0
3 * THC63LVD1024 LVDS to parallel data DRM bridge driver.
50 return drm_bridge_attach(bridge->encoder, thc63->next, bridge, flags); in thc63_attach()
63 * dual-in, single-out where it is 40 to 150 MHz. As dual-in, dual-out in thc63_mode_valid()
67 if (thc63->timings.dual_link) { in thc63_mode_valid()
75 if (mode->clock < min_freq) in thc63_mode_valid()
78 if (mode->clock > max_freq) in thc63_mode_valid()
89 ret = regulator_enable(thc63->vcc); in thc63_enable()
91 dev_err(thc63->dev, in thc63_enable()
96 gpiod_set_value(thc63->pdwn, 0); in thc63_enable()
97 gpiod_set_value(thc63->oe, 1); in thc63_enable()
105 gpiod_set_value(thc63->oe, 0); in thc63_disable()
106 gpiod_set_value(thc63->pdwn, 1); in thc63_disable()
108 ret = regulator_disable(thc63->vcc); in thc63_disable()
110 dev_err(thc63->dev, in thc63_disable()
126 remote = of_graph_get_remote_node(thc63->dev->of_node, in thc63_parse_dt()
127 THC63_RGB_OUT0, -1); in thc63_parse_dt()
129 dev_err(thc63->dev, "No remote endpoint for port@%u\n", in thc63_parse_dt()
131 return -ENODEV; in thc63_parse_dt()
134 thc63->next = of_drm_find_bridge(remote); in thc63_parse_dt()
136 if (!thc63->next) in thc63_parse_dt()
137 return -EPROBE_DEFER; in thc63_parse_dt()
139 endpoint = of_graph_get_endpoint_by_regs(thc63->dev->of_node, in thc63_parse_dt()
140 THC63_LVDS_IN1, -1); in thc63_parse_dt()
147 thc63->timings.dual_link = true; in thc63_parse_dt()
152 dev_dbg(thc63->dev, "operating in %s-link mode\n", in thc63_parse_dt()
153 thc63->timings.dual_link ? "dual" : "single"); in thc63_parse_dt()
160 thc63->oe = devm_gpiod_get_optional(thc63->dev, "oe", GPIOD_OUT_LOW); in thc63_gpio_init()
161 if (IS_ERR(thc63->oe)) { in thc63_gpio_init()
162 dev_err(thc63->dev, "Unable to get \"oe-gpios\": %ld\n", in thc63_gpio_init()
163 PTR_ERR(thc63->oe)); in thc63_gpio_init()
164 return PTR_ERR(thc63->oe); in thc63_gpio_init()
167 thc63->pdwn = devm_gpiod_get_optional(thc63->dev, "powerdown", in thc63_gpio_init()
169 if (IS_ERR(thc63->pdwn)) { in thc63_gpio_init()
170 dev_err(thc63->dev, "Unable to get \"powerdown-gpios\": %ld\n", in thc63_gpio_init()
171 PTR_ERR(thc63->pdwn)); in thc63_gpio_init()
172 return PTR_ERR(thc63->pdwn); in thc63_gpio_init()
183 thc63 = devm_kzalloc(&pdev->dev, sizeof(*thc63), GFP_KERNEL); in thc63_probe()
185 return -ENOMEM; in thc63_probe()
187 thc63->dev = &pdev->dev; in thc63_probe()
190 thc63->vcc = devm_regulator_get(thc63->dev, "vcc"); in thc63_probe()
191 if (IS_ERR(thc63->vcc)) { in thc63_probe()
192 if (PTR_ERR(thc63->vcc) == -EPROBE_DEFER) in thc63_probe()
193 return -EPROBE_DEFER; in thc63_probe()
195 dev_err(thc63->dev, "Unable to get \"vcc\" supply: %ld\n", in thc63_probe()
196 PTR_ERR(thc63->vcc)); in thc63_probe()
197 return PTR_ERR(thc63->vcc); in thc63_probe()
208 thc63->bridge.driver_private = thc63; in thc63_probe()
209 thc63->bridge.of_node = pdev->dev.of_node; in thc63_probe()
210 thc63->bridge.funcs = &thc63_bridge_func; in thc63_probe()
211 thc63->bridge.timings = &thc63->timings; in thc63_probe()
213 drm_bridge_add(&thc63->bridge); in thc63_probe()
222 drm_bridge_remove(&thc63->bridge); in thc63_remove()
242 MODULE_DESCRIPTION("Thine THC63LVD1024 LVDS decoder DRM bridge driver");