]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
V4L/DVB (13709): [Mantis/VP-1034] Switch 13/18v for the VP-1034 properly
authorManu Abraham <abraham.manu@gmail.com>
Thu, 3 Dec 2009 08:37:51 +0000 (05:37 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 17 Jan 2010 13:55:29 +0000 (11:55 -0200)
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/mantis/mantis_i2c.c
drivers/media/dvb/mantis/mantis_vp1034.c

index 8b90a2af68718d8246a07d7c397b6754e7b82521..53c5f88227be56a5cbfffb86af93a3175898a4f0 100644 (file)
@@ -39,7 +39,7 @@ static int mantis_ack_wait(struct mantis_pci *mantis)
                                             mantis->mantis_int_stat & MANTIS_INT_I2CDONE,
                                             msecs_to_jiffies(50)) == -ERESTARTSYS) {
 
-               dprintk(verbose, MANTIS_DEBUG, 1, "I2C Transfer failed, Master !I2CDONE");
+               dprintk(verbose, MANTIS_DEBUG, 1, "Master !I2CDONE");
                rc = -EREMOTEIO;
        }
        while (!(mantis->mantis_int_stat & MANTIS_INT_I2CRACK)) {
@@ -62,7 +62,9 @@ static int mantis_i2c_read(struct mantis_pci *mantis, const struct i2c_msg *msg)
 {
        u32 rxd, i;
 
-       dprintk(verbose, MANTIS_INFO, 0, "        %s:  Address=[0x%02x] <R>[ ", __func__, msg->addr);
+       dprintk(verbose, MANTIS_INFO, 0, "        %s:  Address=[0x%02x] <R>[ ",
+               __func__, msg->addr);
+
        for (i = 0; i < msg->len; i++) {
                rxd = (msg->addr << 25) | (1 << 24)
                                        | MANTIS_I2C_RATE_3
@@ -92,7 +94,9 @@ static int mantis_i2c_write(struct mantis_pci *mantis, const struct i2c_msg *msg
        int i;
        u32 txd = 0;
 
-       dprintk(verbose, MANTIS_INFO, 0, "        %s: Address=[0x%02x] <W>[ ", __func__, msg->addr);
+       dprintk(verbose, MANTIS_INFO, 0, "        %s: Address=[0x%02x] <W>[ ",
+               __func__, msg->addr);
+
        for (i = 0; i < msg->len; i++) {
                dprintk(verbose, MANTIS_INFO, 0, "%02x ", msg->buf[i]);
                txd = (msg->addr << 25) | (msg->buf[i] << 8)
index c9c947911627ff170f5fea5c50e34a4725a48d58..f6766d0793d7e786802d7e35c92a223f19f7e901 100644 (file)
@@ -40,12 +40,14 @@ int vp1034_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
 
        switch (voltage) {
        case SEC_VOLTAGE_13:
-               mmwrite((mmread(MANTIS_GPIF_ADDR)) | voltage, MANTIS_GPIF_ADDR);
                dprintk(verbose, MANTIS_ERROR, 1, "Polarization=[13V]");
+               gpio_set_bits(mantis, 13, 1);
+               gpio_set_bits(mantis, 14, 0);
                break;
        case SEC_VOLTAGE_18:
-               mmwrite((mmread(MANTIS_GPIF_ADDR)) & voltage, MANTIS_GPIF_ADDR);
                dprintk(verbose, MANTIS_ERROR, 1, "Polarization=[18V]");
+               gpio_set_bits(mantis, 13, 1);
+               gpio_set_bits(mantis, 14, 1);
                break;
        case SEC_VOLTAGE_OFF:
                dprintk(verbose, MANTIS_ERROR, 1, "Frontend (dummy) POWERDOWN");