LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-07-2008, 04:46 AM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 220

Rep: Reputation: 32
(ioctl(ts->fd, EVIOCGVERSION, &version) returns me -1, why??


Hello,

(ioctl(ts->fd, EVIOCGVERSION, &version)

I would like to known why ioctl retuns me -1.
I understand that this fuction returns me version of drivers of device.
is it correct or no?
And if the answer is yes, what is the problem, driver return me more information????

Best regards
John Martin
 
Old 07-07-2008, 06:04 AM   #2
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 220

Original Poster
Rep: Reputation: 32
Hello

Well , I have found this

(ioctl(ts->fd, EVIOCGVERSION, &version)) returns me -1

but this other

(ioctl(ts->fd, HIDIOCGVERSION, &version)) returns me 0

In my kernel source, touchscreen device is configurate as HID_USB device.

is there any difference between EVIOCGVERSION and HIDIOCGVERSION???

Best regards
 
Old 07-07-2008, 06:15 AM   #3
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Quote:
Originally Posted by webquinty View Post
is there any difference between EVIOCGVERSION and HIDIOCGVERSION???
The supported IOCTLs depend on the device and the driver. If the return value is '-1' you should check the value of 'errno' for more information on what went wrong.
 
Old 07-07-2008, 07:54 AM   #4
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 220

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by pinniped View Post
The supported IOCTLs depend on the device and the driver. If the return value is '-1' you should check the value of 'errno' for more information on what went wrong.

Hello,

well, I made some changes to obtain errno when ioctl returns me -1

errno = 25 --> ENOTTTY. This almost always is the result of an ioctl() call applied to an inappropriate device type.

As I understand, this error is normal, because my device is not a input charcater, it is a HID device, then this is the reason of error, I understand.

Well, now I need to known if I can use TSLIB with this device, but this question is not for this forum.

thank you very much pinniped.

Best regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What Version Of Ubuntu Is This & Is It A Stable Version? Ntvu Linux - Newbie 2 06-10-2008 03:01 AM
How to pass IOCTL arguments from usespace ioctl call devkpict Linux - Kernel 1 12-07-2007 06:45 PM
uname returns incorrect kernel version mszenher Slackware - Installation 4 12-22-2005 05:23 AM
scanpci returns fatal error & modem init string? billybob92 Linux - Newbie 1 02-01-2004 02:12 PM
Libs Version & Fonts & Wireless dhruiz Linux - Newbie 1 11-04-2003 09:48 PM


All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration