Greg KH wrote:
On Fri, Jan 01, 2010 at 02:06:26PM -0500, Mike Dunn wrote:
Hi folks,
I'm hoping to solicit some guidance on how a driver for this device
could fit into the usb driver code base. It is an odd creature that
implements a serial port and IEEE 1284-compliant parallel port, both on
the same usb interface :-( As such, it violates some basic assumptions
made by the usbserial core. The patch below implements support for the
serial port by adding a short but ugly device-specific hack to
usb-serial.c, along with the necessary changes to mos7720.c (the
existing driver for Moschip's dual serial port device). Works well for
me and doesn't break anyone else, but I suspect the hack may disqualify
it for inclusion in the kernel.
I don't think you need to do that. Just reorder and reassign the
endpoints in the driver itself, don't worry about what the usb-serial
core found, if you don't use those, no harm done.
So with that type of change, this patch should only touch the driver
itself, and I would have no problem applying that to the tree.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks for having a look. Yes, I see what needs to be done; patch to
follow.
Since I sent the original email, I've implemented parallel port support
for this device in a stand-alone module. I'm still testing, but so far
it is working nicely on an SMP machine. Would you consider merging that
into mos7720.c when I'm done? The parallel port can be registered /
unregistered with the parport subsystem within the attach / release
usb-serial callbacks. I haven't been able to see any problems with it,
other than the incongruity of creating a parallel port within the usb
serial subsystem (kind of like working a side job behind your primary
employer's back). It would be completely orthogonal to the serial port
functionality, and would not share any path of execution with the 7720
device. Seems a shame to waste half the device's functionality. Too bad
Moschip didn't put the parallel port on separate usb interface.
Thanks again,
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html