diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2017-06-07 11:46:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-06-20 06:56:31 -0300 |
commit | d0703944c19c423fa4fa047795147e786553ff1c (patch) | |
tree | 507b5b5eeb76b6a78045a7f61c1a6a0f1fc5245b /drivers/media/platform/s5p-cec | |
parent | e8537b35bf48979803958c489876952d100afa0a (diff) | |
download | op-kernel-dev-d0703944c19c423fa4fa047795147e786553ff1c.zip op-kernel-dev-d0703944c19c423fa4fa047795147e786553ff1c.tar.gz |
[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>
Diffstat (limited to 'drivers/media/platform/s5p-cec')
-rw-r--r-- | drivers/media/platform/s5p-cec/s5p_cec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-cec/s5p_cec.c b/drivers/media/platform/s5p-cec/s5p_cec.c index 65a223e..8e06071 100644 --- a/drivers/media/platform/s5p-cec/s5p_cec.c +++ b/drivers/media/platform/s5p-cec/s5p_cec.c @@ -173,6 +173,7 @@ static int s5p_cec_probe(struct platform_device *pdev) struct platform_device *hdmi_dev; struct resource *res; struct s5p_cec_dev *cec; + bool needs_hpd = of_property_read_bool(pdev->dev.of_node, "needs-hpd"); int ret; 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_NAME, 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); if (ret) return ret; |