HP TC1100 pen is not supported

Bug #13196 reported by Jeff Hodges
6
Affects Status Importance Assigned to Milestone
linux-source-2.6.15 (Ubuntu)
Fix Released
Medium
Chuck Short

Bug Description

Hoary (nor Warty) supports the pen for the HP TC1100 tablet pc. Support can
supposedly be added in a 2.6.9 kernel with the attached patch. I've attempted
to create a working dpatch for ubuntu 2.6.10 kernel (the TC1100 I have is a P4
machine, but there are a few Transmeta TC1100s out there) from this patch but
ran into a problem, acpi_get_possible_resources() required by the patch is
(almost) non-existent. More about this later, but first let's talk about what
is happening on my system. The ubuntu kernel, even w/o the wacom module loaded,
does seem to recognize the screen itself. Using wacdump -f c100, a device
"MODEL=Acer C100 Tablet PC Screen" was found at /dev/ttyS0. I tried following
the directions at the same site I found the patch[1] without the patch being
installed and loading the wacom module instead with no luck. As such, It
appears that the wacom_acpi patch is necessary for the pen to work, even in the
newer kernels. The pen supposedly should be at /dev/ttyS4, but my attempts to
find it there have been thwarted(I get an "Invalid Argument" error from
wacdump). I ran wacdump -f c100 on /dev/ttyS*, up to /dev/ttyS17, before giving
up. The patch I speak of creates a module, wacom_acpi, that supposedly can make
the pen usable, but I have not been able to get the module into a workable form.

Now about that "(almost) non-existent" code. The ACPI project devel mailing
list at sourceforge claimed that merely copying the "necessary code" from being
hidden behind an "#ifdef ACPI_FUTURE_USAGE" in acpi/acpixf.h into the patch
would fix the problem[2]. The module compiles, however, it says that the symbol
"acpi_get_possible_resources" is not defined. A closer examination of the
function and I determined that it was solely a *declaration* of the
acpi_get_possible_resources function without a definition. I am by no means a
decent C or kernel hacker so I may have this all wrong. Earlier in the same
thread, someone claimed that putting #define ACPI_FUTURE_USAGE 1 in the module,
but I am unable to reproduce this and in fact, it breaks my compile when
including acpi/acpixf.h. Another email points out that this solution is poor
anyway, as the #ifdef is there prevent extraneous definitions that serve no
purpose, hence the "future usage" moniker.

So, I'm at a loss. Is there anyway I could get someone with much greater
kernel-fu to help me debug this situation? I'm more than willing to spend lots
of compile cycles getting this fixed but I just need some help getting a patch
that might work. I can't seem to find the button to attach patches, but perhaps
thats can only be done in response to a bug. Bah, its obvious how often I've
used bugzilla.

[1] http://www.theory.bham.ac.uk/staff/schofield/linux/tc1100/#pen
[2] http://sourceforge.net/mailarchive/message.php?msg_id=10581185

Revision history for this message
Jeff Hodges (jmhodges) wrote :

Created an attachment (id=1431)
The wacom_acpi patch to enable the HP TC1100 tablet pen

Revision history for this message
Jeff Hodges (jmhodges) wrote :

Created an attachment (id=1432)
My attempt at creating a dpatch for the ubuntu kernel

This was my attempt to patch the ubuntu kernel using the debian tools. This
dpatch will fail compile fine, but will have a missing
"acpi_get_possible_resources" when the wacom_acpi module is modprobe'd.

Revision history for this message
Jeff Hodges (jmhodges) wrote :

(From update of attachment 1431)
This patch edits drivers/serial/Kconfig (per usual), adds a file
drivers/serial/wacom_acpi.c and adds said file to the Makefile in
drivers/serial/.

Revision history for this message
Jeff Hodges (jmhodges) wrote :

(In reply to comment #2)
> Created an attachment (id=1432) [edit]
> My attempt at creating a dpatch for the ubuntu kernel
>
> This was my attempt to patch the ubuntu kernel using the debian tools. This
> dpatch will fail compile fine, but will have a missing
> "acpi_get_possible_resources" when the wacom_acpi module is modprobe'd.

I just double checked the patch and realized this description is wrong. With
the "static acpi_status acpi_get_possible_resources" line, the compile will fail
with some yelling about having a static declaration but no defintion. In the
above post, I was thinking of the same code sans the "static". Also, I should
point out that the wacdump binary comes from the wacom-tools dpkg.

Revision history for this message
Chuck Short (zulcss) wrote :

Ive added this to the kernel team todo list so we wont forget about it until
after hoary is released.

Revision history for this message
Jeff Hodges (jmhodges) wrote :

Created an attachment (id=1487)
Now with acpixf.h goodness

I found that acpi_get_possible_resources is defined in
drivers/acpi/resources/rsxface.c and also contains the appropriate
EXPORT_SYMBOL call for it. That's when I slapped my forehead and removed the
#ifdef around the declaration in include/acpi/acpixf.h and tossed "#include
<acpi/acpixf.h>" into wacom_acpi.c (created in this patch). "This should do
it", I thought, but found I was quite wrong. acpi_get_possible_resources is
still an unknown symbol.I have no idea what I'm leaving out of this equation
but it seems my kernel hacking skills are even weaker than previously imagined.
 On the surface, it seems that rsxface.c is always built (and built in) but I
could be wrong. Does wacom_acpi need to depend on it? Or perhaps, it's merely
the fact that I screwed up the build of the kernel somehow? I went through all
of the steps from the wiki (KernelBuildpackageDetailedHowto) and I've had more
than a little experience compiling by hand, but maybe something in there sent
me wrong.

I'm assuming this is a simple 2 minute fix that I just can't see.

Revision history for this message
Jeff Hodges (jmhodges) wrote :

There anything I can do to help move this along?

Revision history for this message
Chuck Short (zulcss) wrote :

New kernel will hit the archive soon

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.