diff options
author | Hans Verkuil <hansverk@cisco.com> | 2016-02-10 05:09:10 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-16 06:38:51 -0500 |
commit | 0ba4581c84cfb39fd527f6b3457f1c97f6356c04 (patch) | |
tree | 599dd604cf10788ad46ccd08e7c23e3b31533353 | |
parent | 9727a9545adec59f4bccb83d1a709711f4acf242 (diff) |
[media] adv7604: fix tx 5v detect regression
The 5 volt detect functionality broke in 3.14: the code reads IO register 0x70
again after it has already been cleared. Instead it should use the cached
irq_reg_0x70 value and the io_write to 0x71 to clear 0x70 can be dropped since
this has already been done.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org> # for v3.14 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/i2c/adv7604.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index f8dd7505b529..e1719ffdfb3d 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c | |||
@@ -1960,10 +1960,9 @@ static int adv76xx_isr(struct v4l2_subdev *sd, u32 status, bool *handled) | |||
1960 | } | 1960 | } |
1961 | 1961 | ||
1962 | /* tx 5v detect */ | 1962 | /* tx 5v detect */ |
1963 | tx_5v = io_read(sd, 0x70) & info->cable_det_mask; | 1963 | tx_5v = irq_reg_0x70 & info->cable_det_mask; |
1964 | if (tx_5v) { | 1964 | if (tx_5v) { |
1965 | v4l2_dbg(1, debug, sd, "%s: tx_5v: 0x%x\n", __func__, tx_5v); | 1965 | v4l2_dbg(1, debug, sd, "%s: tx_5v: 0x%x\n", __func__, tx_5v); |
1966 | io_write(sd, 0x71, tx_5v); | ||
1967 | adv76xx_s_detect_tx_5v_ctrl(sd); | 1966 | adv76xx_s_detect_tx_5v_ctrl(sd); |
1968 | if (handled) | 1967 | if (handled) |
1969 | *handled = true; | 1968 | *handled = true; |