[Xenomai] how to bring gpio to user space

Шевченко Тарас Григорьевич shevchenko.taras at triolcorp.com.ua
Wed May 2 15:56:35 CEST 2018


yes, sorry for this and thanks for help

С уважением и надеждой на сотрудничество,
Шевченко Т.Г.

----- Исходное сообщение -----
От: "Greg Gallagher" <greg at embeddedgreg.com>
Кому: "Шевченко Тарас Григорьевич" <shevchenko.taras at triolcorp.com.ua>
Копия: "xenomai" <xenomai at xenomai.org>, "Olej" <o.tsiliuric at yandex.ru>
Отправленные: Среда, 2 Май 2018 г 16:47:57
Тема: Re: how to bring gpio to user space

It looks like you are calling rtdm_dev_register twice, so the second
one complains that it already exists.  Take out the second call and
see what happens.


// rtdm_sem_init(&sem, 0);    // init the global semaphore
   rtdm_printk("gpio TRY register Driver \n");
   err=rtdm_dev_register(&device);
if ((err=rtdm_dev_register(&device))!=0){
// gpio_free(GPIO_PIN);
rtdm_printk("err number = %d\n",err);
if(err == -EINVAL)
    rtdm_printk("err EINVAL = %d\n",err);
if(err == -EEXIST)
    rtdm_printk("err EEXIST = %d\n",err);
     if(err == -ENOMEM)
    rtdm_printk("err ENOMEM = %d\n",err);
     if(err == -EAGAIN)
    rtdm_printk("err EAGAIN = %d\n",err);
     if(err == -ENOSYS)
    rtdm_printk("err ENOSYS = %d\n",err);
     if(err == -ENXIO)
    rtdm_printk("err ENXIO = %d\n",err);

kfree(&device);
return err;
}

-Greg

On Wed, May 2, 2018 at 4:42 AM, Шевченко Тарас Григорьевич
<shevchenko.taras at triolcorp.com.ua> wrote:
> HI Community
> I try to register simple rtdm gpio driver
>
> but get the error EEXIST  ? could you explain what is wrong or missing ?
> and what daes it mean  "invalid opcode: 0000 [#1] SMP" ?
>
> [ 1415.642644] gpio Driver Init
> [ 1415.642646] gpio TRY register Driver
> [ 1415.642881] err number = -17
> [ 1415.642885] err EEXIST = -17
> [ 1415.642922] ------------[ cut here ]------------
> [ 1415.643010] kernel BUG at mm/slub.c:3873!
> [ 1415.643066] invalid opcode: 0000 [#1] SMP
>



More information about the Xenomai mailing list