public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Penkler <dpenkler@gmail.com>
To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Cc: marcello.carla@gmx.com, Dave Penkler <dpenkler@gmail.com>
Subject: [PATCH 3/8] staging: gpib: Enable SRQ irq on request_system_control
Date: Fri, 18 Apr 2025 19:34:29 +0200	[thread overview]
Message-ID: <20250418173434.2892-4-dpenkler@gmail.com> (raw)
In-Reply-To: <20250418173434.2892-1-dpenkler@gmail.com>

The SRQ irq was being enabled on attach but the board is not
set up to handle it until it becomes system controller.

Move the enabling of the SRQ irq to bb_request_system_control.

Fixes: 4cd654f84769 ("staging: gpib: Add gpio bitbang GPIB driver")
Tested-by: Dave Penkler <dpenkler@gmail.com>
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
 drivers/staging/gpib/gpio/gpib_bitbang.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
index a92c4eda99a0..ac9ecb6e0aad 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -884,6 +884,8 @@ static int bb_go_to_standby(struct gpib_board *board)
 
 static int bb_request_system_control(struct gpib_board *board, int request_control)
 {
+	struct bb_priv *priv = board->private_data;
+
 	dbg_printk(2, "%d\n", request_control);
 	if (!request_control)
 		return -EINVAL;
@@ -895,6 +897,8 @@ static int bb_request_system_control(struct gpib_board *board, int request_contr
 
 	gpiod_direction_input(SRQ);
 
+	ENABLE_IRQ(priv->irq_SRQ, IRQ_TYPE_EDGE_FALLING);
+
 	return 0;
 }
 
@@ -1299,8 +1303,6 @@ static int bb_attach(struct gpib_board *board, const struct gpib_board_config *c
 		       IRQF_TRIGGER_NONE))
 		goto bb_attach_fail_r;
 
-	ENABLE_IRQ(priv->irq_SRQ, IRQ_TYPE_EDGE_FALLING);
-
 	dbg_printk(0, "attached board %d\n", board->minor);
 	goto bb_attach_out;
 
-- 
2.49.0


  parent reply	other threads:[~2025-04-18 17:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18 17:34 [PATCH 0/8] staging: gpib: Fixes and cleanup for gpio driver Dave Penkler
2025-04-18 17:34 ` [PATCH 1/8] staging: gpib: Fix request_system_control in gpio Dave Penkler
2025-04-18 17:34 ` [PATCH 2/8] staging: gpib: Fix setting controller-in-charge Dave Penkler
2025-04-18 17:34 ` Dave Penkler [this message]
2025-04-18 17:34 ` [PATCH 4/8] staging: gpib: Remove dependency on LED subsystem Dave Penkler
2025-04-18 17:34 ` [PATCH 5/8] staging: gpib: Remove atn_asserted global variable Dave Penkler
2025-04-18 17:34 ` [PATCH 6/8] staging: gpib: Change error code for no listener Dave Penkler
2025-04-18 17:34 ` [PATCH 7/8] staging: gpib: Cleanup allocate_gpios code Dave Penkler
2025-04-18 17:34 ` [PATCH 8/8] staging: gpib: Set control lines in attach Dave Penkler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250418173434.2892-4-dpenkler@gmail.com \
    --to=dpenkler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=marcello.carla@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox