Skip to content

Commit 13f3e2c

Browse files
dpenklergregkh
authored andcommitted
staging: gpib: Set control lines in attach
When the driver is attached the state of the main control lines is not defined and can lead to hangs. Set the control lines to a known state (logic false). 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-9-dpenkler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 125cda8 commit 13f3e2c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/staging/gpib/gpio/gpib_bitbang.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,10 @@ static int bb_attach(struct gpib_board *board, const struct gpib_board_config *c
12621262
gpiod_direction_output(TE, 1);
12631263
gpiod_direction_output(PE, 1);
12641264
}
1265+
/* Set main control lines to a known state */
1266+
gpiod_direction_output(IFC, 1);
1267+
gpiod_direction_output(REN, 1);
1268+
gpiod_direction_output(_ATN, 1);
12651269

12661270
if (strcmp(PINMAP_2, pin_map) == 0) { /* YOGA: enable level shifters */
12671271
gpiod_direction_output(YOGA_ENABLE, 1);

0 commit comments

Comments
 (0)