2019-05-27 14:55:01 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2016-09-30 22:37:06 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015-2016 Free Electrons
|
|
|
|
* Copyright (C) 2015-2016 NextThing Co
|
|
|
|
*
|
|
|
|
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
|
|
|
*/
|
|
|
|
|
2020-02-26 19:24:33 +08:00
|
|
|
#include <linux/gpio/consumer.h>
|
2016-09-30 22:37:06 +08:00
|
|
|
#include <linux/module.h>
|
2018-01-12 15:48:53 +08:00
|
|
|
#include <linux/of_device.h>
|
2016-09-30 22:37:06 +08:00
|
|
|
#include <linux/of_graph.h>
|
2016-11-16 23:42:31 +08:00
|
|
|
#include <linux/regulator/consumer.h>
|
2016-09-30 22:37:06 +08:00
|
|
|
|
|
|
|
#include <drm/drm_atomic_helper.h>
|
2019-08-26 23:26:29 +08:00
|
|
|
#include <drm/drm_bridge.h>
|
2016-09-30 22:37:06 +08:00
|
|
|
#include <drm/drm_crtc.h>
|
2019-05-20 02:36:36 +08:00
|
|
|
#include <drm/drm_print.h>
|
2019-01-18 05:03:34 +08:00
|
|
|
#include <drm/drm_probe_helper.h>
|
2016-09-30 22:37:06 +08:00
|
|
|
|
2020-02-26 19:24:32 +08:00
|
|
|
struct simple_bridge_info {
|
|
|
|
const struct drm_bridge_timings *timings;
|
|
|
|
unsigned int connector_type;
|
|
|
|
};
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
struct simple_bridge {
|
2016-09-30 22:37:06 +08:00
|
|
|
struct drm_bridge bridge;
|
|
|
|
struct drm_connector connector;
|
|
|
|
|
2020-02-26 19:24:32 +08:00
|
|
|
const struct simple_bridge_info *info;
|
|
|
|
|
2016-09-30 22:37:06 +08:00
|
|
|
struct i2c_adapter *ddc;
|
2016-11-16 23:42:31 +08:00
|
|
|
struct regulator *vdd;
|
2020-02-26 19:24:33 +08:00
|
|
|
struct gpio_desc *enable;
|
2016-09-30 22:37:06 +08:00
|
|
|
};
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static inline struct simple_bridge *
|
|
|
|
drm_bridge_to_simple_bridge(struct drm_bridge *bridge)
|
2016-09-30 22:37:06 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
return container_of(bridge, struct simple_bridge, bridge);
|
2016-09-30 22:37:06 +08:00
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static inline struct simple_bridge *
|
|
|
|
drm_connector_to_simple_bridge(struct drm_connector *connector)
|
2016-09-30 22:37:06 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
return container_of(connector, struct simple_bridge, connector);
|
2016-09-30 22:37:06 +08:00
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static int simple_bridge_get_modes(struct drm_connector *connector)
|
2016-09-30 22:37:06 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
struct simple_bridge *sbridge = drm_connector_to_simple_bridge(connector);
|
2016-09-30 22:37:06 +08:00
|
|
|
struct edid *edid;
|
|
|
|
int ret;
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
if (!sbridge->ddc)
|
2016-09-30 22:37:06 +08:00
|
|
|
goto fallback;
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
edid = drm_get_edid(connector, sbridge->ddc);
|
2016-09-30 22:37:06 +08:00
|
|
|
if (!edid) {
|
|
|
|
DRM_INFO("EDID readout failed, falling back to standard modes\n");
|
|
|
|
goto fallback;
|
|
|
|
}
|
|
|
|
|
2018-07-09 16:40:06 +08:00
|
|
|
drm_connector_update_edid_property(connector, edid);
|
2018-04-21 02:59:59 +08:00
|
|
|
ret = drm_add_edid_modes(connector, edid);
|
|
|
|
kfree(edid);
|
|
|
|
return ret;
|
2016-09-30 22:37:06 +08:00
|
|
|
|
|
|
|
fallback:
|
|
|
|
/*
|
|
|
|
* In case we cannot retrieve the EDIDs (broken or missing i2c
|
|
|
|
* bus), fallback on the XGA standards
|
|
|
|
*/
|
|
|
|
ret = drm_add_modes_noedid(connector, 1920, 1200);
|
|
|
|
|
|
|
|
/* And prefer a mode pretty much anyone can handle */
|
|
|
|
drm_set_preferred_mode(connector, 1024, 768);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static const struct drm_connector_helper_funcs simple_bridge_con_helper_funcs = {
|
|
|
|
.get_modes = simple_bridge_get_modes,
|
2016-09-30 22:37:06 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static enum drm_connector_status
|
2020-02-26 19:24:30 +08:00
|
|
|
simple_bridge_connector_detect(struct drm_connector *connector, bool force)
|
2016-09-30 22:37:06 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
struct simple_bridge *sbridge = drm_connector_to_simple_bridge(connector);
|
2016-09-30 22:37:06 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Even if we have an I2C bus, we can't assume that the cable
|
|
|
|
* is disconnected if drm_probe_ddc fails. Some cables don't
|
|
|
|
* wire the DDC pins, or the I2C bus might not be working at
|
|
|
|
* all.
|
|
|
|
*/
|
2020-02-26 19:24:30 +08:00
|
|
|
if (sbridge->ddc && drm_probe_ddc(sbridge->ddc))
|
2016-09-30 22:37:06 +08:00
|
|
|
return connector_status_connected;
|
|
|
|
|
|
|
|
return connector_status_unknown;
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static const struct drm_connector_funcs simple_bridge_con_funcs = {
|
|
|
|
.detect = simple_bridge_connector_detect,
|
2016-09-30 22:37:06 +08:00
|
|
|
.fill_modes = drm_helper_probe_single_connector_modes,
|
|
|
|
.destroy = drm_connector_cleanup,
|
|
|
|
.reset = drm_atomic_helper_connector_reset,
|
|
|
|
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
|
|
|
|
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
|
|
|
|
};
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static int simple_bridge_attach(struct drm_bridge *bridge,
|
|
|
|
enum drm_bridge_attach_flags flags)
|
2016-09-30 22:37:06 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
struct simple_bridge *sbridge = drm_bridge_to_simple_bridge(bridge);
|
2016-09-30 22:37:06 +08:00
|
|
|
int ret;
|
|
|
|
|
drm/bridge: Extend bridge API to disable connector creation
Most bridge drivers create a DRM connector to model the connector at the
output of the bridge. This model is historical and has worked pretty
well so far, but causes several issues:
- It prevents supporting more complex display pipelines where DRM
connector operations are split over multiple components. For instance a
pipeline with a bridge connected to the DDC signals to read EDID data,
and another one connected to the HPD signal to detect connection and
disconnection, will not be possible to support through this model.
- It requires every bridge driver to implement similar connector
handling code, resulting in code duplication.
- It assumes that a bridge will either be wired to a connector or to
another bridge, but doesn't support bridges that can be used in both
positions very well (although there is some ad-hoc support for this in
the analogix_dp bridge driver).
In order to solve these issues, ownership of the connector should be
moved to the display controller driver (where it can be implemented
using helpers provided by the core).
Extend the bridge API to allow disabling connector creation in bridge
drivers as a first step towards the new model. The new flags argument to
the bridge .attach() operation allows instructing the bridge driver to
skip creating a connector. Unconditionally set the new flags argument to
0 for now to keep the existing behaviour, and modify all existing bridge
drivers to return an error when connector creation is not requested as
they don't support this feature yet.
The change is based on the following semantic patch, with manual review
and edits.
@ rule1 @
identifier funcs;
identifier fn;
@@
struct drm_bridge_funcs funcs = {
...,
.attach = fn
};
@ depends on rule1 @
identifier rule1.fn;
identifier bridge;
statement S, S1;
@@
int fn(
struct drm_bridge *bridge
+ , enum drm_bridge_attach_flags flags
)
{
... when != S
+ if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) {
+ DRM_ERROR("Fix bridge driver to make connector optional!");
+ return -EINVAL;
+ }
+
S1
...
}
@ depends on rule1 @
identifier rule1.fn;
identifier bridge, flags;
expression E1, E2, E3;
@@
int fn(
struct drm_bridge *bridge,
enum drm_bridge_attach_flags flags
) {
<...
drm_bridge_attach(E1, E2, E3
+ , flags
)
...>
}
@@
expression E1, E2, E3;
@@
drm_bridge_attach(E1, E2, E3
+ , 0
)
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-10-laurent.pinchart@ideasonboard.com
2020-02-26 19:24:29 +08:00
|
|
|
if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) {
|
|
|
|
DRM_ERROR("Fix bridge driver to make connector optional!");
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
2016-09-30 22:37:06 +08:00
|
|
|
if (!bridge->encoder) {
|
|
|
|
DRM_ERROR("Missing encoder\n");
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
drm_connector_helper_add(&sbridge->connector,
|
|
|
|
&simple_bridge_con_helper_funcs);
|
|
|
|
ret = drm_connector_init_with_ddc(bridge->dev, &sbridge->connector,
|
|
|
|
&simple_bridge_con_funcs,
|
2020-02-26 19:24:32 +08:00
|
|
|
sbridge->info->connector_type,
|
2020-02-26 19:24:30 +08:00
|
|
|
sbridge->ddc);
|
2016-09-30 22:37:06 +08:00
|
|
|
if (ret) {
|
|
|
|
DRM_ERROR("Failed to initialize connector\n");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
drm_connector_attach_encoder(&sbridge->connector,
|
2016-09-30 22:37:06 +08:00
|
|
|
bridge->encoder);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static void simple_bridge_enable(struct drm_bridge *bridge)
|
2016-11-16 23:42:31 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
struct simple_bridge *sbridge = drm_bridge_to_simple_bridge(bridge);
|
2020-02-26 19:24:33 +08:00
|
|
|
int ret;
|
2016-11-16 23:42:31 +08:00
|
|
|
|
2020-02-26 19:24:33 +08:00
|
|
|
if (sbridge->vdd) {
|
2020-02-26 19:24:30 +08:00
|
|
|
ret = regulator_enable(sbridge->vdd);
|
2020-02-26 19:24:33 +08:00
|
|
|
if (ret)
|
|
|
|
DRM_ERROR("Failed to enable vdd regulator: %d\n", ret);
|
|
|
|
}
|
2016-11-16 23:42:31 +08:00
|
|
|
|
2020-02-26 19:24:33 +08:00
|
|
|
gpiod_set_value_cansleep(sbridge->enable, 1);
|
2016-11-16 23:42:31 +08:00
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static void simple_bridge_disable(struct drm_bridge *bridge)
|
2016-11-16 23:42:31 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
struct simple_bridge *sbridge = drm_bridge_to_simple_bridge(bridge);
|
2016-11-16 23:42:31 +08:00
|
|
|
|
2020-02-26 19:24:33 +08:00
|
|
|
gpiod_set_value_cansleep(sbridge->enable, 0);
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
if (sbridge->vdd)
|
|
|
|
regulator_disable(sbridge->vdd);
|
2016-11-16 23:42:31 +08:00
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static const struct drm_bridge_funcs simple_bridge_bridge_funcs = {
|
|
|
|
.attach = simple_bridge_attach,
|
|
|
|
.enable = simple_bridge_enable,
|
|
|
|
.disable = simple_bridge_disable,
|
2016-09-30 22:37:06 +08:00
|
|
|
};
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static struct i2c_adapter *simple_bridge_retrieve_ddc(struct device *dev)
|
2016-09-30 22:37:06 +08:00
|
|
|
{
|
2017-03-22 21:26:06 +08:00
|
|
|
struct device_node *phandle, *remote;
|
2016-09-30 22:37:06 +08:00
|
|
|
struct i2c_adapter *ddc;
|
|
|
|
|
2017-03-22 21:26:06 +08:00
|
|
|
remote = of_graph_get_remote_node(dev->of_node, 1, -1);
|
|
|
|
if (!remote)
|
2016-09-30 22:37:06 +08:00
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
|
|
|
|
phandle = of_parse_phandle(remote, "ddc-i2c-bus", 0);
|
|
|
|
of_node_put(remote);
|
|
|
|
if (!phandle)
|
|
|
|
return ERR_PTR(-ENODEV);
|
|
|
|
|
|
|
|
ddc = of_get_i2c_adapter_by_node(phandle);
|
|
|
|
of_node_put(phandle);
|
|
|
|
if (!ddc)
|
|
|
|
return ERR_PTR(-EPROBE_DEFER);
|
|
|
|
|
|
|
|
return ddc;
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static int simple_bridge_probe(struct platform_device *pdev)
|
2016-09-30 22:37:06 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
struct simple_bridge *sbridge;
|
2016-09-30 22:37:06 +08:00
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
sbridge = devm_kzalloc(&pdev->dev, sizeof(*sbridge), GFP_KERNEL);
|
|
|
|
if (!sbridge)
|
2016-09-30 22:37:06 +08:00
|
|
|
return -ENOMEM;
|
2020-02-26 19:24:30 +08:00
|
|
|
platform_set_drvdata(pdev, sbridge);
|
2016-09-30 22:37:06 +08:00
|
|
|
|
2020-02-26 19:24:32 +08:00
|
|
|
sbridge->info = of_device_get_match_data(&pdev->dev);
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
sbridge->vdd = devm_regulator_get_optional(&pdev->dev, "vdd");
|
|
|
|
if (IS_ERR(sbridge->vdd)) {
|
|
|
|
int ret = PTR_ERR(sbridge->vdd);
|
2016-11-16 23:42:31 +08:00
|
|
|
if (ret == -EPROBE_DEFER)
|
|
|
|
return -EPROBE_DEFER;
|
2020-02-26 19:24:30 +08:00
|
|
|
sbridge->vdd = NULL;
|
2016-11-16 23:42:31 +08:00
|
|
|
dev_dbg(&pdev->dev, "No vdd regulator found: %d\n", ret);
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:33 +08:00
|
|
|
sbridge->enable = devm_gpiod_get_optional(&pdev->dev, "enable",
|
|
|
|
GPIOD_OUT_LOW);
|
|
|
|
if (IS_ERR(sbridge->enable)) {
|
|
|
|
if (PTR_ERR(sbridge->enable) != -EPROBE_DEFER)
|
|
|
|
dev_err(&pdev->dev, "Unable to retrieve enable GPIO\n");
|
|
|
|
return PTR_ERR(sbridge->enable);
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
sbridge->ddc = simple_bridge_retrieve_ddc(&pdev->dev);
|
|
|
|
if (IS_ERR(sbridge->ddc)) {
|
|
|
|
if (PTR_ERR(sbridge->ddc) == -ENODEV) {
|
2016-09-30 22:37:06 +08:00
|
|
|
dev_dbg(&pdev->dev,
|
|
|
|
"No i2c bus specified. Disabling EDID readout\n");
|
2020-02-26 19:24:30 +08:00
|
|
|
sbridge->ddc = NULL;
|
2016-09-30 22:37:06 +08:00
|
|
|
} else {
|
|
|
|
dev_err(&pdev->dev, "Couldn't retrieve i2c bus\n");
|
2020-02-26 19:24:30 +08:00
|
|
|
return PTR_ERR(sbridge->ddc);
|
2016-09-30 22:37:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
sbridge->bridge.funcs = &simple_bridge_bridge_funcs;
|
|
|
|
sbridge->bridge.of_node = pdev->dev.of_node;
|
2020-02-26 19:24:32 +08:00
|
|
|
sbridge->bridge.timings = sbridge->info->timings;
|
2016-09-30 22:37:06 +08:00
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
drm_bridge_add(&sbridge->bridge);
|
2016-09-30 22:37:06 +08:00
|
|
|
|
2017-07-03 16:42:20 +08:00
|
|
|
return 0;
|
2016-09-30 22:37:06 +08:00
|
|
|
}
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static int simple_bridge_remove(struct platform_device *pdev)
|
2016-09-30 22:37:06 +08:00
|
|
|
{
|
2020-02-26 19:24:30 +08:00
|
|
|
struct simple_bridge *sbridge = platform_get_drvdata(pdev);
|
2016-09-30 22:37:06 +08:00
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
drm_bridge_remove(&sbridge->bridge);
|
2016-09-30 22:37:06 +08:00
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
if (sbridge->ddc)
|
|
|
|
i2c_put_adapter(sbridge->ddc);
|
2016-09-30 22:37:06 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-01-12 15:48:53 +08:00
|
|
|
/*
|
|
|
|
* We assume the ADV7123 DAC is the "default" for historical reasons
|
|
|
|
* Information taken from the ADV7123 datasheet, revision D.
|
|
|
|
* NOTE: the ADV7123EP seems to have other timings and need a new timings
|
|
|
|
* set if used.
|
|
|
|
*/
|
2020-02-26 19:24:30 +08:00
|
|
|
static const struct drm_bridge_timings default_bridge_timings = {
|
2018-01-12 15:48:53 +08:00
|
|
|
/* Timing specifications, datasheet page 7 */
|
2018-09-05 13:21:08 +08:00
|
|
|
.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
|
2018-01-12 15:48:53 +08:00
|
|
|
.setup_time_ps = 500,
|
|
|
|
.hold_time_ps = 1500,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Information taken from the THS8134, THS8134A, THS8134B datasheet named
|
|
|
|
* "SLVS205D", dated May 1990, revised March 2000.
|
|
|
|
*/
|
2020-02-26 19:24:30 +08:00
|
|
|
static const struct drm_bridge_timings ti_ths8134_bridge_timings = {
|
2018-01-12 15:48:53 +08:00
|
|
|
/* From timing diagram, datasheet page 9 */
|
2018-09-05 13:21:08 +08:00
|
|
|
.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
|
2018-01-12 15:48:53 +08:00
|
|
|
/* From datasheet, page 12 */
|
|
|
|
.setup_time_ps = 3000,
|
|
|
|
/* I guess this means latched input */
|
|
|
|
.hold_time_ps = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Information taken from the THS8135 datasheet named "SLAS343B", dated
|
|
|
|
* May 2001, revised April 2013.
|
|
|
|
*/
|
2020-02-26 19:24:30 +08:00
|
|
|
static const struct drm_bridge_timings ti_ths8135_bridge_timings = {
|
2018-01-12 15:48:53 +08:00
|
|
|
/* From timing diagram, datasheet page 14 */
|
2018-09-05 13:21:08 +08:00
|
|
|
.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
|
2018-01-12 15:48:53 +08:00
|
|
|
/* From datasheet, page 16 */
|
|
|
|
.setup_time_ps = 2000,
|
|
|
|
.hold_time_ps = 500,
|
|
|
|
};
|
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static const struct of_device_id simple_bridge_match[] = {
|
2018-01-12 15:48:53 +08:00
|
|
|
{
|
|
|
|
.compatible = "dumb-vga-dac",
|
2020-02-26 19:24:32 +08:00
|
|
|
.data = &(const struct simple_bridge_info) {
|
|
|
|
.connector_type = DRM_MODE_CONNECTOR_VGA,
|
|
|
|
},
|
|
|
|
}, {
|
2018-01-12 15:48:53 +08:00
|
|
|
.compatible = "adi,adv7123",
|
2020-02-26 19:24:32 +08:00
|
|
|
.data = &(const struct simple_bridge_info) {
|
|
|
|
.timings = &default_bridge_timings,
|
|
|
|
.connector_type = DRM_MODE_CONNECTOR_VGA,
|
|
|
|
},
|
2020-02-26 19:24:34 +08:00
|
|
|
}, {
|
|
|
|
.compatible = "ti,opa362",
|
|
|
|
.data = &(const struct simple_bridge_info) {
|
|
|
|
.connector_type = DRM_MODE_CONNECTOR_Composite,
|
|
|
|
},
|
2020-02-26 19:24:32 +08:00
|
|
|
}, {
|
2018-01-12 15:48:53 +08:00
|
|
|
.compatible = "ti,ths8135",
|
2020-02-26 19:24:32 +08:00
|
|
|
.data = &(const struct simple_bridge_info) {
|
|
|
|
.timings = &ti_ths8135_bridge_timings,
|
|
|
|
.connector_type = DRM_MODE_CONNECTOR_VGA,
|
|
|
|
},
|
|
|
|
}, {
|
2018-01-12 15:48:53 +08:00
|
|
|
.compatible = "ti,ths8134",
|
2020-02-26 19:24:32 +08:00
|
|
|
.data = &(const struct simple_bridge_info) {
|
|
|
|
.timings = &ti_ths8134_bridge_timings,
|
|
|
|
.connector_type = DRM_MODE_CONNECTOR_VGA,
|
|
|
|
},
|
2018-01-12 15:48:53 +08:00
|
|
|
},
|
2016-09-30 22:37:06 +08:00
|
|
|
{},
|
|
|
|
};
|
2020-02-26 19:24:30 +08:00
|
|
|
MODULE_DEVICE_TABLE(of, simple_bridge_match);
|
2016-09-30 22:37:06 +08:00
|
|
|
|
2020-02-26 19:24:30 +08:00
|
|
|
static struct platform_driver simple_bridge_driver = {
|
|
|
|
.probe = simple_bridge_probe,
|
|
|
|
.remove = simple_bridge_remove,
|
2016-09-30 22:37:06 +08:00
|
|
|
.driver = {
|
2020-02-26 19:24:31 +08:00
|
|
|
.name = "simple-bridge",
|
2020-02-26 19:24:30 +08:00
|
|
|
.of_match_table = simple_bridge_match,
|
2016-09-30 22:37:06 +08:00
|
|
|
},
|
|
|
|
};
|
2020-02-26 19:24:30 +08:00
|
|
|
module_platform_driver(simple_bridge_driver);
|
2016-09-30 22:37:06 +08:00
|
|
|
|
|
|
|
MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>");
|
2020-02-26 19:24:30 +08:00
|
|
|
MODULE_DESCRIPTION("Simple DRM bridge driver");
|
2016-09-30 22:37:06 +08:00
|
|
|
MODULE_LICENSE("GPL");
|