Hello Pet,

On Mon Dec 22, 2025 at 4:10 AM CET, Pet Weng wrote:
> This adds support for the ITE IT61620 bridge chip which converts
> MIPI DSI input to HDMI output. The Driver implements the basic
> bridge functions and integrates with the DRM bridge and connector
> frameworks.
>
> Supported fetures include:
            ^ features

> MIPI DSI input handling
> HDMI output setup
> Basic mode configuration
> I2C-based control and initialization
> HDCP 1.4 handling
>
> HPD handling clarification:
> Although IT61620 has an HPD pin, hotplug detection is handled by the
> system connector. The bridge only receives HPD notifications, and the
> HPD pin is used solely for short pulses during HDCP authentication.
> Therefore, this bridge does not implement OP_HPD or OP_DETECT, as it
> does not originate or determine hotplug or connection status.
>
> This driver will be used on platforms embedding the IT61620 for
> video output via HDMI from SoCs with MIPI DSI output.
>
> Signed-off-by: Pet Weng <[email protected]>

[...]

> +static int it61620_probe(struct i2c_client *client)
> +{
> +     struct device *dev = &client->dev;
> +     struct device_node *np = dev->of_node;
> +     struct mipi_dsi_host *host;
> +     struct it61620 *it61620;
> +     int ret = 0;
> +
> +     it61620 = devm_drm_bridge_alloc(dev, struct it61620, bridge,
> +                                     &it61620_bridge_funcs);
> +     if (IS_ERR(it61620))
> +             return PTR_ERR(it61620);
> +
> +     it61620->dev = dev;
> +     it61620->chip_info = of_device_get_match_data(dev);
> +
> +     host = drm_of_get_dsi_bus(dev);
> +     if (IS_ERR(host))
> +             return dev_err_probe(dev, PTR_ERR(host),
> +                                  "failed to find dsi host\n");
> +
> +     ret = it61620_i2c_and_regmap_init(client, it61620);
> +     if (ret < 0)
> +             return ret;
> +
> +     i2c_set_clientdata(client, it61620);
> +
> +     ret = it61620_init_power(it61620);
> +     if (ret < 0)
> +             return ret;
> +
> +     it61620_config_default(it61620);
> +
> +     ret = it61620_parse_dt(it61620);
> +     if (ret < 0)
> +             return ret;
> +
> +     if (!client->irq)
> +             return dev_err_probe(dev, -ENODEV,
> +                                  "Failed to get INTP IRQ\n");
> +
> +     ret = devm_request_threaded_irq(&client->dev, client->irq, NULL,
> +                                     it61620_int_threaded_handler,
> +                                     IRQF_TRIGGER_LOW | IRQF_ONESHOT |
> +                                     IRQF_NO_AUTOEN,
> +                                     "it61620-intp", it61620);
> +     if (ret < 0)
> +             return dev_err_probe(dev, ret,
> +                                  "failed to request INTP threaded IRQ\n");
> +
> +     INIT_DELAYED_WORK(&it61620->hdcp_work, it61620_hdcp_work);
> +     init_waitqueue_head(&it61620->wq);
> +
> +     mutex_init(&it61620->ddc_lock);
> +
> +     pm_runtime_enable(dev);
> +     pm_runtime_set_autosuspend_delay(dev, 1000);
> +     pm_runtime_use_autosuspend(dev);
> +
> +     it61620->bridge.funcs = &it61620_bridge_funcs;

You don't have to set the funcs. They are already set by
devm_drm_bridge_alloc() above.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Reply via email to