From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: peter.breuer@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] gpio-keys with xenomai
Date: Thu, 18 Mar 2010 21:14:36 +0100 [thread overview]
Message-ID: <4BA289AC.3050209@domain.hid> (raw)
In-Reply-To: <1268865353.2396.0.camel@domain.hid>
Peter Breuer wrote:
> Hello everyone,
> I am new to xenomai, so please be patient.
> I am working with an AT91SAM9621S (Board SBC6000X) and I successfully
> patched my linux 2.6.24 with xenomai 2.4.9.1. I also have a signal on on
> of the GPIOs and I want a program to react, every time the signal
> arrives (~10Hz).
> Before compiling I added some lines to the board description file
> (arch/arm/mach-at91/board-sbc9621.c):
> ...
> static struct gpio_keys_button sbc9261_buttons[] = {
> ...
> //begin changes
> {
> .gpio = AT91_PIN_PC4,
> .code = BTN_2,
> .desc = "GPIO 1",
> .active_low = 1,
> },
> //end changes
> };
> ...
> static void __init sbc9261_add_device_buttons(void)
> {
> ...
> //begin changes
> at91_set_gpio_input(AT91_PIN_PC4, 1); /* btn1 */
> at91_set_deglitch(AT91_PIN_PC4, 1);
> //end changes
>
> platform_device_register(&sbc9261_button_device);
> }
>
> Now a new event showed up in /dev/input/
> Without the xenomai patch there was an interrupt, that I could listen to
> with a program (open(/dev/input/event2) and select for listening) and
> react to the signal.
That is one thing. It could be due to a edge vs level issue. First when
you tell this, you must be 100% sure that you are exactly using the same
configuration except for the xenomai settings. Second, please try and
recompile a kernel with only CONFIG_IPIPE enabled, but not with
CONFIG_XENOMAI.
> With the xenomai patch nothing is coming trough, and even though GPIO 1
> still shows up in /proc/interrupts, it doesnt show up
> in /proc/xenomai/irq.
That is not your problem. Irqs appear in /proc/xenomai/irq only when the
IRQ is used in the real-time domain.
> I tried to use the native API (I used the usr_irq.c) to create and wait
> for the signal, but nothin happend (rt_intr_wait() returned -1).
That is yet another story. Error codes are documented in the API
documentation. -1 is -EPERM. It usually means that the task calling the
function is not a real-time task and should be one.
> I would be very happy about every hint in the right direction.
> greetings,
> Peter
>
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
--
Gilles Chanteperdrix, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2010-03-18 20:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 22:35 [Xenomai-help] gpio-keys with xenomai Peter Breuer
2010-03-18 20:14 ` Gilles Chanteperdrix [this message]
2010-03-18 20:56 ` Philippe Gerum
-- strict thread matches above, loose matches on Subject: below --
2010-03-24 0:18 Peter Breuer
2010-03-24 10:19 ` Gilles Chanteperdrix
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=4BA289AC.3050209@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=peter.breuer@domain.hid \
--cc=xenomai@xenomai.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.