]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[media] cx231xx: Allow some boards to not use I2C port 3
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 31 Jan 2011 19:25:39 +0000 (16:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 21 Mar 2011 23:31:59 +0000 (20:31 -0300)
Some devices don't need to use it. So allow to just disable this logic.
Having it enabled on some devices cause power management to complain,
generating error -71.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx231xx/cx231xx-avcore.c
drivers/media/video/cx231xx/cx231xx.h

index b80bccfa9b2dd0edced165807e55997977934964..62843d39817cacb5f7368cf927d0566d3f81e3aa 100644 (file)
@@ -1271,6 +1271,8 @@ int cx231xx_enable_i2c_port_3(struct cx231xx *dev, bool is_port_3)
        int status = 0;
        bool current_is_port_3;
 
+       if (dev->board.dont_use_port_3)
+               is_port_3 = false;
        status = cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER,
                                       PWR_CTL_EN, value, 4);
        if (status < 0)
index b72503d625b53ad7f8402b7446116396fc2ad86f..e1c222b05204beb5b81fbd768ea2d55c35715890 100644 (file)
@@ -357,6 +357,7 @@ struct cx231xx_board {
        unsigned int valid:1;
        unsigned int no_alt_vanc:1;
        unsigned int external_av:1;
+       unsigned int dont_use_port_3:1;
 
        unsigned char xclk, i2c_speed;