How to identify a gpio-keys-polled input device from userspace?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all...

I am running in a small problem right now. I need to identify the
reset button from userspace on different boards.

I thought that I could iterate over all /dev/input/eventX devices and
use some ioctl magic to get the correct one.

        char name[256] = "Unknown";
        ioctl(inputdev->handle(), EVIOCGNAME(sizeof(name)), name);

Returns gpio-keys-polled... looks fine, but I have more then 1 button.

In my out-of-tree platform-glue-driver I have this:

static struct gpio_keys_button bpc600_gpio_keys[] = {
        {
                .code = BTN_EXTRA, /* See include/linux/input.h */
                .gpio = 12,
                .active_low = 1,
                .desc = "reset",
                .wakeup = 0,
        },
};

Is there a way to get desc value from userspace?

thanks
--
Christian Gmeiner, MSc
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux