[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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
e8537b35bf
commit
d0703944c1
@@ -173,6 +173,7 @@ static int s5p_cec_probe(struct platform_device *pdev)
|
|||||||
struct platform_device *hdmi_dev;
|
struct platform_device *hdmi_dev;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
struct s5p_cec_dev *cec;
|
struct s5p_cec_dev *cec;
|
||||||
|
bool needs_hpd = of_property_read_bool(pdev->dev.of_node, "needs-hpd");
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
np = of_parse_phandle(pdev->dev.of_node, "hdmi-phandle", 0);
|
np = of_parse_phandle(pdev->dev.of_node, "hdmi-phandle", 0);
|
||||||
@@ -221,7 +222,8 @@ static int s5p_cec_probe(struct platform_device *pdev)
|
|||||||
cec->adap = cec_allocate_adapter(&s5p_cec_adap_ops, cec,
|
cec->adap = cec_allocate_adapter(&s5p_cec_adap_ops, cec,
|
||||||
CEC_NAME,
|
CEC_NAME,
|
||||||
CEC_CAP_LOG_ADDRS | CEC_CAP_TRANSMIT |
|
CEC_CAP_LOG_ADDRS | CEC_CAP_TRANSMIT |
|
||||||
CEC_CAP_PASSTHROUGH | CEC_CAP_RC, 1);
|
CEC_CAP_PASSTHROUGH | CEC_CAP_RC |
|
||||||
|
(needs_hpd ? CEC_CAP_NEEDS_HPD : 0), 1);
|
||||||
ret = PTR_ERR_OR_ZERO(cec->adap);
|
ret = PTR_ERR_OR_ZERO(cec->adap);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user