Skip to content

Commit f56f2d6

Browse files
dpenklergregkh
authored andcommitted
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: 4cd654f ("staging: gpib: Add gpio bitbang GPIB driver") Tested-by: Dave Penkler <dpenkler@gmail.com> Signed-off-by: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250418173434.2892-3-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8ba7c33 commit f56f2d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/gpib/gpio/gpib_bitbang.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,6 @@ static int bb_take_control(struct gpib_board *board, int synchronous)
872872
{
873873
dbg_printk(2, "%d\n", synchronous);
874874
set_atn(board, 1);
875-
set_bit(CIC_NUM, &board->status);
876875
return 0;
877876
}
878877

@@ -908,6 +907,7 @@ static void bb_interface_clear(struct gpib_board *board, int assert)
908907
gpiod_direction_output(IFC, 0);
909908
priv->talker_state = talker_idle;
910909
priv->listener_state = listener_idle;
910+
set_bit(CIC_NUM, &board->status);
911911
} else {
912912
gpiod_direction_output(IFC, 1);
913913
}

0 commit comments

Comments
 (0)