27
27
MODULE_LICENSE ("GPL" );
28
28
MODULE_DESCRIPTION ("GPIB library for tms9914" );
29
29
30
- static unsigned int update_status_nolock (gpib_board_t * board , struct tms9914_priv * priv );
30
+ static unsigned int update_status_nolock (struct gpib_board * board , struct tms9914_priv * priv );
31
31
32
- int tms9914_take_control (gpib_board_t * board , struct tms9914_priv * priv , int synchronous )
32
+ int tms9914_take_control (struct gpib_board * board , struct tms9914_priv * priv , int synchronous )
33
33
{
34
34
int i ;
35
35
const int timeout = 100 ;
@@ -66,15 +66,15 @@ EXPORT_SYMBOL_GPL(tms9914_take_control);
66
66
* The rest of the tms9914 based drivers still use tms9914_take_control
67
67
* directly (which does issue tcs).
68
68
*/
69
- int tms9914_take_control_workaround (gpib_board_t * board , struct tms9914_priv * priv , int synchronous )
69
+ int tms9914_take_control_workaround (struct gpib_board * board , struct tms9914_priv * priv , int synchronous )
70
70
{
71
71
if (synchronous )
72
72
return - ETIMEDOUT ;
73
73
return tms9914_take_control (board , priv , synchronous );
74
74
}
75
75
EXPORT_SYMBOL_GPL (tms9914_take_control_workaround );
76
76
77
- int tms9914_go_to_standby (gpib_board_t * board , struct tms9914_priv * priv )
77
+ int tms9914_go_to_standby (struct gpib_board * board , struct tms9914_priv * priv )
78
78
{
79
79
int i ;
80
80
const int timeout = 1000 ;
@@ -95,7 +95,7 @@ int tms9914_go_to_standby(gpib_board_t *board, struct tms9914_priv *priv)
95
95
}
96
96
EXPORT_SYMBOL_GPL (tms9914_go_to_standby );
97
97
98
- void tms9914_interface_clear (gpib_board_t * board , struct tms9914_priv * priv , int assert )
98
+ void tms9914_interface_clear (struct gpib_board * board , struct tms9914_priv * priv , int assert )
99
99
{
100
100
if (assert ) {
101
101
write_byte (priv , AUX_SIC | AUX_CS , AUXCR );
@@ -107,7 +107,7 @@ void tms9914_interface_clear(gpib_board_t *board, struct tms9914_priv *priv, int
107
107
}
108
108
EXPORT_SYMBOL_GPL (tms9914_interface_clear );
109
109
110
- void tms9914_remote_enable (gpib_board_t * board , struct tms9914_priv * priv , int enable )
110
+ void tms9914_remote_enable (struct gpib_board * board , struct tms9914_priv * priv , int enable )
111
111
{
112
112
if (enable )
113
113
write_byte (priv , AUX_SRE | AUX_CS , AUXCR );
@@ -116,7 +116,7 @@ void tms9914_remote_enable(gpib_board_t *board, struct tms9914_priv *priv, int e
116
116
}
117
117
EXPORT_SYMBOL_GPL (tms9914_remote_enable );
118
118
119
- void tms9914_request_system_control (gpib_board_t * board , struct tms9914_priv * priv ,
119
+ void tms9914_request_system_control (struct gpib_board * board , struct tms9914_priv * priv ,
120
120
int request_control )
121
121
{
122
122
if (request_control ) {
@@ -128,7 +128,7 @@ void tms9914_request_system_control(gpib_board_t *board, struct tms9914_priv *pr
128
128
}
129
129
EXPORT_SYMBOL_GPL (tms9914_request_system_control );
130
130
131
- unsigned int tms9914_t1_delay (gpib_board_t * board , struct tms9914_priv * priv ,
131
+ unsigned int tms9914_t1_delay (struct gpib_board * board , struct tms9914_priv * priv ,
132
132
unsigned int nano_sec )
133
133
{
134
134
static const int clock_period = 200 ; // assuming 5Mhz input clock
@@ -154,7 +154,7 @@ unsigned int tms9914_t1_delay(gpib_board_t *board, struct tms9914_priv *priv,
154
154
}
155
155
EXPORT_SYMBOL_GPL (tms9914_t1_delay );
156
156
157
- void tms9914_return_to_local (const gpib_board_t * board , struct tms9914_priv * priv )
157
+ void tms9914_return_to_local (const struct gpib_board * board , struct tms9914_priv * priv )
158
158
{
159
159
write_byte (priv , AUX_RTL , AUXCR );
160
160
}
@@ -192,7 +192,7 @@ void tms9914_release_holdoff(struct tms9914_priv *priv)
192
192
}
193
193
EXPORT_SYMBOL_GPL (tms9914_release_holdoff );
194
194
195
- int tms9914_enable_eos (gpib_board_t * board , struct tms9914_priv * priv , uint8_t eos_byte ,
195
+ int tms9914_enable_eos (struct gpib_board * board , struct tms9914_priv * priv , uint8_t eos_byte ,
196
196
int compare_8_bits )
197
197
{
198
198
priv -> eos = eos_byte ;
@@ -203,13 +203,13 @@ int tms9914_enable_eos(gpib_board_t *board, struct tms9914_priv *priv, uint8_t e
203
203
}
204
204
EXPORT_SYMBOL (tms9914_enable_eos );
205
205
206
- void tms9914_disable_eos (gpib_board_t * board , struct tms9914_priv * priv )
206
+ void tms9914_disable_eos (struct gpib_board * board , struct tms9914_priv * priv )
207
207
{
208
208
priv -> eos_flags &= ~REOS ;
209
209
}
210
210
EXPORT_SYMBOL (tms9914_disable_eos );
211
211
212
- int tms9914_parallel_poll (gpib_board_t * board , struct tms9914_priv * priv , uint8_t * result )
212
+ int tms9914_parallel_poll (struct gpib_board * board , struct tms9914_priv * priv , uint8_t * result )
213
213
{
214
214
// execute parallel poll
215
215
write_byte (priv , AUX_CS | AUX_RPP , AUXCR );
@@ -234,7 +234,7 @@ static void set_ppoll_reg(struct tms9914_priv *priv, int enable,
234
234
}
235
235
}
236
236
237
- void tms9914_parallel_poll_configure (gpib_board_t * board ,
237
+ void tms9914_parallel_poll_configure (struct gpib_board * board ,
238
238
struct tms9914_priv * priv , uint8_t config )
239
239
{
240
240
priv -> ppoll_enable = (config & PPC_DISABLE ) == 0 ;
@@ -244,14 +244,14 @@ void tms9914_parallel_poll_configure(gpib_board_t *board,
244
244
}
245
245
EXPORT_SYMBOL (tms9914_parallel_poll_configure );
246
246
247
- void tms9914_parallel_poll_response (gpib_board_t * board ,
247
+ void tms9914_parallel_poll_response (struct gpib_board * board ,
248
248
struct tms9914_priv * priv , int ist )
249
249
{
250
250
set_ppoll_reg (priv , priv -> ppoll_enable , priv -> ppoll_line , priv -> ppoll_sense , ist );
251
251
}
252
252
EXPORT_SYMBOL (tms9914_parallel_poll_response );
253
253
254
- void tms9914_serial_poll_response (gpib_board_t * board , struct tms9914_priv * priv , uint8_t status )
254
+ void tms9914_serial_poll_response (struct gpib_board * board , struct tms9914_priv * priv , uint8_t status )
255
255
{
256
256
unsigned long flags ;
257
257
@@ -266,7 +266,7 @@ void tms9914_serial_poll_response(gpib_board_t *board, struct tms9914_priv *priv
266
266
}
267
267
EXPORT_SYMBOL (tms9914_serial_poll_response );
268
268
269
- uint8_t tms9914_serial_poll_status (gpib_board_t * board , struct tms9914_priv * priv )
269
+ uint8_t tms9914_serial_poll_status (struct gpib_board * board , struct tms9914_priv * priv )
270
270
{
271
271
u8 status ;
272
272
unsigned long flags ;
@@ -279,15 +279,15 @@ uint8_t tms9914_serial_poll_status(gpib_board_t *board, struct tms9914_priv *pri
279
279
}
280
280
EXPORT_SYMBOL (tms9914_serial_poll_status );
281
281
282
- int tms9914_primary_address (gpib_board_t * board , struct tms9914_priv * priv , unsigned int address )
282
+ int tms9914_primary_address (struct gpib_board * board , struct tms9914_priv * priv , unsigned int address )
283
283
{
284
284
// put primary address in address0
285
285
write_byte (priv , address & ADDRESS_MASK , ADR );
286
286
return 0 ;
287
287
}
288
288
EXPORT_SYMBOL (tms9914_primary_address );
289
289
290
- int tms9914_secondary_address (gpib_board_t * board , struct tms9914_priv * priv ,
290
+ int tms9914_secondary_address (struct gpib_board * board , struct tms9914_priv * priv ,
291
291
unsigned int address , int enable )
292
292
{
293
293
if (enable )
@@ -300,7 +300,7 @@ int tms9914_secondary_address(gpib_board_t *board, struct tms9914_priv *priv,
300
300
}
301
301
EXPORT_SYMBOL (tms9914_secondary_address );
302
302
303
- unsigned int tms9914_update_status (gpib_board_t * board , struct tms9914_priv * priv ,
303
+ unsigned int tms9914_update_status (struct gpib_board * board , struct tms9914_priv * priv ,
304
304
unsigned int clear_mask )
305
305
{
306
306
unsigned long flags ;
@@ -342,7 +342,7 @@ static void update_listener_state(struct tms9914_priv *priv, unsigned int addres
342
342
}
343
343
}
344
344
345
- static unsigned int update_status_nolock (gpib_board_t * board , struct tms9914_priv * priv )
345
+ static unsigned int update_status_nolock (struct gpib_board * board , struct tms9914_priv * priv )
346
346
{
347
347
int address_status ;
348
348
int bsr_bits ;
@@ -388,7 +388,7 @@ static unsigned int update_status_nolock(gpib_board_t *board, struct tms9914_pri
388
388
return board -> status ;
389
389
}
390
390
391
- int tms9914_line_status (const gpib_board_t * board , struct tms9914_priv * priv )
391
+ int tms9914_line_status (const struct gpib_board * board , struct tms9914_priv * priv )
392
392
{
393
393
int bsr_bits ;
394
394
int status = VALID_ALL ;
@@ -433,7 +433,7 @@ static int check_for_eos(struct tms9914_priv *priv, uint8_t byte)
433
433
return 0 ;
434
434
}
435
435
436
- static int wait_for_read_byte (gpib_board_t * board , struct tms9914_priv * priv )
436
+ static int wait_for_read_byte (struct gpib_board * board , struct tms9914_priv * priv )
437
437
{
438
438
if (wait_event_interruptible (board -> wait ,
439
439
test_bit (READ_READY_BN , & priv -> state ) ||
@@ -449,7 +449,7 @@ static int wait_for_read_byte(gpib_board_t *board, struct tms9914_priv *priv)
449
449
return 0 ;
450
450
}
451
451
452
- static inline uint8_t tms9914_read_data_in (gpib_board_t * board , struct tms9914_priv * priv , int * end )
452
+ static inline uint8_t tms9914_read_data_in (struct gpib_board * board , struct tms9914_priv * priv , int * end )
453
453
{
454
454
unsigned long flags ;
455
455
u8 data ;
@@ -480,7 +480,7 @@ static inline uint8_t tms9914_read_data_in(gpib_board_t *board, struct tms9914_p
480
480
return data ;
481
481
}
482
482
483
- static int pio_read (gpib_board_t * board , struct tms9914_priv * priv , uint8_t * buffer ,
483
+ static int pio_read (struct gpib_board * board , struct tms9914_priv * priv , uint8_t * buffer ,
484
484
size_t length , int * end , size_t * bytes_read )
485
485
{
486
486
ssize_t retval = 0 ;
@@ -501,7 +501,7 @@ static int pio_read(gpib_board_t *board, struct tms9914_priv *priv, uint8_t *buf
501
501
return retval ;
502
502
}
503
503
504
- int tms9914_read (gpib_board_t * board , struct tms9914_priv * priv , uint8_t * buffer ,
504
+ int tms9914_read (struct gpib_board * board , struct tms9914_priv * priv , uint8_t * buffer ,
505
505
size_t length , int * end , size_t * bytes_read )
506
506
{
507
507
ssize_t retval = 0 ;
@@ -541,7 +541,7 @@ int tms9914_read(gpib_board_t *board, struct tms9914_priv *priv, uint8_t *buffer
541
541
}
542
542
EXPORT_SYMBOL (tms9914_read );
543
543
544
- static int pio_write_wait (gpib_board_t * board , struct tms9914_priv * priv )
544
+ static int pio_write_wait (struct gpib_board * board , struct tms9914_priv * priv )
545
545
{
546
546
// wait until next byte is ready to be sent
547
547
if (wait_event_interruptible (board -> wait ,
@@ -561,7 +561,7 @@ static int pio_write_wait(gpib_board_t *board, struct tms9914_priv *priv)
561
561
return 0 ;
562
562
}
563
563
564
- static int pio_write (gpib_board_t * board , struct tms9914_priv * priv , uint8_t * buffer ,
564
+ static int pio_write (struct gpib_board * board , struct tms9914_priv * priv , uint8_t * buffer ,
565
565
size_t length , size_t * bytes_written )
566
566
{
567
567
ssize_t retval = 0 ;
@@ -585,7 +585,7 @@ static int pio_write(gpib_board_t *board, struct tms9914_priv *priv, uint8_t *bu
585
585
return length ;
586
586
}
587
587
588
- int tms9914_write (gpib_board_t * board , struct tms9914_priv * priv , uint8_t * buffer , size_t length ,
588
+ int tms9914_write (struct gpib_board * board , struct tms9914_priv * priv , uint8_t * buffer , size_t length ,
589
589
int send_eoi , size_t * bytes_written )
590
590
{
591
591
ssize_t retval = 0 ;
@@ -620,7 +620,7 @@ int tms9914_write(gpib_board_t *board, struct tms9914_priv *priv, uint8_t *buffe
620
620
}
621
621
EXPORT_SYMBOL (tms9914_write );
622
622
623
- static void check_my_address_state (gpib_board_t * board , struct tms9914_priv * priv , int cmd_byte )
623
+ static void check_my_address_state (struct gpib_board * board , struct tms9914_priv * priv , int cmd_byte )
624
624
{
625
625
if (cmd_byte == MLA (board -> pad )) {
626
626
priv -> primary_listen_addressed = 1 ;
@@ -655,7 +655,7 @@ static void check_my_address_state(gpib_board_t *board, struct tms9914_priv *pri
655
655
}
656
656
}
657
657
658
- int tms9914_command (gpib_board_t * board , struct tms9914_priv * priv , uint8_t * buffer ,
658
+ int tms9914_command (struct gpib_board * board , struct tms9914_priv * priv , uint8_t * buffer ,
659
659
size_t length , size_t * bytes_written )
660
660
{
661
661
int retval = 0 ;
@@ -692,7 +692,7 @@ int tms9914_command(gpib_board_t *board, struct tms9914_priv *priv, uint8_t *bu
692
692
}
693
693
EXPORT_SYMBOL (tms9914_command );
694
694
695
- irqreturn_t tms9914_interrupt (gpib_board_t * board , struct tms9914_priv * priv )
695
+ irqreturn_t tms9914_interrupt (struct gpib_board * board , struct tms9914_priv * priv )
696
696
{
697
697
int status0 , status1 ;
698
698
@@ -703,7 +703,7 @@ irqreturn_t tms9914_interrupt(gpib_board_t *board, struct tms9914_priv *priv)
703
703
}
704
704
EXPORT_SYMBOL (tms9914_interrupt );
705
705
706
- irqreturn_t tms9914_interrupt_have_status (gpib_board_t * board , struct tms9914_priv * priv ,
706
+ irqreturn_t tms9914_interrupt_have_status (struct gpib_board * board , struct tms9914_priv * priv ,
707
707
int status0 , int status1 )
708
708
{
709
709
// record reception of END
@@ -837,7 +837,7 @@ void tms9914_board_reset(struct tms9914_priv *priv)
837
837
}
838
838
EXPORT_SYMBOL_GPL (tms9914_board_reset );
839
839
840
- void tms9914_online (gpib_board_t * board , struct tms9914_priv * priv )
840
+ void tms9914_online (struct gpib_board * board , struct tms9914_priv * priv )
841
841
{
842
842
/* set GPIB address */
843
843
tms9914_primary_address (board , priv , board -> pad );
0 commit comments