Lines Matching refs:spi_priv

132 	struct w5200_spi_priv *spi_priv = w5200_spi_priv(ndev);  in w5200_spi_init()  local
134 mutex_init(&spi_priv->cmd_lock); in w5200_spi_init()
187 struct w5200_spi_priv *spi_priv = w5200_spi_priv(ndev); in w5200_spi_readbulk() local
190 .tx_buf = spi_priv->cmd_buf, in w5200_spi_readbulk()
191 .len = sizeof(spi_priv->cmd_buf), in w5200_spi_readbulk()
200 mutex_lock(&spi_priv->cmd_lock); in w5200_spi_readbulk()
202 spi_priv->cmd_buf[0] = addr >> 8; in w5200_spi_readbulk()
203 spi_priv->cmd_buf[1] = addr; in w5200_spi_readbulk()
204 spi_priv->cmd_buf[2] = len >> 8; in w5200_spi_readbulk()
205 spi_priv->cmd_buf[3] = len; in w5200_spi_readbulk()
208 mutex_unlock(&spi_priv->cmd_lock); in w5200_spi_readbulk()
217 struct w5200_spi_priv *spi_priv = w5200_spi_priv(ndev); in w5200_spi_writebulk() local
220 .tx_buf = spi_priv->cmd_buf, in w5200_spi_writebulk()
221 .len = sizeof(spi_priv->cmd_buf), in w5200_spi_writebulk()
230 mutex_lock(&spi_priv->cmd_lock); in w5200_spi_writebulk()
232 spi_priv->cmd_buf[0] = addr >> 8; in w5200_spi_writebulk()
233 spi_priv->cmd_buf[1] = addr; in w5200_spi_writebulk()
234 spi_priv->cmd_buf[2] = W5200_SPI_WRITE_OPCODE | (len >> 8); in w5200_spi_writebulk()
235 spi_priv->cmd_buf[3] = len; in w5200_spi_writebulk()
238 mutex_unlock(&spi_priv->cmd_lock); in w5200_spi_writebulk()
277 struct w5500_spi_priv *spi_priv = w5500_spi_priv(ndev); in w5500_spi_init() local
279 mutex_init(&spi_priv->cmd_lock); in w5500_spi_init()
347 struct w5500_spi_priv *spi_priv = w5500_spi_priv(ndev); in w5500_spi_readbulk() local
350 .tx_buf = spi_priv->cmd_buf, in w5500_spi_readbulk()
351 .len = sizeof(spi_priv->cmd_buf), in w5500_spi_readbulk()
360 mutex_lock(&spi_priv->cmd_lock); in w5500_spi_readbulk()
362 spi_priv->cmd_buf[0] = addr >> 8; in w5500_spi_readbulk()
363 spi_priv->cmd_buf[1] = addr; in w5500_spi_readbulk()
364 spi_priv->cmd_buf[2] = W5500_SPI_READ_CONTROL(addr); in w5500_spi_readbulk()
367 mutex_unlock(&spi_priv->cmd_lock); in w5500_spi_readbulk()
376 struct w5500_spi_priv *spi_priv = w5500_spi_priv(ndev); in w5500_spi_writebulk() local
379 .tx_buf = spi_priv->cmd_buf, in w5500_spi_writebulk()
380 .len = sizeof(spi_priv->cmd_buf), in w5500_spi_writebulk()
389 mutex_lock(&spi_priv->cmd_lock); in w5500_spi_writebulk()
391 spi_priv->cmd_buf[0] = addr >> 8; in w5500_spi_writebulk()
392 spi_priv->cmd_buf[1] = addr; in w5500_spi_writebulk()
393 spi_priv->cmd_buf[2] = W5500_SPI_WRITE_CONTROL(addr); in w5500_spi_writebulk()
396 mutex_unlock(&spi_priv->cmd_lock); in w5500_spi_writebulk()