Hi all, Over the past few years, handhelds.org has been maintaining a small gadget inside of its own tree called "g_char". g_char was spawned in the days before g_serial, as a response to the new USB gadget API's replacement of the old way of doing things (usb_char talking to gadget controller drivers with no common API). [1]
Recently, I found that g_serial was a little too complex for our needs for a current project (Linux as Bootloader), so I decided to spend some hours resurrecting g_char, and I think I have it in a state in which it's ready to push upstream. g_char is a g_zero-derived gadget, as many others are, supporting one configuration. It registers a misc device (10, 240 -- is there something I should be doing with this that's better? I believe that's what usb-char did in the past), which can be opened once the gadget has been bound. Reads are buffered, but writes are not. It emulates a seriial device in that it does not error if there is nothing on the other side, which is a characteristic that is vital for LAB (at the moment). It is not as fully functional as g_serial, but it does not intend to be -- its main goal is to stay small in a situation where every byte counts: text data bss dec hex filename 14454 596 332 15382 3c16 drivers/usb/gadget/g_serial.o 6220 484 104 6808 1a98 drivers/usb/gadget/g_char.o [EMAIL PROTECTED]:~/Code/iPAQ/kernel26$ wc -l drivers/usb/gadget/serial.c drivers/usb/gadget/char.c 2437 drivers/usb/gadget/serial.c 921 drivers/usb/gadget/char.c It can be presently retrieved from handhelds.org CVS, or downloaded from my site[2]. The requisite line in Makefile is as such: g_serial-objs := serial.o usbstring.o config.o epautoconf.o and the requisite Kconfig goo is as such: config USB_G_CHAR tristate "Character Gadget" help Character Gadget is what usb-char used to be. Have fun. I understand that it'll probably not be ready for a commit now, but it's a lot cleaner than it used to be. Can someone run a pair of eyes over it and tell me if anything is glaringly preventing it from going into the tree? Thanks, joshua [1] http://marc.theaimsgroup.com/?l=linux-usb-devel&m=106254956522642&w=2 [2] http://joshuawise.com/char.c ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel