summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/s5h1420.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/frontends/s5h1420.c')
-rw-r--r--linux/drivers/media/dvb/frontends/s5h1420.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/frontends/s5h1420.c b/linux/drivers/media/dvb/frontends/s5h1420.c
index 8d3b42d7d..6a8ede614 100644
--- a/linux/drivers/media/dvb/frontends/s5h1420.c
+++ b/linux/drivers/media/dvb/frontends/s5h1420.c
@@ -360,32 +360,27 @@ static int s5h1420_read_ber(struct dvb_frontend* fe, u32* ber)
{
struct s5h1420_state* state = fe->demodulator_priv;
- // FIXME
- return 0;
+ s5h1420_writereg(state, 0x46, 0x1d);
+ mdelay(25);
+ return (s5h1420_readreg(state, 0x48) << 8) | s5h1420_readreg(state, 0x47);
}
static int s5h1420_read_signal_strength(struct dvb_frontend* fe, u16* strength)
{
struct s5h1420_state* state = fe->demodulator_priv;
- // FIXME
- return 0;
-}
+ u8 val = 0xff - s5h1420_readreg(state, 0x15);
-static int s5h1420_read_snr(struct dvb_frontend* fe, u16* snr)
-{
- struct s5h1420_state* state = fe->demodulator_priv;
-
- // FIXME
- return 0;
+ return (int) ((val << 8) | val);
}
static int s5h1420_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
{
struct s5h1420_state* state = fe->demodulator_priv;
- // FIXME
- return 0;
+ s5h1420_writereg(state, 0x46, 0x1f);
+ mdelay(25);
+ return (s5h1420_readreg(state, 0x48) << 8) | s5h1420_readreg(state, 0x47);
}
static void s5h1420_reset(struct s5h1420_state* state)
@@ -740,7 +735,6 @@ static struct dvb_frontend_ops s5h1420_ops = {
.read_status = s5h1420_read_status,
.read_ber = s5h1420_read_ber,
.read_signal_strength = s5h1420_read_signal_strength,
- .read_snr = s5h1420_read_snr,
.read_ucblocks = s5h1420_read_ucblocks,
.diseqc_send_master_cmd = s5h1420_send_master_cmd,