[PATCH 2/6] gpib: Add ines 72130 line_status routine

Dave Penkler
2026-04-11T17:25:38Z

The 72130 chip has a different bus statue register offset
and layout.

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
drivers/gpib/ines/ines_gpib.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

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) {
--
2.53.0