From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Ott Subject: Re: Report ID problem with HID-RAW interface usage Date: Wed, 30 Jun 2010 08:32:22 -0400 Message-ID: <4C2B3956.6080107@signal11.us> References: <4C2A1FA0.6020704@signal11.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jiri Kosina , Amit Nagal Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Antonio Ospite List-Id: linux-input@vger.kernel.org >> 2) >> >> ioctl which sets a flag so that when device sends a report , report >> id& report type is prefixed >> to output of read() . >> i mean when application calls read , it gets input report as> id> >> right now we get only . >> > Please see the commit 5a38f2c7c4dd53d5be097930902c108e362584a3. That makes > sure that report id should be there properly. Do you still see any problem > with this commit applied? (2.6.34 is the first kernel to have this one). > That commit removes an extra byte from the beginning of reports handed to read(). If I understand correctly, it doesn't do what he's asking. For devices which use numbered reports, reports which come from read() have the report ID at the beginning, in the form: For devices which do _not_ use numbered reports, only the payload is sent. Of course, since the device only uses a single report, a report number does not even make sense, and is not needed, since you know which report it is (as there is only one). The form is: It is not necessary to return the report type, because the read() interface will only give you INPUT reports which come over the INTERRUPT IN endpoint (usually EP 1 IN). FEATURE reports must come through the GET_FEATURE request over the CONTROL endpoint, initiated by the HIDIOCGFEATURE ioctl (Note that this ioctl is part of what Jiri has staged for the next merge window, and is not part of the current 2.6.34 Kernel). OUTPUT reports are never sent from the device on the INTERRUPT IN endpoint. In short, if it comes from read(), it's always an INPUT report. Alan. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html