Lines Matching +full:analog +full:- +full:amplifier

1 // SPDX-License-Identifier: GPL-2.0-only
3 * OPA362 analog video amplifier with output/power control
8 * based on encoder-tfp410
37 struct omap_dss_device *in = ddata->in; in opa362_connect()
40 dev_dbg(dssdev->dev, "connect\n"); in opa362_connect()
43 return -EBUSY; in opa362_connect()
45 r = in->ops.atv->connect(in, dssdev); in opa362_connect()
49 dst->src = dssdev; in opa362_connect()
50 dssdev->dst = dst; in opa362_connect()
59 struct omap_dss_device *in = ddata->in; in opa362_disconnect()
61 dev_dbg(dssdev->dev, "disconnect\n"); in opa362_disconnect()
67 WARN_ON(dst != dssdev->dst); in opa362_disconnect()
68 if (dst != dssdev->dst) in opa362_disconnect()
71 dst->src = NULL; in opa362_disconnect()
72 dssdev->dst = NULL; in opa362_disconnect()
74 in->ops.atv->disconnect(in, &ddata->dssdev); in opa362_disconnect()
80 struct omap_dss_device *in = ddata->in; in opa362_enable()
83 dev_dbg(dssdev->dev, "enable\n"); in opa362_enable()
86 return -ENODEV; in opa362_enable()
91 in->ops.atv->set_timings(in, &ddata->timings); in opa362_enable()
93 r = in->ops.atv->enable(in); in opa362_enable()
97 if (ddata->enable_gpio) in opa362_enable()
98 gpiod_set_value_cansleep(ddata->enable_gpio, 1); in opa362_enable()
100 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; in opa362_enable()
108 struct omap_dss_device *in = ddata->in; in opa362_disable()
110 dev_dbg(dssdev->dev, "disable\n"); in opa362_disable()
115 if (ddata->enable_gpio) in opa362_disable()
116 gpiod_set_value_cansleep(ddata->enable_gpio, 0); in opa362_disable()
118 in->ops.atv->disable(in); in opa362_disable()
120 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; in opa362_disable()
127 struct omap_dss_device *in = ddata->in; in opa362_set_timings()
129 dev_dbg(dssdev->dev, "set_timings\n"); in opa362_set_timings()
131 ddata->timings = *timings; in opa362_set_timings()
132 dssdev->panel.timings = *timings; in opa362_set_timings()
134 in->ops.atv->set_timings(in, timings); in opa362_set_timings()
142 dev_dbg(dssdev->dev, "get_timings\n"); in opa362_get_timings()
144 *timings = ddata->timings; in opa362_get_timings()
151 struct omap_dss_device *in = ddata->in; in opa362_check_timings()
153 dev_dbg(dssdev->dev, "check_timings\n"); in opa362_check_timings()
155 return in->ops.atv->check_timings(in, timings); in opa362_check_timings()
182 struct device_node *node = pdev->dev.of_node; in opa362_probe()
188 dev_dbg(&pdev->dev, "probe\n"); in opa362_probe()
191 dev_err(&pdev->dev, "Unable to find device tree\n"); in opa362_probe()
192 return -EINVAL; in opa362_probe()
195 ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); in opa362_probe()
197 return -ENOMEM; in opa362_probe()
201 gpio = devm_gpiod_get_optional(&pdev->dev, "enable", GPIOD_OUT_LOW); in opa362_probe()
205 ddata->enable_gpio = gpio; in opa362_probe()
209 dev_err(&pdev->dev, "failed to find video source\n"); in opa362_probe()
213 ddata->in = in; in opa362_probe()
215 dssdev = &ddata->dssdev; in opa362_probe()
216 dssdev->ops.atv = &opa362_atv_ops; in opa362_probe()
217 dssdev->dev = &pdev->dev; in opa362_probe()
218 dssdev->type = OMAP_DISPLAY_TYPE_VENC; in opa362_probe()
219 dssdev->output_type = OMAP_DISPLAY_TYPE_VENC; in opa362_probe()
220 dssdev->owner = THIS_MODULE; in opa362_probe()
224 dev_err(&pdev->dev, "Failed to register output\n"); in opa362_probe()
230 omap_dss_put_device(ddata->in); in opa362_probe()
237 struct omap_dss_device *dssdev = &ddata->dssdev; in opa362_remove()
238 struct omap_dss_device *in = ddata->in; in opa362_remove()
240 omapdss_unregister_output(&ddata->dssdev); in opa362_remove()
248 opa362_disconnect(dssdev, dssdev->dst); in opa362_remove()
265 .name = "amplifier-opa362",
274 MODULE_DESCRIPTION("OPA362 analog video amplifier with output/power control");