Thread (20 messages) 20 messages, 5 authors, 2010-08-13

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

From: Daniel Mack <hidden>
Date: 2010-05-19 17:23:30
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help