diff mbox series

[2/3] drm/bridge: dw_hdmi: Handle snps,disable-cec property

Message ID 20230415104613.61224-3-jernej.skrabec@gmail.com
State New
Headers show
Series drm/bridge: dw_hdmi: allow to disable CEC from DT | expand

Commit Message

Jernej Škrabec April 15, 2023, 10:46 a.m. UTC
New DT property allows to skip CEC initialization.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Robert Foss April 17, 2023, 1:32 p.m. UTC | #1
On Sat, Apr 15, 2023 at 12:47 PM Jernej Skrabec
<jernej.skrabec@gmail.com> wrote:
>
> New DT property allows to skip CEC initialization.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 603bb3c51027..e7e8199d2fb1 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -3615,7 +3615,9 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
>                 hdmi->audio = platform_device_register_full(&pdevinfo);
>         }
>
> -       if (!plat_data->disable_cec && (config0 & HDMI_CONFIG0_CEC)) {
> +       if (!plat_data->disable_cec &&
> +           !of_property_read_bool(np, "snps,disable-cec") &&
> +           (config0 & HDMI_CONFIG0_CEC)) {
>                 cec.hdmi = hdmi;
>                 cec.ops = &dw_hdmi_cec_ops;
>                 cec.irq = irq;
> --
> 2.40.0
>


Reviewed-by: Robert Foss <rfoss@kernel.org>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 603bb3c51027..e7e8199d2fb1 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -3615,7 +3615,9 @@  struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
 		hdmi->audio = platform_device_register_full(&pdevinfo);
 	}
 
-	if (!plat_data->disable_cec && (config0 & HDMI_CONFIG0_CEC)) {
+	if (!plat_data->disable_cec &&
+	    !of_property_read_bool(np, "snps,disable-cec") &&
+	    (config0 & HDMI_CONFIG0_CEC)) {
 		cec.hdmi = hdmi;
 		cec.ops = &dw_hdmi_cec_ops;
 		cec.irq = irq;