diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2017-08-31 12:56:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-23 07:29:30 -0400 |
commit | e949f61461ab83b094cad564c89a8d2b078b4508 (patch) | |
tree | 9bb255c603c6ccc1f23712494b535710e0245153 /drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c | |
parent | 81b79c71e546fc15e95e804de2497a448cc51a47 (diff) | |
download | linux-e949f61461ab83b094cad564c89a8d2b078b4508.tar.bz2 |
media: s5p-cec: add NACK detection support
The s5p-cec driver returned CEC_TX_STATUS_ERROR for the NACK condition.
Some digging into the datasheet uncovered the S5P_CEC_TX_STAT1 register where
bit 0 indicates if the transmit was nacked or not.
Use this to return the correct CEC_TX_STATUS_NACK status to userspace.
This was the only driver that couldn't tell a NACK from another error, and
that was very unusual. And a potential problem for applications as well.
Tested with my Odroid-U3.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: <stable@vger.kernel.org> # for v4.12 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c')
-rw-r--r-- | drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c b/drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c index 1edf667d562a..146ae6f25cdb 100644 --- a/drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c +++ b/drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c @@ -172,7 +172,8 @@ u32 s5p_cec_get_status(struct s5p_cec_dev *cec) { u32 status = 0; - status = readb(cec->reg + S5P_CEC_STATUS_0); + status = readb(cec->reg + S5P_CEC_STATUS_0) & 0xf; + status |= (readb(cec->reg + S5P_CEC_TX_STAT1) & 0xf) << 4; status |= readb(cec->reg + S5P_CEC_STATUS_1) << 8; status |= readb(cec->reg + S5P_CEC_STATUS_2) << 16; status |= readb(cec->reg + S5P_CEC_STATUS_3) << 24; |