Commit e5cc2bf4 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (12824): tuner-xc2028: adds an option to send i2c data on slower speed

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6eb5c8a6
...@@ -100,6 +100,7 @@ struct xc2028_data { ...@@ -100,6 +100,7 @@ struct xc2028_data {
if (size != _rc) \ if (size != _rc) \
tuner_info("i2c output error: rc = %d (should be %d)\n",\ tuner_info("i2c output error: rc = %d (should be %d)\n",\
_rc, (int)size); \ _rc, (int)size); \
msleep(priv->ctrl.msleep); \
_rc; \ _rc; \
}) })
...@@ -119,6 +120,7 @@ struct xc2028_data { ...@@ -119,6 +120,7 @@ struct xc2028_data {
if (isize != _rc) \ if (isize != _rc) \
tuner_err("i2c input error: rc = %d (should be %d)\n", \ tuner_err("i2c input error: rc = %d (should be %d)\n", \
_rc, (int)isize); \ _rc, (int)isize); \
msleep(priv->ctrl.msleep); \
_rc; \ _rc; \
}) })
...@@ -130,7 +132,7 @@ struct xc2028_data { ...@@ -130,7 +132,7 @@ struct xc2028_data {
_val, sizeof(_val)))) { \ _val, sizeof(_val)))) { \
tuner_err("Error on line %d: %d\n", __LINE__, _rc); \ tuner_err("Error on line %d: %d\n", __LINE__, _rc); \
} else \ } else \
msleep(10); \ msleep(priv->ctrl.msleep); \
_rc; \ _rc; \
}) })
...@@ -996,6 +998,7 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, ...@@ -996,6 +998,7 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */,
The reset CLK is needed only with tm6000. The reset CLK is needed only with tm6000.
Driver should work fine even if this fails. Driver should work fine even if this fails.
*/ */
msleep(priv->ctrl.msleep);
do_tuner_callback(fe, XC2028_RESET_CLK, 1); do_tuner_callback(fe, XC2028_RESET_CLK, 1);
msleep(10); msleep(10);
......
...@@ -33,6 +33,7 @@ enum firmware_type { ...@@ -33,6 +33,7 @@ enum firmware_type {
struct xc2028_ctrl { struct xc2028_ctrl {
char *fname; char *fname;
int max_len; int max_len;
int msleep;
unsigned int scode_table; unsigned int scode_table;
unsigned int mts :1; unsigned int mts :1;
unsigned int input1:1; unsigned int input1:1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment