Lines Matching +full:powerdown +full:- +full:gpios

1 // SPDX-License-Identifier: GPL-2.0
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 endpoint = of_graph_get_endpoint_by_regs(thc63->dev->of_node, in thc63_parse_dt()
127 THC63_RGB_OUT0, -1); in thc63_parse_dt()
129 dev_err(thc63->dev, "Missing endpoint in port@%u\n", in thc63_parse_dt()
131 return -ENODEV; in thc63_parse_dt()
137 dev_err(thc63->dev, "Endpoint in port@%u unconnected\n", in thc63_parse_dt()
139 return -ENODEV; in thc63_parse_dt()
143 dev_err(thc63->dev, "port@%u remote endpoint is disabled\n", in thc63_parse_dt()
146 return -ENODEV; in thc63_parse_dt()
149 thc63->next = of_drm_find_bridge(remote); in thc63_parse_dt()
151 if (!thc63->next) in thc63_parse_dt()
152 return -EPROBE_DEFER; in thc63_parse_dt()
154 endpoint = of_graph_get_endpoint_by_regs(thc63->dev->of_node, in thc63_parse_dt()
155 THC63_LVDS_IN1, -1); in thc63_parse_dt()
162 thc63->timings.dual_link = true; in thc63_parse_dt()
167 dev_dbg(thc63->dev, "operating in %s-link mode\n", in thc63_parse_dt()
168 thc63->timings.dual_link ? "dual" : "single"); in thc63_parse_dt()
175 thc63->oe = devm_gpiod_get_optional(thc63->dev, "oe", GPIOD_OUT_LOW); in thc63_gpio_init()
176 if (IS_ERR(thc63->oe)) { in thc63_gpio_init()
177 dev_err(thc63->dev, "Unable to get \"oe-gpios\": %ld\n", in thc63_gpio_init()
178 PTR_ERR(thc63->oe)); in thc63_gpio_init()
179 return PTR_ERR(thc63->oe); in thc63_gpio_init()
182 thc63->pdwn = devm_gpiod_get_optional(thc63->dev, "powerdown", in thc63_gpio_init()
184 if (IS_ERR(thc63->pdwn)) { in thc63_gpio_init()
185 dev_err(thc63->dev, "Unable to get \"powerdown-gpios\": %ld\n", in thc63_gpio_init()
186 PTR_ERR(thc63->pdwn)); in thc63_gpio_init()
187 return PTR_ERR(thc63->pdwn); in thc63_gpio_init()
198 thc63 = devm_kzalloc(&pdev->dev, sizeof(*thc63), GFP_KERNEL); in thc63_probe()
200 return -ENOMEM; in thc63_probe()
202 thc63->dev = &pdev->dev; in thc63_probe()
205 thc63->vcc = devm_regulator_get_optional(thc63->dev, "vcc"); in thc63_probe()
206 if (IS_ERR(thc63->vcc)) { in thc63_probe()
207 if (PTR_ERR(thc63->vcc) == -EPROBE_DEFER) in thc63_probe()
208 return -EPROBE_DEFER; in thc63_probe()
210 dev_err(thc63->dev, "Unable to get \"vcc\" supply: %ld\n", in thc63_probe()
211 PTR_ERR(thc63->vcc)); in thc63_probe()
212 return PTR_ERR(thc63->vcc); in thc63_probe()
223 thc63->bridge.driver_private = thc63; in thc63_probe()
224 thc63->bridge.of_node = pdev->dev.of_node; in thc63_probe()
225 thc63->bridge.funcs = &thc63_bridge_func; in thc63_probe()
226 thc63->bridge.timings = &thc63->timings; in thc63_probe()
228 drm_bridge_add(&thc63->bridge); in thc63_probe()
237 drm_bridge_remove(&thc63->bridge); in thc63_remove()