Lines Matching defs:i2c

93 	struct radeon_i2c_bus_rec i2c;
95 memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec));
97 i2c.mask_clk_reg = le16_to_cpu(gpio->usClkMaskRegisterIndex) * 4;
98 i2c.mask_data_reg = le16_to_cpu(gpio->usDataMaskRegisterIndex) * 4;
99 i2c.en_clk_reg = le16_to_cpu(gpio->usClkEnRegisterIndex) * 4;
100 i2c.en_data_reg = le16_to_cpu(gpio->usDataEnRegisterIndex) * 4;
101 i2c.y_clk_reg = le16_to_cpu(gpio->usClkY_RegisterIndex) * 4;
102 i2c.y_data_reg = le16_to_cpu(gpio->usDataY_RegisterIndex) * 4;
103 i2c.a_clk_reg = le16_to_cpu(gpio->usClkA_RegisterIndex) * 4;
104 i2c.a_data_reg = le16_to_cpu(gpio->usDataA_RegisterIndex) * 4;
105 i2c.mask_clk_mask = (1 << gpio->ucClkMaskShift);
106 i2c.mask_data_mask = (1 << gpio->ucDataMaskShift);
107 i2c.en_clk_mask = (1 << gpio->ucClkEnShift);
108 i2c.en_data_mask = (1 << gpio->ucDataEnShift);
109 i2c.y_clk_mask = (1 << gpio->ucClkY_Shift);
110 i2c.y_data_mask = (1 << gpio->ucDataY_Shift);
111 i2c.a_clk_mask = (1 << gpio->ucClkA_Shift);
112 i2c.a_data_mask = (1 << gpio->ucDataA_Shift);
115 i2c.hw_capable = true;
117 i2c.hw_capable = false;
120 i2c.mm_i2c = true;
122 i2c.mm_i2c = false;
124 i2c.i2c_id = gpio->sucI2cId.ucAccess;
126 if (i2c.mask_clk_reg)
127 i2c.valid = true;
129 i2c.valid = false;
131 return i2c;
139 struct radeon_i2c_bus_rec i2c;
145 memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec));
146 i2c.valid = false;
160 i2c = radeon_get_bus_rec_for_i2c_gpio(gpio);
168 return i2c;
175 struct radeon_i2c_bus_rec i2c;
192 i2c = radeon_get_bus_rec_for_i2c_gpio(gpio);
194 if (i2c.valid) {
195 sprintf(stmp, "0x%x", i2c.i2c_id);
196 rdev->i2c_bus[i] = radeon_i2c_create(rdev->ddev, &i2c, stmp);
2100 /* add the i2c bus for thermal/fan chip */
2282 /* add the i2c bus for thermal/fan chip */