Re: New USB driver, looking for advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 10 Dec 2020 at 20:36, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
> >>> I have the feeling that current drivers are for devices that can
> >>> return data by just scheduling read transfer.
> >>
> >> Yes. Current drivers get notified by the device, if there is a CAN frame waiting.
> >>
> >>> Anyone would have a clue on how these drivers work, and if my device
> >>> is really that special?
> >>
> >> Yes, your device is quite special :)
> >
> > Hum, no good news...
> >
> > The device has 3 interfaces:
> > - keyboard
> > - mouse
> > - device specific (CAN)
>
> I think you have to implement the polling yourself. Start a transfer on
> ndo_open(). In the completion handler handle the received data. In case you have
> recieved a CAN frame, submit a new transfer in case you haven't received data
> yet, schedule delayed work with a delay, e.g. 1ms. Once you have that running
> you have fine tune the number of running transfers and delays.

Thanks Marc for the hints.
I'll look into that, this will certainly take time, I'm not in a rush.
Full disclosure: I am actually an employee of Navico (the manufacturer
of the device), I'm currently waiting for approval to publish code
related to that device. This shouldn't be an issue, I just need the
administrative work done.

Chris



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux