David Brownell wrote:
>On Friday 06 May 2005 9:15 pm, mike lee wrote:
>
>
>>David Brownell wrote:
>>
>>
>>>>On Wednesday 04 May 2005 7:34 pm, mike lee wrote:
>>>>
>>>>
>>>>
>>>>>> I just finish my draft version gadget controller driver on imx
>>>>>>platform,
>>>>>>
>>>>>>
>>>>Great! If that'll be generally available, I'll mention i.MX on
>>>>the webpage.
>>>>
>>>>
>> It still need to debug more, and only support PIO control and bulk.
>>Int endpoint is now under debug.
>>
>>
>
>Bulk and interrupt can be identical ... though maybe the hardware
>cuts some corners on interrupt endpoints, like limiting FIFO size
>and not supporting double buffering. DMA should be a big win on
>something like an i.MX though.
>
>
>
yes, i am working hard on the dma part.
>
>
>> Also i found that there is a bcddevice no in all gadget drivers. Do
>>i need to register officially?
>>
>>
>
>That is, to fit into blocks of code like:
>
> } else if (gadget_is_omap (gadget)) {
> device_desc.bcdDevice = __constant_cpu_to_le16 (0x0208);
> } else if (gadget_is_lh7a40x(gadget)) {
> device_desc.bcdDevice = __constant_cpu_to_le16 (0x0209);
> ...
> } else if (gadget_is_at91(gadget)) {
> device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213);
>
>Why don't you use "0x214", and send me the patch for "gadget.h" and all
>the gadget drivers. You can do that before you post the driver, and
>having that stuff merged now will simplify things later.
>
>(Those blocks of code have two purposes. One is that sometimes they
>need to do chip-specific things, usually to cope with chips trying
>to dictate things like endpoint or altsetting numbers, or to handle
>limitations in endpoint type or number. The other is so that the
>host side has a hook to do similar things.)
>
>
>
>
Actually, i have taken bcddevice 0x212 which doesn't obtain by
anyone in kernel 2.6.10. May be i change to use 0x214,
I will send you the patch later.
>>>>>>but how can i benefit from the hotplug function provided from
>>>>>>kernel? Do i need to provide the hotplug function in my driver, and
>>>>>>example for hotplugging gadget?
>>>>>>
>>>>>>
>>>>The gadget framework itself doesn't currently use hotplug for anything,
>>>>though of course layers above it can certainly do so. There's been no
>>>>reported need for "hot" reconfiguration.
>>>>
>>>>What were you thinking hotplug should do?
>>>>
>>>>
>> Actually, upgrading the firmware and backup storage functions are
>>the main purposes to use usb. My idea to upgrading firmware is that
>>firmware download thought backup storage gadget and when the cable
>>unplug or press a key, a daemon copy the file to my flash.
>>
>>
>
>It might be better to look at using the DFU class spec; that's something
>that can reasonably be done with a simple gadgetfs driver writing to
>the relevant /dev/mtd/N partition for the kernel, rootfs, or whatever.
>
>Of course the really tricky bit about firmare updates is that you need
>to have some way to prevent "bricking" your device ... end users are
>not going to have JTAG access to reprogram things in case the write to
>that MTD partition breaks, and turns the device (cell phone or whatever)
>into a brick.
>
>
>
I don't know DFU class before, but is there any standard driver in
window? Frankly speaking, it is important for common users. Also, i
trend to use button/led solution, DFU class should be the next phase.
>
>
>> So, i wanna know if there is a method or example on how to signal
>>hotplugging to the daemon
>>
>>
>
>You can just call_usermodehelper() directly if you really want that,
>but it doesn't seem to me like hotplug is a good match for what you've
>described. In particular, unplugging a cable can happen at any time;
>it shouldn't be treated the same as an affirmative user direction
>that it's now _safe_ to do something potentially dangerups.
>
>- Dave
>
>
I do have many questions on gadget subsystem. May be i start another
post.
Thanks for your helps ,Dave.
best regard
Mike,Lee
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel