All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jose Diez <jose@mediacru.sh>
To: linux-input@vger.kernel.org
Subject: Help writing a custom HID driver
Date: Thu, 06 Nov 2014 18:33:41 +0000	[thread overview]
Message-ID: <545BBF05.9030203@mediacru.sh> (raw)

Hello linux-input,

I'm trying to write a custom HID driver. It works fine, and I can send 
reports just fine, but one of the requirements of this device is that I 
have to reply to reports with code 62 with another report with code 62, 
which resets a watchdog in the device.

This is my code so far: http://codepad.org/m4QiWhDt

The problem is in line 40. It seems like I'm not allowed to call 
hid_hw_output_report from the raw_event callback handler. I've tried 
surrounding the call with spin_locks, but I still get the "scheduling 
while atomic" error.

I'm not sure how to approach this - can someone help? It would be much 
appreciated. Thanks.

             reply	other threads:[~2014-11-06 18:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 18:33 Jose Diez [this message]
2014-11-06 18:57 ` Help writing a custom HID driver Benjamin Tissoires
2014-11-06 19:28   ` Jose Diez
2014-11-06 20:18     ` Jose Diez
2014-11-06 20:22       ` Benjamin Tissoires
2014-11-06 20:56         ` Jose Diez
2014-11-07 17:18           ` Jose Diez

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=545BBF05.9030203@mediacru.sh \
    --to=jose@mediacru.sh \
    --cc=linux-input@vger.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.