Re: [PATCH 2.6.20 1/1] usb/input updated aiptek tablet driver

Pete Zaitcev <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization Red Hat, Inc.
Message-ID <[email protected]>
On Fri, 09 Mar 2007 20:27:30 -0600, Bryan Headley <[email protected]> wrote:

> >> +	/* We now will look for the evdev device which is mapped to
> >> +	 * the tablet. The partial name is kept in the link list of
> >> +	 * input_handles associated with this input device.
> >> +	 * What identifies an evdev input_handler is that it begins
> >> +	 * with 'event', continues with a digit, and that in turn
> >> +	 * is mapped to /{devfs}/input/eventN.
> >> +	 */
> >> +	inputdev = aiptek->inputdev;
> >> +	list_for_each_safe(node, next, &inputdev->h_list) {
> >> +		inputhandle = to_handle(node);
> >> +		if (strncmp(inputhandle->name, "event", 5) == 0) {
> >> +			strcpy(aiptek->features.inputPath,
> >> +			       inputhandle->name);
> >> +			break;
> >> +		}
> >> +	}
> > 
> > This is something I wanted to discuss with aiptek developers, because
> > of races walking h_list outside of input core itself, where you do not
> > have access to core's locks. This cannot be safe.
> > 
> > Is it feasible to get rid of this feature altogether?
> 
> Problem is, the tablet has to be at a /dev/entry that's knowable to the
> xorg driver. The original thought was, we figure out which
> /dev/input/eventX device entry the driver/device is mapped to, expose
> that mapping to one of our (many) sysfs files, then do a "sed
> 's_AIPTEK_DEVICE_/dev/input/eventX_g' /etc/xorg.conf.master >
> /etc/xorg.conf" ...

I see, thanks for explaining. So, the question is, can you replace
that sed script with a perl scriptlet which reads /sys/class/input/input*
and does the same thing? I understand that following the maze of links
is somewhat annoying, but perhaps all it takes is (in bash):

 cd /sys/class/input
 for i in input*; do
   if [ "$(basename $(ls -L $i/device/driver))" == "aiptek" ]; do
     goto found
   fi
 done

There's a question of compatibility, of course, but perhaps the replacement
script can be rolled out over the space of a couple of kernel releases?

-- Pete

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.