]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/rockchip: dw_hdmi_qp: Fixup usage of enable_gpio member in main struct
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Mon, 27 Oct 2025 22:26:41 +0000 (00:26 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Fri, 14 Nov 2025 21:52:50 +0000 (22:52 +0100)
The name of the enable_gpio member in struct rockchip_hdmi_qp is too
generic, as initially "borrowed" from downstream BSP code. Moreover,
this hasn't been really in use so far, since there is neither a DT
providing an "enable-gpios" property to any of the "hdmi" nodes, nor a
binding documenting it.

The actual purpose of this GPIO line is to control the voltage bias for
the HDMI TX data lines when switching between TMDS and FRL operating
modes.

A previous patch introduced the "frl-enable-gpios" property of the
RK3588 HDMI TX Controller binding, hence pass the updated string to
devm_gpiod_get_optional(), rename the struct member accordingly and set
it to a low level.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20251027222641.25066-3-laurent.pinchart@ideasonboard.com
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c

index 931343b072adc05877db9ae867e31a3cd1134e6c..36363136a695c432efe5338ef1c478d6d20352ee 100644 (file)
@@ -92,7 +92,7 @@ struct rockchip_hdmi_qp {
        struct rockchip_encoder encoder;
        struct dw_hdmi_qp *hdmi;
        struct phy *phy;
-       struct gpio_desc *enable_gpio;
+       struct gpio_desc *frl_enable_gpio;
        struct delayed_work hpd_work;
        int port_id;
        const struct rockchip_hdmi_qp_ctrl_ops *ctrl_ops;
@@ -118,7 +118,7 @@ static void dw_hdmi_qp_rockchip_encoder_enable(struct drm_encoder *encoder)
        unsigned long long rate;
 
        /* Unconditionally switch to TMDS as FRL is not yet supported */
-       gpiod_set_value(hdmi->enable_gpio, 1);
+       gpiod_set_value(hdmi->frl_enable_gpio, 0);
 
        if (crtc && crtc->state) {
                rate = drm_hdmi_compute_mode_clock(&crtc->state->adjusted_mode,
@@ -515,11 +515,11 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
        plat_data.ref_clk_rate = clk_get_rate(ref_clk);
        clk_put(ref_clk);
 
-       hdmi->enable_gpio = devm_gpiod_get_optional(hdmi->dev, "enable",
-                                                   GPIOD_OUT_HIGH);
-       if (IS_ERR(hdmi->enable_gpio))
-               return dev_err_probe(hdmi->dev, PTR_ERR(hdmi->enable_gpio),
-                                    "Failed to request enable GPIO\n");
+       hdmi->frl_enable_gpio = devm_gpiod_get_optional(hdmi->dev, "frl-enable",
+                                                       GPIOD_OUT_LOW);
+       if (IS_ERR(hdmi->frl_enable_gpio))
+               return dev_err_probe(hdmi->dev, PTR_ERR(hdmi->frl_enable_gpio),
+                                    "Failed to request FRL enable GPIO\n");
 
        hdmi->phy = devm_of_phy_get_by_index(dev, dev->of_node, 0);
        if (IS_ERR(hdmi->phy))