From: Dave Penkler Date: Sat, 11 Apr 2026 17:25:07 +0000 (+0200) Subject: gpib: Add ines 72130 line_status routine X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3be376ac8f020f0c9bed8e7aa2cc2757087b4352;p=thirdparty%2Flinux.git gpib: Add ines 72130 line_status routine The 72130 chip has a different bus statue register offset and layout. Signed-off-by: Dave Penkler Link: https://patch.msgid.link/20260411172511.26546-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpib/ines/ines_gpib.c b/drivers/gpib/ines/ines_gpib.c index c000f647fbb5..dd98cb261a4c 100644 --- a/drivers/gpib/ines/ines_gpib.c +++ b/drivers/gpib/ines/ines_gpib.c @@ -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) {