tea5767: properly power up the tuner during detect
Change-Id: I5ca5c3ae28db1427e2528cb1740a9199180b9b38
Reviewed-on: http://gerrit.rockbox.org/670
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
diff --git a/firmware/drivers/tuner/tea5767.c b/firmware/drivers/tuner/tea5767.c
index 6efcee2..d0041f9 100644
--- a/firmware/drivers/tuner/tea5767.c
+++ b/firmware/drivers/tuner/tea5767.c
@@ -167,6 +167,7 @@
/* init chipid register with 0xFF in case fmradio_i2c_read fails silently */
buf[3] = 0xFF;
+ tuner_power(true);
if (fmradio_i2c_read(I2C_ADR, buf, sizeof(buf)) < 0) {
/* no i2c device detected */
tuner_present = false;
@@ -175,6 +176,7 @@
chipid = buf[3] & 0x0F;
tuner_present = (chipid == 0);
}
+ tuner_power(false);
#endif
}