Lines Matching refs:i2c

116 	struct radeon_i2c_bus_rec i2c;
118 memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec));
120 i2c.mask_clk_reg = le16_to_cpu(gpio->usClkMaskRegisterIndex) * 4;
121 i2c.mask_data_reg = le16_to_cpu(gpio->usDataMaskRegisterIndex) * 4;
122 i2c.en_clk_reg = le16_to_cpu(gpio->usClkEnRegisterIndex) * 4;
123 i2c.en_data_reg = le16_to_cpu(gpio->usDataEnRegisterIndex) * 4;
124 i2c.y_clk_reg = le16_to_cpu(gpio->usClkY_RegisterIndex) * 4;
125 i2c.y_data_reg = le16_to_cpu(gpio->usDataY_RegisterIndex) * 4;
126 i2c.a_clk_reg = le16_to_cpu(gpio->usClkA_RegisterIndex) * 4;
127 i2c.a_data_reg = le16_to_cpu(gpio->usDataA_RegisterIndex) * 4;
128 i2c.mask_clk_mask = (1 << gpio->ucClkMaskShift);
129 i2c.mask_data_mask = (1 << gpio->ucDataMaskShift);
130 i2c.en_clk_mask = (1 << gpio->ucClkEnShift);
131 i2c.en_data_mask = (1 << gpio->ucDataEnShift);
132 i2c.y_clk_mask = (1 << gpio->ucClkY_Shift);
133 i2c.y_data_mask = (1 << gpio->ucDataY_Shift);
134 i2c.a_clk_mask = (1 << gpio->ucClkA_Shift);
135 i2c.a_data_mask = (1 << gpio->ucDataA_Shift);
138 i2c.hw_capable = true;
140 i2c.hw_capable = false;
143 i2c.mm_i2c = true;
145 i2c.mm_i2c = false;
147 i2c.i2c_id = gpio->sucI2cId.ucAccess;
149 if (i2c.mask_clk_reg)
150 i2c.valid = true;
152 i2c.valid = false;
154 return i2c;
162 struct radeon_i2c_bus_rec i2c;
168 memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec));
169 i2c.valid = false;
183 i2c = radeon_get_bus_rec_for_i2c_gpio(gpio);
189 return i2c;
196 struct radeon_i2c_bus_rec i2c;
214 i2c = radeon_get_bus_rec_for_i2c_gpio(gpio);
216 if (i2c.valid) {
217 sprintf(stmp, "0x%x", i2c.i2c_id);
218 rdev->i2c_bus[i] = radeon_i2c_create(rdev->ddev, &i2c, stmp);
2021 /* add the i2c bus for thermal/fan chip */
2194 /* add the i2c bus for thermal/fan chip */