Lines Matching refs:chan
19 struct radeon_i2c_chan *chan = data; in radeon_gpio_setscl() local
20 struct radeonfb_info *rinfo = chan->rinfo; in radeon_gpio_setscl()
23 val = INREG(chan->ddc_reg) & ~(VGA_DDC_CLK_OUT_EN); in radeon_gpio_setscl()
27 OUTREG(chan->ddc_reg, val); in radeon_gpio_setscl()
28 (void)INREG(chan->ddc_reg); in radeon_gpio_setscl()
33 struct radeon_i2c_chan *chan = data; in radeon_gpio_setsda() local
34 struct radeonfb_info *rinfo = chan->rinfo; in radeon_gpio_setsda()
37 val = INREG(chan->ddc_reg) & ~(VGA_DDC_DATA_OUT_EN); in radeon_gpio_setsda()
41 OUTREG(chan->ddc_reg, val); in radeon_gpio_setsda()
42 (void)INREG(chan->ddc_reg); in radeon_gpio_setsda()
47 struct radeon_i2c_chan *chan = data; in radeon_gpio_getscl() local
48 struct radeonfb_info *rinfo = chan->rinfo; in radeon_gpio_getscl()
51 val = INREG(chan->ddc_reg); in radeon_gpio_getscl()
58 struct radeon_i2c_chan *chan = data; in radeon_gpio_getsda() local
59 struct radeonfb_info *rinfo = chan->rinfo; in radeon_gpio_getsda()
62 val = INREG(chan->ddc_reg); in radeon_gpio_getsda()
67 static int radeon_setup_i2c_bus(struct radeon_i2c_chan *chan, const char *name) in radeon_setup_i2c_bus() argument
71 snprintf(chan->adapter.name, sizeof(chan->adapter.name), in radeon_setup_i2c_bus()
73 chan->adapter.owner = THIS_MODULE; in radeon_setup_i2c_bus()
74 chan->adapter.algo_data = &chan->algo; in radeon_setup_i2c_bus()
75 chan->adapter.dev.parent = &chan->rinfo->pdev->dev; in radeon_setup_i2c_bus()
76 chan->algo.setsda = radeon_gpio_setsda; in radeon_setup_i2c_bus()
77 chan->algo.setscl = radeon_gpio_setscl; in radeon_setup_i2c_bus()
78 chan->algo.getsda = radeon_gpio_getsda; in radeon_setup_i2c_bus()
79 chan->algo.getscl = radeon_gpio_getscl; in radeon_setup_i2c_bus()
80 chan->algo.udelay = 10; in radeon_setup_i2c_bus()
81 chan->algo.timeout = 20; in radeon_setup_i2c_bus()
82 chan->algo.data = chan; in radeon_setup_i2c_bus()
84 i2c_set_adapdata(&chan->adapter, chan); in radeon_setup_i2c_bus()
87 radeon_gpio_setsda(chan, 1); in radeon_setup_i2c_bus()
88 radeon_gpio_setscl(chan, 1); in radeon_setup_i2c_bus()
91 rc = i2c_bit_add_bus(&chan->adapter); in radeon_setup_i2c_bus()
93 dev_dbg(&chan->rinfo->pdev->dev, "I2C bus %s registered.\n", name); in radeon_setup_i2c_bus()
95 dev_warn(&chan->rinfo->pdev->dev, "Failed to register I2C bus %s.\n", name); in radeon_setup_i2c_bus()