Lines Matching full:pp
69 struct butterfly *pp = spidev_to_pp(spi); in setsck() local
70 u8 bit, byte = pp->lastbyte; in setsck()
78 parport_write_data(pp->port, byte); in setsck()
79 pp->lastbyte = byte; in setsck()
85 struct butterfly *pp = spidev_to_pp(spi); in setmosi() local
86 u8 bit, byte = pp->lastbyte; in setmosi()
94 parport_write_data(pp->port, byte); in setmosi()
95 pp->lastbyte = byte; in setmosi()
100 struct butterfly *pp = spidev_to_pp(spi); in getmiso() local
107 value = !(parport_read_status(pp->port) & bit); in getmiso()
113 struct butterfly *pp = spidev_to_pp(spi); in butterfly_chipselect() local
126 parport_frob_control(pp->port, spi_cs_bit, value ? spi_cs_bit : 0); in butterfly_chipselect()
180 struct butterfly *pp; in butterfly_attach() local
192 host = spi_alloc_host(dev, sizeof(*pp)); in butterfly_attach()
197 pp = spi_controller_get_devdata(host); in butterfly_attach()
208 pp->bitbang.ctlr = host; in butterfly_attach()
209 pp->bitbang.chipselect = butterfly_chipselect; in butterfly_attach()
210 pp->bitbang.txrx_word[SPI_MODE_0] = butterfly_txrx_word_mode0; in butterfly_attach()
215 pp->port = p; in butterfly_attach()
217 butterfly_cb.private = pp; in butterfly_attach()
223 pp->pd = pd; in butterfly_attach()
235 parport_frob_control(pp->port, spi_cs_bit, 0); in butterfly_attach()
240 pp->lastbyte |= vcc_bits; in butterfly_attach()
241 parport_write_data(pp->port, pp->lastbyte); in butterfly_attach()
245 pp->lastbyte |= butterfly_nreset; in butterfly_attach()
246 parport_write_data(pp->port, pp->lastbyte); in butterfly_attach()
252 status = spi_bitbang_start(&pp->bitbang); in butterfly_attach()
261 pp->info[0].max_speed_hz = 15 * 1000 * 1000; in butterfly_attach()
262 strcpy(pp->info[0].modalias, "mtd_dataflash"); in butterfly_attach()
263 pp->info[0].platform_data = &flash; in butterfly_attach()
264 pp->info[0].chip_select = 1; in butterfly_attach()
265 pp->info[0].controller_data = pp; in butterfly_attach()
266 pp->dataflash = spi_new_device(pp->bitbang.ctlr, &pp->info[0]); in butterfly_attach()
267 if (pp->dataflash) in butterfly_attach()
269 dev_name(&pp->dataflash->dev)); in butterfly_attach()
272 butterfly = pp; in butterfly_attach()
277 parport_write_data(pp->port, 0); in butterfly_attach()
279 parport_release(pp->pd); in butterfly_attach()
290 struct butterfly *pp; in butterfly_detach() local
298 pp = butterfly; in butterfly_detach()
302 spi_bitbang_stop(&pp->bitbang); in butterfly_detach()
305 parport_write_data(pp->port, 0); in butterfly_detach()
308 parport_release(pp->pd); in butterfly_detach()
309 parport_unregister_device(pp->pd); in butterfly_detach()
311 spi_controller_put(pp->bitbang.ctlr); in butterfly_detach()