Lines Matching defs:i2c
222 struct xgbe_i2c_op_state *state = &pdata->i2c.op_state;
226 tx_slots = pdata->i2c.tx_fifo_size - XI2C_IOREAD(pdata, IC_TXFLR);
256 struct xgbe_i2c_op_state *state = &pdata->i2c.op_state;
278 struct xgbe_i2c_op_state *state = &pdata->i2c.op_state;
293 struct xgbe_i2c_op_state *state = &pdata->i2c.op_state;
353 struct xgbe_i2c *i2c = &pdata->i2c;
357 i2c->max_speed_mode = XI2C_GET_BITS(reg, IC_COMP_PARAM_1,
359 i2c->rx_fifo_size = XI2C_GET_BITS(reg, IC_COMP_PARAM_1,
361 i2c->tx_fifo_size = XI2C_GET_BITS(reg, IC_COMP_PARAM_1,
365 "MAX_SPEED_MODE", i2c->max_speed_mode,
366 "RX_BUFFER_DEPTH", i2c->rx_fifo_size,
367 "TX_BUFFER_DEPTH", i2c->tx_fifo_size);
385 struct xgbe_i2c_op_state *state = &pdata->i2c.op_state;
391 axgbe_printf(3, "i2c xfer started ---->>>\n");
395 axgbe_error("failed to disable i2c master\n");
411 axgbe_error("failed to enable i2c master\n");
439 axgbe_printf(3, "%s: i2c xfer ret %d abrt_source 0x%x\n", __func__,
442 axgbe_printf(1, "%s: i2c xfer ret %d abrt_source 0x%x\n", __func__,
450 axgbe_printf(3, "i2c xfer finished ---->>>\n");
465 if (!pdata->i2c.started)
470 pdata->i2c.started = 0;
480 if (pdata->i2c.started)
483 pdata->i2c.started = 1;
493 /* initialize lock for i2c */
494 mtx_init(&pdata->i2c_mutex, "xgbe i2c mutex lock", NULL, MTX_DEF);
501 axgbe_error("failed to disable i2c master\n");