Lines Matching refs:p

126 static void mts64_enable_readout(struct parport *p);
127 static void mts64_disable_readout(struct parport *p);
128 static int mts64_device_ready(struct parport *p);
129 static int mts64_device_init(struct parport *p);
133 static int mts64_probe(struct parport *p);
134 static u16 mts64_read(struct parport *p);
135 static u8 mts64_read_char(struct parport *p);
136 static void mts64_smpte_start(struct parport *p,
140 static void mts64_smpte_stop(struct parport *p);
141 static void mts64_write_command(struct parport *p, u8 c);
142 static void mts64_write_data(struct parport *p, u8 c);
151 static void mts64_enable_readout(struct parport *p) in mts64_enable_readout() argument
155 c = parport_read_control(p); in mts64_enable_readout()
157 parport_write_control(p, c); in mts64_enable_readout()
164 static void mts64_disable_readout(struct parport *p) in mts64_disable_readout() argument
168 c = parport_read_control(p); in mts64_disable_readout()
170 parport_write_control(p, c); in mts64_disable_readout()
179 static int mts64_device_ready(struct parport *p) in mts64_device_ready() argument
185 c = parport_read_status(p); in mts64_device_ready()
200 static int mts64_device_init(struct parport *p) in mts64_device_init() argument
204 mts64_write_command(p, MTS64_CMD_RESET); in mts64_device_init()
209 if (mts64_probe(p) == 0) { in mts64_device_init()
211 mts64_disable_readout(p); in mts64_device_init()
215 mts64_disable_readout(p); in mts64_device_init()
226 struct parport *p = mts->pardev->port; in mts64_device_open() local
229 mts64_write_command(p, MTS64_CMD_COM_OPEN); in mts64_device_open()
240 struct parport *p = mts->pardev->port; in mts64_device_close() local
243 mts64_write_command(p, MTS64_CMD_COM_CLOSE1); in mts64_device_close()
244 mts64_write_command(p, MTS64_CMD_COM_CLOSE2); in mts64_device_close()
276 static int mts64_probe(struct parport *p) in mts64_probe() argument
280 mts64_smpte_stop(p); in mts64_probe()
281 mts64_write_command(p, MTS64_CMD_PROBE); in mts64_probe()
285 c = mts64_read(p); in mts64_probe()
300 static u16 mts64_read(struct parport *p) in mts64_read() argument
304 mts64_device_ready(p); in mts64_read()
305 mts64_enable_readout(p); in mts64_read()
306 status = parport_read_status(p); in mts64_read()
307 data = mts64_read_char(p); in mts64_read()
308 mts64_disable_readout(p); in mts64_read()
324 static u8 mts64_read_char(struct parport *p) in mts64_read_char() argument
331 parport_write_data(p, i); in mts64_read_char()
333 status = parport_read_status(p); in mts64_read_char()
350 static void mts64_smpte_start(struct parport *p, in mts64_smpte_start() argument
361 mts64_write_command(p, MTS64_CMD_SMPTE_SET_TIME); in mts64_smpte_start()
362 mts64_write_command(p, frames); in mts64_smpte_start()
363 mts64_write_command(p, seconds); in mts64_smpte_start()
364 mts64_write_command(p, minutes); in mts64_smpte_start()
365 mts64_write_command(p, hours); in mts64_smpte_start()
367 mts64_write_command(p, MTS64_CMD_SMPTE_SET_FPS); in mts64_smpte_start()
368 mts64_write_command(p, fps[idx]); in mts64_smpte_start()
373 static void mts64_smpte_stop(struct parport *p) in mts64_smpte_stop() argument
375 mts64_write_command(p, MTS64_CMD_SMPTE_STOP); in mts64_smpte_stop()
380 static void mts64_write_command(struct parport *p, u8 c) in mts64_write_command() argument
382 mts64_device_ready(p); in mts64_write_command()
384 parport_write_data(p, c); in mts64_write_command()
386 parport_write_control(p, MTS64_CTL_WRITE_CMD); in mts64_write_command()
387 parport_write_control(p, MTS64_CTL_WRITE_CMD | MTS64_CTL_STROBE); in mts64_write_command()
388 parport_write_control(p, MTS64_CTL_WRITE_CMD); in mts64_write_command()
393 static void mts64_write_data(struct parport *p, u8 c) in mts64_write_data() argument
395 mts64_device_ready(p); in mts64_write_data()
397 parport_write_data(p, c); in mts64_write_data()
399 parport_write_control(p, MTS64_CTL_WRITE_DATA); in mts64_write_data()
400 parport_write_control(p, MTS64_CTL_WRITE_DATA | MTS64_CTL_STROBE); in mts64_write_data()
401 parport_write_control(p, MTS64_CTL_WRITE_DATA); in mts64_write_data()
412 struct parport *p = mts->pardev->port; in mts64_write_midi() local
416 mts64_write_command(p, midiport); in mts64_write_midi()
419 mts64_write_data(p, c); in mts64_write_midi()
839 static void snd_mts64_attach(struct parport *p) in snd_mts64_attach() argument
848 platform_set_drvdata(device, p); in snd_mts64_attach()
867 static void snd_mts64_detach(struct parport *p) in snd_mts64_detach() argument
907 struct parport *p; in snd_mts64_probe() local
919 p = platform_get_drvdata(pdev); in snd_mts64_probe()
936 card->shortname, p->base, p->irq); in snd_mts64_probe()
939 pardev = parport_register_dev_model(p, /* port */ in snd_mts64_probe()
964 err = mts64_probe(p); in snd_mts64_probe()
977 err = mts64_device_init(p); in snd_mts64_probe()
990 snd_printk(KERN_INFO "ESI Miditerminal 4140 on 0x%lx\n", p->base); in snd_mts64_probe()