@@ -344,12 +344,18 @@ static int adf7242_wait_status(struct adf7242_local *lp, unsigned int status,
344
344
return ret ;
345
345
}
346
346
347
- static int adf7242_wait_ready (struct adf7242_local * lp , int line )
347
+ static int adf7242_wait_rc_ready (struct adf7242_local * lp , int line )
348
348
{
349
349
return adf7242_wait_status (lp , STAT_RC_READY | STAT_SPI_READY ,
350
350
STAT_RC_READY | STAT_SPI_READY , line );
351
351
}
352
352
353
+ static int adf7242_wait_spi_ready (struct adf7242_local * lp , int line )
354
+ {
355
+ return adf7242_wait_status (lp , STAT_SPI_READY ,
356
+ STAT_SPI_READY , line );
357
+ }
358
+
353
359
static int adf7242_write_fbuf (struct adf7242_local * lp , u8 * data , u8 len )
354
360
{
355
361
u8 * buf = lp -> buf ;
@@ -369,7 +375,7 @@ static int adf7242_write_fbuf(struct adf7242_local *lp, u8 *data, u8 len)
369
375
spi_message_add_tail (& xfer_head , & msg );
370
376
spi_message_add_tail (& xfer_buf , & msg );
371
377
372
- adf7242_wait_ready (lp , __LINE__ );
378
+ adf7242_wait_spi_ready (lp , __LINE__ );
373
379
374
380
mutex_lock (& lp -> bmux );
375
381
buf [0 ] = CMD_SPI_PKT_WR ;
@@ -401,7 +407,7 @@ static int adf7242_read_fbuf(struct adf7242_local *lp,
401
407
spi_message_add_tail (& xfer_head , & msg );
402
408
spi_message_add_tail (& xfer_buf , & msg );
403
409
404
- adf7242_wait_ready (lp , __LINE__ );
410
+ adf7242_wait_spi_ready (lp , __LINE__ );
405
411
406
412
mutex_lock (& lp -> bmux );
407
413
if (packet_read ) {
@@ -432,7 +438,7 @@ static int adf7242_read_reg(struct adf7242_local *lp, u16 addr, u8 *data)
432
438
.rx_buf = lp -> buf_read_rx ,
433
439
};
434
440
435
- adf7242_wait_ready (lp , __LINE__ );
441
+ adf7242_wait_spi_ready (lp , __LINE__ );
436
442
437
443
mutex_lock (& lp -> bmux );
438
444
lp -> buf_read_tx [0 ] = CMD_SPI_MEM_RD (addr );
@@ -462,7 +468,7 @@ static int adf7242_write_reg(struct adf7242_local *lp, u16 addr, u8 data)
462
468
{
463
469
int status ;
464
470
465
- adf7242_wait_ready (lp , __LINE__ );
471
+ adf7242_wait_spi_ready (lp , __LINE__ );
466
472
467
473
mutex_lock (& lp -> bmux );
468
474
lp -> buf_reg_tx [0 ] = CMD_SPI_MEM_WR (addr );
@@ -484,7 +490,7 @@ static int adf7242_cmd(struct adf7242_local *lp, unsigned int cmd)
484
490
dev_vdbg (& lp -> spi -> dev , "%s : CMD=0x%X\n" , __func__ , cmd );
485
491
486
492
if (cmd != CMD_RC_PC_RESET_NO_WAIT )
487
- adf7242_wait_ready (lp , __LINE__ );
493
+ adf7242_wait_rc_ready (lp , __LINE__ );
488
494
489
495
mutex_lock (& lp -> bmux );
490
496
lp -> buf_cmd = cmd ;
0 commit comments