Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] s5p_cec: set the CEC_CAP_NEEDS_HPD flag if needed

Use the needs-hpd DT property to determine if the CEC_CAP_NEEDS_HPD
should be set.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
d0703944 e8537b35

+3 -1
+3 -1
drivers/media/platform/s5p-cec/s5p_cec.c
··· 173 173 struct platform_device *hdmi_dev; 174 174 struct resource *res; 175 175 struct s5p_cec_dev *cec; 176 + bool needs_hpd = of_property_read_bool(pdev->dev.of_node, "needs-hpd"); 176 177 int ret; 177 178 178 179 np = of_parse_phandle(pdev->dev.of_node, "hdmi-phandle", 0); ··· 222 221 cec->adap = cec_allocate_adapter(&s5p_cec_adap_ops, cec, 223 222 CEC_NAME, 224 223 CEC_CAP_LOG_ADDRS | CEC_CAP_TRANSMIT | 225 - CEC_CAP_PASSTHROUGH | CEC_CAP_RC, 1); 224 + CEC_CAP_PASSTHROUGH | CEC_CAP_RC | 225 + (needs_hpd ? CEC_CAP_NEEDS_HPD : 0), 1); 226 226 ret = PTR_ERR_OR_ZERO(cec->adap); 227 227 if (ret) 228 228 return ret;