Good to know about input_abs_set_res().  I'll prepare a patch this weekend.

On 12/09/10 20:07, Peter Hutterer wrote:
> On Thu, Dec 09, 2010 at 04:55:18PM -0800, Ping Cheng wrote:
>> On Thu, Dec 9, 2010 at 4:03 PM, Peter Hutterer<[email protected]>  
>> wrote:
>>> Have a look at the drivers/input/mouse/synaptics.
>>> commit ec20a022aa24fc63d3ab59584cb1e5aa9a21d46c
>>> Refs: v2.6.30-36-gec20a02
>>>
>>>    Input: synaptics - add support for reporting x/y resolution
>>
>> So, resolution was added to the driver in 2.6.30. But
>> input_abs_set_res() was only added in 2.6.35.
>
> yeah, if you look at the commit message for the input_abs_* this was part of
> a larger refacturing so drivers don't access the struct fields directly but
> use input_abs_set_min(), etc.
>
> before that, the drivers wrote straight to dev->absres[ABS_X].
>
> my guess that input_abs_set_params() doesn't have a resolution field is that
> there's not that many devices that do resolution, so for most drivers it'd
> just be 0 anyway. just a guess.
>
>
>>> the driver currently uses input_abs_set_res(), added in
>>> commit 987a6c0298260b7aa40702b349282554d6180e4b
>>> Refs: v2.6.35-rc3-59-g987a6c0
>>>
>>>     Input: switch to input_abs_*() access functions
>>>
>>>
>>> synaptics and evdev both get the resolution from the kernel, if the
>>> respective kernel driver sets it.
>>
>> This means a valid resolution will be received if LINUX_VERSION_CODE
>>> = KERNEL_VERSION(2,6,35) instead of>  2.6.30.
>
> no, any kernel>  2.6.30 will expose resolution to the client. that's when
> the ABI for struct absinfo changed. it's just become more convenient to set
> resolution in kernel drivers with .35, but for userspace there was no
> difference. ec20a022aa24f did it for synaptics in 2.6.31 and the same
> approach could be backported to all kernel versions wacom cares about,
> you'll just have to do it manually through dev->absres[].
>
> Cheers,
>    Peter
>
>> This is still good news. Thank you, Peter, for the heads up.
>>
>> Ping
>>

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to