aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/i810/i810-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/i810/i810-i2c.c')
-rw-r--r--drivers/video/i810/i810-i2c.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/i810/i810-i2c.c b/drivers/video/i810/i810-i2c.c
index cd2c728a809b..7db17d0d8a8c 100644
--- a/drivers/video/i810/i810-i2c.c
+++ b/drivers/video/i810/i810-i2c.c
@@ -45,8 +45,10 @@ static void i810i2c_setscl(void *data, int state)
45 struct i810fb_par *par = chan->par; 45 struct i810fb_par *par = chan->par;
46 u8 __iomem *mmio = par->mmio_start_virtual; 46 u8 __iomem *mmio = par->mmio_start_virtual;
47 47
48 i810_writel(mmio, chan->ddc_base, (state ? SCL_VAL_OUT : 0) | SCL_DIR | 48 if (state)
49 SCL_DIR_MASK | SCL_VAL_MASK); 49 i810_writel(mmio, chan->ddc_base, SCL_DIR_MASK | SCL_VAL_MASK);
50 else
51 i810_writel(mmio, chan->ddc_base, SCL_DIR | SCL_DIR_MASK | SCL_VAL_MASK);
50 i810_readl(mmio, chan->ddc_base); /* flush posted write */ 52 i810_readl(mmio, chan->ddc_base); /* flush posted write */
51} 53}
52 54
@@ -56,8 +58,10 @@ static void i810i2c_setsda(void *data, int state)
56 struct i810fb_par *par = chan->par; 58 struct i810fb_par *par = chan->par;
57 u8 __iomem *mmio = par->mmio_start_virtual; 59 u8 __iomem *mmio = par->mmio_start_virtual;
58 60
59 i810_writel(mmio, chan->ddc_base, (state ? SDA_VAL_OUT : 0) | SDA_DIR | 61 if (state)
60 SDA_DIR_MASK | SDA_VAL_MASK); 62 i810_writel(mmio, chan->ddc_base, SDA_DIR_MASK | SDA_VAL_MASK);
63 else
64 i810_writel(mmio, chan->ddc_base, SDA_DIR | SDA_DIR_MASK | SDA_VAL_MASK);
61 i810_readl(mmio, chan->ddc_base); /* flush posted write */ 65 i810_readl(mmio, chan->ddc_base); /* flush posted write */
62} 66}
63 67