[RFC] linux-input: dynamically allocate ABS axis information

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

 



To support more axis on input devices, we should dynamically allocate
ABS axis information. Currently, six values (value, min, max, fuzz,
flat and resolution) are stored in arrays, each of ABS_CNT elements.

The following four patches makes the input core reuse the input_absinfo
struct and only carry one pointer per axis. These structs are allocated
on demand now, making it less painful to add new ABS axis eventually.

As everything is now nicely abstracted, we might even move over to a
more efficient storage than a linear pointer, but that can be done
later.

I successfully tested this on my desktop machine here.

Let me know what you think.

Thanks,
Daniel

[PATCH 1/4] input: use ABS_CNT rather than (ABS_MAX + 1)
[PATCH 2/4] input: add static inline helpers for ABS properties
[PATCH 3/4] input: switch to input_abs_*() access functions
[PATCH 4/4] input: dynamically allocate ABS information
--
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