Lines Matching refs:adap
67 struct i2c_adapter adap; member
74 struct i2c_adapter *adap = &priv->adap; in xlr_i2c_tx() local
127 dev_err(&adap->dev, "I2C transmit timeout\n"); in xlr_i2c_tx()
133 struct i2c_adapter *adap = &priv->adap; in xlr_i2c_rx() local
181 dev_err(&adap->dev, "I2C receive timeout\n"); in xlr_i2c_rx()
185 static int xlr_i2c_xfer(struct i2c_adapter *adap, in xlr_i2c_xfer() argument
191 struct xlr_i2c_private *priv = i2c_get_adapdata(adap); in xlr_i2c_xfer()
206 static u32 xlr_func(struct i2c_adapter *adap) in xlr_func() argument
232 priv->adap.dev.parent = &pdev->dev; in xlr_i2c_probe()
233 priv->adap.owner = THIS_MODULE; in xlr_i2c_probe()
234 priv->adap.algo_data = priv; in xlr_i2c_probe()
235 priv->adap.algo = &xlr_i2c_algo; in xlr_i2c_probe()
236 priv->adap.nr = pdev->id; in xlr_i2c_probe()
237 priv->adap.class = I2C_CLASS_HWMON; in xlr_i2c_probe()
238 snprintf(priv->adap.name, sizeof(priv->adap.name), "xlr-i2c"); in xlr_i2c_probe()
240 i2c_set_adapdata(&priv->adap, priv); in xlr_i2c_probe()
241 ret = i2c_add_numbered_adapter(&priv->adap); in xlr_i2c_probe()
243 dev_err(&priv->adap.dev, "Failed to add i2c bus.\n"); in xlr_i2c_probe()
248 dev_info(&priv->adap.dev, "Added I2C Bus.\n"); in xlr_i2c_probe()
257 i2c_del_adapter(&priv->adap); in xlr_i2c_remove()