mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
gpib: Add ines 72130 line_status routine
The 72130 chip has a different bus statue register offset and layout. Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://patch.msgid.link/20260411172511.26546-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
63625f43d1
commit
3be376ac8f
|
|
@ -57,6 +57,34 @@ static int ines_line_status(const struct gpib_board *board)
|
|||
return status;
|
||||
}
|
||||
|
||||
static int ines72130_line_status(const struct gpib_board *board)
|
||||
{
|
||||
int status = VALID_ALL;
|
||||
int bsr_bits;
|
||||
struct ines_priv *ines_priv = board->private_data;
|
||||
|
||||
bsr_bits = ines_inb(ines_priv, BUS_STATUS_REG);
|
||||
|
||||
if (bsr_bits & BSR_REN_BIT)
|
||||
status |= BUS_REN;
|
||||
if (bsr_bits & BSR_IFC_BIT)
|
||||
status |= BUS_IFC;
|
||||
if (bsr_bits & BSR_SRQ_BIT)
|
||||
status |= BUS_SRQ;
|
||||
if (bsr_bits & BSR_EOI_BIT)
|
||||
status |= BUS_EOI;
|
||||
if (bsr_bits & BSR_NRFD_BIT)
|
||||
status |= BUS_NRFD;
|
||||
if (bsr_bits & BSR_NDAC_BIT)
|
||||
status |= BUS_NDAC;
|
||||
if (bsr_bits & BSR_DAV_BIT)
|
||||
status |= BUS_DAV;
|
||||
if (bsr_bits & BSR_ATN_BIT)
|
||||
status |= BUS_ATN;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void ines_set_xfer_counter(struct ines_priv *priv, unsigned int count)
|
||||
{
|
||||
if (count > 0xffff) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user