Lines Matching refs:pp

83 	struct butterfly	*pp = spidev_to_pp(spi);  in setsck()  local
84 u8 bit, byte = pp->lastbyte; in setsck()
92 parport_write_data(pp->port, byte); in setsck()
93 pp->lastbyte = byte; in setsck()
99 struct butterfly *pp = spidev_to_pp(spi); in setmosi() local
100 u8 bit, byte = pp->lastbyte; in setmosi()
108 parport_write_data(pp->port, byte); in setmosi()
109 pp->lastbyte = byte; in setmosi()
114 struct butterfly *pp = spidev_to_pp(spi); in getmiso() local
121 value = !(parport_read_status(pp->port) & bit); in getmiso()
127 struct butterfly *pp = spidev_to_pp(spi); in butterfly_chipselect() local
140 parport_frob_control(pp->port, spi_cs_bit, value ? spi_cs_bit : 0); in butterfly_chipselect()
197 struct butterfly *pp; in butterfly_attach() local
208 master = spi_alloc_master(dev, sizeof(*pp)); in butterfly_attach()
213 pp = spi_master_get_devdata(master); in butterfly_attach()
224 pp->bitbang.master = master; in butterfly_attach()
225 pp->bitbang.chipselect = butterfly_chipselect; in butterfly_attach()
226 pp->bitbang.txrx_word[SPI_MODE_0] = butterfly_txrx_word_mode0; in butterfly_attach()
231 pp->port = p; in butterfly_attach()
234 0 /* FLAGS */, pp); in butterfly_attach()
239 pp->pd = pd; in butterfly_attach()
251 parport_frob_control(pp->port, spi_cs_bit, 0); in butterfly_attach()
256 pp->lastbyte |= vcc_bits; in butterfly_attach()
257 parport_write_data(pp->port, pp->lastbyte); in butterfly_attach()
261 pp->lastbyte |= butterfly_nreset; in butterfly_attach()
262 parport_write_data(pp->port, pp->lastbyte); in butterfly_attach()
269 status = spi_bitbang_start(&pp->bitbang); in butterfly_attach()
278 pp->info[0].max_speed_hz = 15 * 1000 * 1000; in butterfly_attach()
279 strcpy(pp->info[0].modalias, "mtd_dataflash"); in butterfly_attach()
280 pp->info[0].platform_data = &flash; in butterfly_attach()
281 pp->info[0].chip_select = 1; in butterfly_attach()
282 pp->info[0].controller_data = pp; in butterfly_attach()
283 pp->dataflash = spi_new_device(pp->bitbang.master, &pp->info[0]); in butterfly_attach()
284 if (pp->dataflash) in butterfly_attach()
286 dev_name(&pp->dataflash->dev)); in butterfly_attach()
289 butterfly = pp; in butterfly_attach()
294 parport_write_data(pp->port, 0); in butterfly_attach()
296 parport_release(pp->pd); in butterfly_attach()
300 (void) spi_master_put(pp->bitbang.master); in butterfly_attach()
307 struct butterfly *pp; in butterfly_detach() local
315 pp = butterfly; in butterfly_detach()
319 spi_bitbang_stop(&pp->bitbang); in butterfly_detach()
322 parport_write_data(pp->port, 0); in butterfly_detach()
325 parport_release(pp->pd); in butterfly_detach()
326 parport_unregister_device(pp->pd); in butterfly_detach()
328 (void) spi_master_put(pp->bitbang.master); in butterfly_detach()