All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danny Kaehn <kaehndan@gmail.com>
To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	jikos@kernel.org, benjamin.tissoires@redhat.com
Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org,
	ethan.twardy@plexus.com
Subject: [PATCH 3/4] Fix CP2112 driver not registering GPIO IRQ chip as threaded
Date: Sat, 28 Jan 2023 14:26:21 -0600	[thread overview]
Message-ID: <20230128202622.12676-4-kaehndan@gmail.com> (raw)
In-Reply-To: <20230128202622.12676-1-kaehndan@gmail.com>

The CP2112 generates interrupts from a polling routine on a thread,
and can only support threaded interrupts. This patch configures the
gpiochip irq chip with this flag, disallowing consumers to request
a hard IRQ from this driver, which resulted in a segfault previously.

Signed-off-by: Danny Kaehn <kaehndan@gmail.com>
---
 drivers/hid/hid-cp2112.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
index 1e16b0fa310d..27cadadda7c9 100644
--- a/drivers/hid/hid-cp2112.c
+++ b/drivers/hid/hid-cp2112.c
@@ -1354,6 +1354,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	girq->parents = NULL;
 	girq->default_type = IRQ_TYPE_NONE;
 	girq->handler = handle_simple_irq;
+	girq->threaded = true;
 
 	ret = gpiochip_add_data(&dev->gc, dev);
 	if (ret < 0) {
-- 
2.25.1


  parent reply	other threads:[~2023-01-28 20:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28 20:26 [PATCH 0/4] DeviceTree Support for USB-HID Devices and CP2112 Danny Kaehn
2023-01-28 20:26 ` [PATCH 1/4] dt-bindings: hid: Add CP2112 HID USB to SMBus Bridge Danny Kaehn
2023-01-29 11:05   ` Krzysztof Kozlowski
2023-01-29 11:33     ` Krzysztof Kozlowski
2023-01-31  0:25       ` Daniel Kaehn
2023-01-28 20:26 ` [PATCH 2/4] Share USB device devicetree node with child HID device Danny Kaehn
2023-01-29 11:05   ` Krzysztof Kozlowski
2023-01-28 20:26 ` Danny Kaehn [this message]
2023-01-28 20:26 ` [PATCH 4/4] CP2112 Devicetree Support Danny Kaehn
2023-01-29 11:06   ` Krzysztof Kozlowski
2023-01-31  1:06     ` Daniel Kaehn
2023-01-31 16:45       ` Krzysztof Kozlowski
2023-01-30 16:29 ` [PATCH 0/4] DeviceTree Support for USB-HID Devices and CP2112 Benjamin Tissoires

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=20230128202622.12676-4-kaehndan@gmail.com \
    --to=kaehndan@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ethan.twardy@plexus.com \
    --cc=jikos@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.