ite-cir: 8709 needs to use pnp resource 2
commitcb9131e898a0f61df3877a109ff383afe04a90aa
authorJarod Wilson <jarod@redhat.com>
Tue, 7 Jun 2011 21:45:17 +0000 (7 18:45 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 9 Jul 2011 06:15:17 +0000 (8 23:15 -0700)
tree1a9042597b020ff966da8bd1ffcbf801bc1900cd
parent5a17a780a4491afae243c6ac97381214d0fc3346
ite-cir: 8709 needs to use pnp resource 2

commit 35d136c8dab034ee14aa00d6082229b4b74607da upstream.

Thanks to the intrepid testing and debugging of Matthijs van Drunen, it
was uncovered that at least some variants of the ITE8709 need to use pnp
resource 2, rather than 0, for things to function properly. Resource 0
has a length of only 1, and if you try to bypass the pnp_port_len check
and use it anyway (with either a length of 1 or 2), the system in
question's trackpad ceased to function.

The circa lirc 0.8.7 lirc_ite8709 driver used resource 2, but the value
was (amusingly) changed to 0 by way of a patch from ITE themselves, so I
don't know if there may be variants where 0 actually *is* correct, but
at least in this case and in the original lirc_ite8709 driver author's
case, it sure looks like 2 is the right value.

This fix should probably be applied to all stable kernels with the
ite-cir driver, lest we nuke more people's trackpads.

Tested-by: Matthijs van Drunen
Acked-by: Juan Jesús García de Soria <skandalfo@gmail.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/rc/ite-cir.c
drivers/media/rc/ite-cir.h