Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330792
b: refs/heads/master
c: 991452a
h: refs/heads/master
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 13, 2012
1 parent cef9590 commit 2a416ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c01a35955fc6cbf4b36fd87c4af5691a81fcda5a
refs/heads/master: 991452a21b76e5e1bba2fcf9c024ab69067f5656
44 changes: 5 additions & 39 deletions trunk/drivers/media/dvb/dvb-usb-v2/rtl28xxu.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,43 +823,7 @@ static int rtl28xxu_init(struct dvb_usb_device *d)
return ret;
}

static int rtl2831u_streaming_ctrl(struct dvb_frontend *fe , int onoff)
{
int ret;
u8 buf[2], gpio;
struct dvb_usb_device *d = fe_to_d(fe);

dev_dbg(&d->udev->dev, "%s: onoff=%d\n", __func__, onoff);

ret = rtl28xx_rd_reg(d, SYS_GPIO_OUT_VAL, &gpio);
if (ret)
goto err;

if (onoff) {
buf[0] = 0x00;
buf[1] = 0x00;
gpio |= 0x04; /* LED on */
} else {
buf[0] = 0x10; /* stall EPA */
buf[1] = 0x02; /* reset EPA */
gpio &= (~0x04); /* LED off */
}

ret = rtl28xx_wr_reg(d, SYS_GPIO_OUT_VAL, gpio);
if (ret)
goto err;

ret = rtl28xx_wr_regs(d, USB_EPA_CTL, buf, 2);
if (ret)
goto err;

return ret;
err:
dev_dbg(&d->udev->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}

static int rtl2832u_streaming_ctrl(struct dvb_frontend *fe , int onoff)
static int rtl28xxu_streaming_ctrl(struct dvb_frontend *fe , int onoff)
{
int ret;
u8 buf[2];
Expand Down Expand Up @@ -908,11 +872,13 @@ static int rtl2831u_power_ctrl(struct dvb_usb_device *d, int onoff)
if (onoff) {
gpio |= 0x01; /* GPIO0 = 1 */
gpio &= (~0x10); /* GPIO4 = 0 */
gpio |= 0x04; /* GPIO2 = 1, LED on */
sys0 = sys0 & 0x0f;
sys0 |= 0xe0;
} else {
gpio &= (~0x01); /* GPIO0 = 0 */
gpio |= 0x10; /* GPIO4 = 1 */
gpio &= (~0x04); /* GPIO2 = 1, LED off */
sys0 = sys0 & (~0xc0);
}

Expand Down Expand Up @@ -1224,7 +1190,7 @@ static const struct dvb_usb_device_properties rtl2831u_props = {
.tuner_attach = rtl2831u_tuner_attach,
.init = rtl28xxu_init,
.get_rc_config = rtl2831u_get_rc_config,
.streaming_ctrl = rtl2831u_streaming_ctrl,
.streaming_ctrl = rtl28xxu_streaming_ctrl,

.num_adapters = 1,
.adapter = {
Expand All @@ -1246,7 +1212,7 @@ static const struct dvb_usb_device_properties rtl2832u_props = {
.tuner_attach = rtl2832u_tuner_attach,
.init = rtl28xxu_init,
.get_rc_config = rtl2832u_get_rc_config,
.streaming_ctrl = rtl2832u_streaming_ctrl,
.streaming_ctrl = rtl28xxu_streaming_ctrl,

.num_adapters = 1,
.adapter = {
Expand Down

0 comments on commit 2a416ce

Please sign in to comment.