xc2028: disable device power-down because power state handling is broken
PATCH 1/1 xc2028: disable device power-down because power state handling is broken
xc2028 power state handling is broken.
I2C read/write operations fail when the device is powered down at that moment, which causes the get_rf_strength and get_rf_strength callbacks (and probably others, too) to fail.
I don't know how to fix this properly, so disable the device power-down until anyone comes up with a better solution.
--- drivers/media/tuners/tuner-xc2028.c | 4 +++-
1 Datei geändert, 3 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
drivers/media/tuners/tuner-xc2028.c +3 -1
@@ -1291,16 +1291,18 @@ static int xc2028_sleep(struct dvb_frontend *fe)dump_stack (); } +/* FIXME: device power-up/-down handling is broken */ +/* mutex_lock(&priv->lock); if (priv->firm_version < 0x0202) rc = send_seq(priv, {0x00, XREG_POWER_DOWN, 0x00, 0x00}); else rc = send_seq(priv, {0x80, XREG_POWER_DOWN, 0x00, 0x00}); -priv->state = XC2028_SLEEP; mutex_unlock(&priv->lock); +*/ return rc; }
Signature · 1 line
1.7.10.4
Em Mon, 30 Dec 2013 14:37:58 +0100
Frank Schäfer <[email protected]> escreveu:
Quoted 23 lines
xc2028 power state handling is broken.
I2C read/write operations fail when the device is powered down at that moment, which causes theget_rf_strengthandget_rf_strengthcallbacks (and probably others, too) to fail.
I don't know how to fix this properly, so disable the device power-down until anyone comes up with a better solution.Signed-off-by Frank Schäfer <[email protected]>--- drivers/media/tuners/tuner-xc2028.c | 4 +++-1 Datei geändert, 3 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
drivers/media/tuners/tuner-xc2028.c +2
-0@@ -1291,16 +1291,18 @@ static int xc2028_sleep(struct dvb_frontend *fe)dump_stack (); } +/* FIXME: device power-up/-down handling is broken */ +/* mutex_lock(&priv->lock);
drivers/media/tuners/tuner-xc2028.c static int xc2028_sleep(struct dvb_frontend *fe) · line 1305
Quoted 10 lines
drivers/media/tuners/tuner-xc2028.c +1
-1if (priv->firm_version < 0x0202) rc = send_seq(priv, {0x00, XREG_POWER_DOWN, 0x00, 0x00}); else rc = send_seq(priv, {0x80, XREG_POWER_DOWN, 0x00, 0x00}); -priv->state = XC2028_SLEEP; mutex_unlock(&priv->lock); +*/
This patch is completely broken.
First of all, there are both modprobe and config parameters that disables the poweroff mode.
Second, it doesn't fix the bug, just hides it.
Third, it keeps the xc3028 energized, with spends power and heats the device, with reduces its lifetime.
I'm working on a proper fix for it.
Cheers,
Mauro
Am 06.01.2014 14:00, schrieb Mauro Carvalho Chehab:
Quoted 3 lines
...
I'm working on a proper fix for it.
That was the actual goal of this patch. ;)
Thank you for looking at this issue.
I'll get back to the remaing stuff later.
Cheers,
Frank