diff options
| author | Kory Maincent (TI.com) <kory.maincent@bootlin.com> | 2026-01-23 19:12:39 +0300 |
|---|---|---|
| committer | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-02-11 11:16:15 +0300 |
| commit | d700fd0ff100f4c301dafeb6b944c7229d0adda7 (patch) | |
| tree | d3675df2669de9a90d805af486970f065668bd7c | |
| parent | 1b47ea9fddcf89e4b65045d233bc5a2ee7775df7 (diff) | |
| download | linux-d700fd0ff100f4c301dafeb6b944c7229d0adda7.tar.xz | |
drm/bridge: tda998x: Remove component support
The tilcdc driver no longer uses the component framework to bind the
tda998x bridge driver. The component bind/unbind operations and the
encoder initialization code are now dead code and can be safely removed.
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20260123-feature_tilcdc-v5-21-5a44d2aa3f6f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
| -rw-r--r-- | drivers/gpu/drm/bridge/tda998x_drv.c | 69 |
1 files changed, 1 insertions, 68 deletions
diff --git a/drivers/gpu/drm/bridge/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c index e636459d9185..865285ba2bd8 100644 --- a/drivers/gpu/drm/bridge/tda998x_drv.c +++ b/drivers/gpu/drm/bridge/tda998x_drv.c @@ -4,7 +4,6 @@ * Author: Rob Clark <robdclark@gmail.com> */ -#include <linux/component.h> #include <linux/gpio/consumer.h> #include <linux/hdmi.h> #include <linux/i2c.h> @@ -1963,85 +1962,19 @@ err_irq: return ret; } -/* DRM encoder functions */ - -static int tda998x_encoder_init(struct device *dev, struct drm_device *drm) -{ - struct tda998x_priv *priv = dev_get_drvdata(dev); - u32 crtcs = 0; - int ret; - - if (dev->of_node) - crtcs = drm_of_find_possible_crtcs(drm, dev->of_node); - - /* If no CRTCs were found, fall back to our old behaviour */ - if (crtcs == 0) { - dev_warn(dev, "Falling back to first CRTC\n"); - crtcs = 1 << 0; - } - - priv->encoder.possible_crtcs = crtcs; - - ret = drm_simple_encoder_init(drm, &priv->encoder, - DRM_MODE_ENCODER_TMDS); - if (ret) - goto err_encoder; - - ret = drm_bridge_attach(&priv->encoder, &priv->bridge, NULL, 0); - if (ret) - goto err_bridge; - - return 0; - -err_bridge: - drm_encoder_cleanup(&priv->encoder); -err_encoder: - return ret; -} - -static int tda998x_bind(struct device *dev, struct device *master, void *data) -{ - struct drm_device *drm = data; - - return tda998x_encoder_init(dev, drm); -} - -static void tda998x_unbind(struct device *dev, struct device *master, - void *data) -{ - struct tda998x_priv *priv = dev_get_drvdata(dev); - - drm_encoder_cleanup(&priv->encoder); -} - -static const struct component_ops tda998x_ops = { - .bind = tda998x_bind, - .unbind = tda998x_unbind, -}; - static int tda998x_probe(struct i2c_client *client) { - int ret; - if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { dev_warn(&client->dev, "adapter does not support I2C\n"); return -EIO; } - ret = tda998x_create(&client->dev); - if (ret) - return ret; - - ret = component_add(&client->dev, &tda998x_ops); - if (ret) - tda998x_destroy(&client->dev); - return ret; + return tda998x_create(&client->dev); } static void tda998x_remove(struct i2c_client *client) { - component_del(&client->dev, &tda998x_ops); tda998x_destroy(&client->dev); } |
