Lines Matching refs:thc63

49 	struct thc63_dev *thc63 = to_thc63(bridge);
51 return drm_bridge_attach(encoder, thc63->next, bridge, flags);
58 struct thc63_dev *thc63 = to_thc63(bridge);
68 if (thc63->timings.dual_link) {
87 struct thc63_dev *thc63 = to_thc63(bridge);
90 ret = regulator_enable(thc63->vcc);
92 dev_err(thc63->dev,
97 gpiod_set_value(thc63->pdwn, 0);
98 gpiod_set_value(thc63->oe, 1);
103 struct thc63_dev *thc63 = to_thc63(bridge);
106 gpiod_set_value(thc63->oe, 0);
107 gpiod_set_value(thc63->pdwn, 1);
109 ret = regulator_disable(thc63->vcc);
111 dev_err(thc63->dev,
122 static int thc63_parse_dt(struct thc63_dev *thc63)
127 remote = of_graph_get_remote_node(thc63->dev->of_node,
130 dev_err(thc63->dev, "No remote endpoint for port@%u\n",
135 thc63->next = of_drm_find_bridge(remote);
137 if (!thc63->next)
140 endpoint = of_graph_get_endpoint_by_regs(thc63->dev->of_node,
148 thc63->timings.dual_link = true;
153 dev_dbg(thc63->dev, "operating in %s-link mode\n",
154 thc63->timings.dual_link ? "dual" : "single");
159 static int thc63_gpio_init(struct thc63_dev *thc63)
161 thc63->oe = devm_gpiod_get_optional(thc63->dev, "oe", GPIOD_OUT_LOW);
162 if (IS_ERR(thc63->oe)) {
163 dev_err(thc63->dev, "Unable to get \"oe-gpios\": %ld\n",
164 PTR_ERR(thc63->oe));
165 return PTR_ERR(thc63->oe);
168 thc63->pdwn = devm_gpiod_get_optional(thc63->dev, "powerdown",
170 if (IS_ERR(thc63->pdwn)) {
171 dev_err(thc63->dev, "Unable to get \"powerdown-gpios\": %ld\n",
172 PTR_ERR(thc63->pdwn));
173 return PTR_ERR(thc63->pdwn);
181 struct thc63_dev *thc63;
184 thc63 = devm_drm_bridge_alloc(&pdev->dev, struct thc63_dev, bridge,
186 if (IS_ERR(thc63))
187 return PTR_ERR(thc63);
189 thc63->dev = &pdev->dev;
190 platform_set_drvdata(pdev, thc63);
192 thc63->vcc = devm_regulator_get(thc63->dev, "vcc");
193 if (IS_ERR(thc63->vcc)) {
194 if (PTR_ERR(thc63->vcc) == -EPROBE_DEFER)
197 dev_err(thc63->dev, "Unable to get \"vcc\" supply: %ld\n",
198 PTR_ERR(thc63->vcc));
199 return PTR_ERR(thc63->vcc);
202 ret = thc63_gpio_init(thc63);
206 ret = thc63_parse_dt(thc63);
210 thc63->bridge.driver_private = thc63;
211 thc63->bridge.of_node = pdev->dev.of_node;
212 thc63->bridge.timings = &thc63->timings;
214 drm_bridge_add(&thc63->bridge);
221 struct thc63_dev *thc63 = platform_get_drvdata(pdev);
223 drm_bridge_remove(&thc63->bridge);