Lines Matching refs:kss
82 struct ks8851_net_spi *kss = to_ks8851_spi(ks); in ks8851_lock_spi() local
84 mutex_lock(&kss->lock); in ks8851_lock_spi()
96 struct ks8851_net_spi *kss = to_ks8851_spi(ks); in ks8851_unlock_spi() local
98 mutex_unlock(&kss->lock); in ks8851_unlock_spi()
119 struct ks8851_net_spi *kss = to_ks8851_spi(ks); in ks8851_wrreg16_spi() local
120 struct spi_transfer *xfer = &kss->spi_xfer1; in ks8851_wrreg16_spi()
121 struct spi_message *msg = &kss->spi_msg1; in ks8851_wrreg16_spi()
132 ret = spi_sync(kss->spidev, msg); in ks8851_wrreg16_spi()
150 struct ks8851_net_spi *kss = to_ks8851_spi(ks); in ks8851_rdreg() local
159 if (kss->spidev->master->flags & SPI_MASTER_HALF_DUPLEX) { in ks8851_rdreg()
160 msg = &kss->spi_msg2; in ks8851_rdreg()
161 xfer = kss->spi_xfer2; in ks8851_rdreg()
172 msg = &kss->spi_msg1; in ks8851_rdreg()
173 xfer = &kss->spi_xfer1; in ks8851_rdreg()
180 ret = spi_sync(kss->spidev, msg); in ks8851_rdreg()
183 else if (kss->spidev->master->flags & SPI_MASTER_HALF_DUPLEX) in ks8851_rdreg()
215 struct ks8851_net_spi *kss = to_ks8851_spi(ks); in ks8851_rdfifo_spi() local
216 struct spi_transfer *xfer = kss->spi_xfer2; in ks8851_rdfifo_spi()
217 struct spi_message *msg = &kss->spi_msg2; in ks8851_rdfifo_spi()
236 ret = spi_sync(kss->spidev, msg); in ks8851_rdfifo_spi()
255 struct ks8851_net_spi *kss = to_ks8851_spi(ks); in ks8851_wrfifo_spi() local
256 struct spi_transfer *xfer = kss->spi_xfer2; in ks8851_wrfifo_spi()
257 struct spi_message *msg = &kss->spi_msg2; in ks8851_wrfifo_spi()
284 ret = spi_sync(kss->spidev, msg); in ks8851_wrfifo_spi()
308 struct ks8851_net_spi *kss; in ks8851_tx_work() local
314 kss = container_of(work, struct ks8851_net_spi, tx_work); in ks8851_tx_work()
315 ks = &kss->ks8851; in ks8851_tx_work()
344 struct ks8851_net_spi *kss = to_ks8851_spi(ks); in ks8851_flush_tx_work_spi() local
346 flush_work(&kss->tx_work); in ks8851_flush_tx_work_spi()
380 struct ks8851_net_spi *kss; in ks8851_start_xmit_spi() local
382 kss = to_ks8851_spi(ks); in ks8851_start_xmit_spi()
398 schedule_work(&kss->tx_work); in ks8851_start_xmit_spi()
406 struct ks8851_net_spi *kss; in ks8851_probe_spi() local
416 kss = netdev_priv(netdev); in ks8851_probe_spi()
417 ks = &kss->ks8851; in ks8851_probe_spi()
437 kss->spidev = spi; in ks8851_probe_spi()
438 mutex_init(&kss->lock); in ks8851_probe_spi()
439 INIT_WORK(&kss->tx_work, ks8851_tx_work); in ks8851_probe_spi()
442 spi_message_init(&kss->spi_msg1); in ks8851_probe_spi()
443 spi_message_add_tail(&kss->spi_xfer1, &kss->spi_msg1); in ks8851_probe_spi()
445 spi_message_init(&kss->spi_msg2); in ks8851_probe_spi()
446 spi_message_add_tail(&kss->spi_xfer2[0], &kss->spi_msg2); in ks8851_probe_spi()
447 spi_message_add_tail(&kss->spi_xfer2[1], &kss->spi_msg2); in ks8851_probe_spi()