Lines Matching defs:i2c
86 struct radeon_i2c_bus_rec i2c;
88 memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec));
90 i2c.mask_clk_reg = le16_to_cpu(gpio->usClkMaskRegisterIndex) * 4;
91 i2c.mask_data_reg = le16_to_cpu(gpio->usDataMaskRegisterIndex) * 4;
92 i2c.en_clk_reg = le16_to_cpu(gpio->usClkEnRegisterIndex) * 4;
93 i2c.en_data_reg = le16_to_cpu(gpio->usDataEnRegisterIndex) * 4;
94 i2c.y_clk_reg = le16_to_cpu(gpio->usClkY_RegisterIndex) * 4;
95 i2c.y_data_reg = le16_to_cpu(gpio->usDataY_RegisterIndex) * 4;
96 i2c.a_clk_reg = le16_to_cpu(gpio->usClkA_RegisterIndex) * 4;
97 i2c.a_data_reg = le16_to_cpu(gpio->usDataA_RegisterIndex) * 4;
98 i2c.mask_clk_mask = (1 << gpio->ucClkMaskShift);
99 i2c.mask_data_mask = (1 << gpio->ucDataMaskShift);
100 i2c.en_clk_mask = (1 << gpio->ucClkEnShift);
101 i2c.en_data_mask = (1 << gpio->ucDataEnShift);
102 i2c.y_clk_mask = (1 << gpio->ucClkY_Shift);
103 i2c.y_data_mask = (1 << gpio->ucDataY_Shift);
104 i2c.a_clk_mask = (1 << gpio->ucClkA_Shift);
105 i2c.a_data_mask = (1 << gpio->ucDataA_Shift);
108 i2c.hw_capable = true;
110 i2c.hw_capable = false;
113 i2c.mm_i2c = true;
115 i2c.mm_i2c = false;
117 i2c.i2c_id = gpio->sucI2cId.ucAccess;
119 if (i2c.mask_clk_reg)
120 i2c.valid = true;
122 i2c.valid = false;
124 return i2c;
132 struct radeon_i2c_bus_rec i2c;
138 memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec));
139 i2c.valid = false;
153 i2c = radeon_get_bus_rec_for_i2c_gpio(gpio);
161 return i2c;
168 struct radeon_i2c_bus_rec i2c;
185 i2c = radeon_get_bus_rec_for_i2c_gpio(gpio);
187 if (i2c.valid) {
188 snprintf(stmp, sizeof(stmp), "0x%x", i2c.i2c_id);
189 rdev->i2c_bus[i] = radeon_i2c_create(rdev_to_drm(rdev), &i2c, stmp);
2106 /* add the i2c bus for thermal/fan chip */
2290 /* add the i2c bus for thermal/fan chip */