From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Paul Cercueil <pcercuei@gmail.com>
Cc: linux-input@vger.kernel.org, Henrik Rydberg <rydberg@euromail.se>
Subject: Re: kernel panic on gpio-keys
Date: Mon, 30 Dec 2013 10:42:33 -0800 [thread overview]
Message-ID: <20131230184233.GA3278@core.coreip.homeip.net> (raw)
In-Reply-To: <52C18D88.9070707@gmail.com>
On Mon, Dec 30, 2013 at 04:13:12PM +0100, Paul Cercueil wrote:
> On 27/12/2013 02:56, Dmitry Torokhov wrote:
> >On Tue, Dec 17, 2013 at 04:17:34PM +0100, Paul Cercueil wrote:
> >>On 14/12/2013 10:39, Dmitry Torokhov wrote:
> >>>On Wed, Dec 11, 2013 at 08:17:29PM +0100, Paul Cercueil wrote:
> >>>>Hi there,
> >>>>
> >>>>I am trying to use the gpio-keys driver to inject joystick events.
> >>>>There seems to be some basic support of it, looking at <linux/gpio_keys.h>.
> >>>>
> >>>>However, registering the following will trigger a kernel panic in
> >>>>the kernel:
> >>>>
> >>>>static struct gpio_keys_button my_buttons[] {
> >>>> {
> >>>> .gpio = GPIO_FOO,
> >>>> .type = EV_ABS,
> >>>> .code = ABS_HAT0X,
> >>>> .value = 1,
> >>>> },
> >>>>};
> >>>>
> >>>>(tested on kernel 3.12).
> >>>>
> >>>>I don't know well the input subsystem, so I have no idea of what is
> >>>>going wrong. Could anybody try to at least reproduce the issue?
> >>>
> >>>It woudl be helpful if you poster the stack trace from panic so we'd
> >>>have an idea where the fault happens.
> >>>
> >>>Thanks.
> >>>
> >>
> >>Here is the crash log I get: http://pastebin.com/FzTTGxsR
> >>(I did put it on pastebin because it's huge, 200+ lines).
> >>
> >>The first OOPS happen as soon as the GPIO button is pressed; the
> >>other ones seem to happen recursively. I included only a part of the
> >>log I get, as the OOPSes continue to flow until the watchdog kicks
> >>in.
> >
> >Hmm, I have an idea: this driver is one of few that does not use
> >input_set_abs_info() and this does not allocate memory for absinfo data
> >that input core uses to handle absolute events.
> >
> >Does the patch below work for you?
> >
> >Thanks.
> >
>
> Hi,
>
> The patch works just fine, thank you!
Thanks Paul.
--
Dmitry
prev parent reply other threads:[~2013-12-30 18:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 19:17 kernel panic on gpio-keys Paul Cercueil
2013-12-14 9:39 ` Dmitry Torokhov
2013-12-17 15:17 ` Paul Cercueil
2013-12-27 1:56 ` Dmitry Torokhov
2013-12-30 15:13 ` Paul Cercueil
2013-12-30 18:42 ` Dmitry Torokhov [this message]
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=20131230184233.GA3278@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=pcercuei@gmail.com \
--cc=rydberg@euromail.se \
/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;
as well as URLs for NNTP newsgroup(s).