[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250418173434.2892-3-dpenkler@gmail.com>
Date: Fri, 18 Apr 2025 19:34:28 +0200
From: Dave Penkler <dpenkler@...il.com>
To: gregkh@...uxfoundation.org,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: marcello.carla@....com,
Dave Penkler <dpenkler@...il.com>
Subject: [PATCH 2/8] staging: gpib: Fix setting controller-in-charge
The gpio board can only act as system controller.
By the IEEE488.1 standard a system controller becomes
controller-in-charge when it asserts the interface-clear control
line.
Remove the setting of controller-in-charge from bb_take_control
and move it to bb_interface_clear.
Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver")
Tested-by: Dave Penkler <dpenkler@...il.com>
Signed-off-by: Dave Penkler <dpenkler@...il.com>
---
drivers/staging/gpib/gpio/gpib_bitbang.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
index 29aab72c1f0f..a92c4eda99a0 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -872,7 +872,6 @@ static int bb_take_control(struct gpib_board *board, int synchronous)
{
dbg_printk(2, "%d\n", synchronous);
set_atn(board, 1);
- set_bit(CIC_NUM, &board->status);
return 0;
}
@@ -908,6 +907,7 @@ static void bb_interface_clear(struct gpib_board *board, int assert)
gpiod_direction_output(IFC, 0);
priv->talker_state = talker_idle;
priv->listener_state = listener_idle;
+ set_bit(CIC_NUM, &board->status);
} else {
gpiod_direction_output(IFC, 1);
}
--
2.49.0
Powered by blists - more mailing lists