* How to design protocol stack with can-bus driver of character driver
@ 2011-01-13 16:42 cheng chen
2011-01-13 16:51 ` Daniel Baluta
2011-01-13 17:40 ` Greg KH
0 siblings, 2 replies; 4+ messages in thread
From: cheng chen @ 2011-01-13 16:42 UTC (permalink / raw)
To: kernelnewbies
Hi all,
I am working on vehicle body control system with can-bus as my BE final
project.
It contains three parts.
1.CAN chip driver
2.CAN-bus protocol stack
3.UI
The problem is that I already have written the CAN chip driver as a
character device driver using IO-simulated SPI.
So with this character driver API open() read() write() ioctl(), I start to
wonder where can I put my protocol stack?
Or should rewrite the driver in network device frameworks?
Thx
--
Cheng(?)
Fedora Project Contributor -- Ambassador
https://fedoraproject.org/wiki/User:Freakrobot
_______________________________________________
My Page: http://freakrobot.blogbus.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110114/5f6d4a3f/attachment.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to design protocol stack with can-bus driver of character driver
2011-01-13 16:42 How to design protocol stack with can-bus driver of character driver cheng chen
@ 2011-01-13 16:51 ` Daniel Baluta
2011-01-13 17:40 ` Greg KH
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Baluta @ 2011-01-13 16:51 UTC (permalink / raw)
To: kernelnewbies
Hi,
On Thu, Jan 13, 2011 at 6:42 PM, cheng chen <freakrobot@acm.org> wrote:
> Hi all,
> I am working on vehicle body control system with can-bus as my BE final
> project.
> It contains three parts.
> 1.CAN chip driver
> 2.CAN-bus protocol stack
> 3.UI
> The problem is that I?already?have written the CAN chip driver as ?a
> character device driver using IO-simulated SPI.
> So with this character driver API open() read() write() ioctl(), I start to
> wonder where can I put my protocol stack?
> Or should rewrite the driver in network device frameworks?
I strongly recommend you to have a look at Socket CAN ([1]).
thanks,
Daniel.
[1] http://lxr.linux.no/linux+v2.6.37/Documentation/networking/can.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to design protocol stack with can-bus driver of character driver
2011-01-13 16:42 How to design protocol stack with can-bus driver of character driver cheng chen
2011-01-13 16:51 ` Daniel Baluta
@ 2011-01-13 17:40 ` Greg KH
2011-01-14 5:20 ` cheng chen
1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2011-01-13 17:40 UTC (permalink / raw)
To: kernelnewbies
On Fri, Jan 14, 2011 at 12:42:52AM +0800, cheng chen wrote:
> Hi all,
> I am working on vehicle body control system with can-bus as my BE final
> project.
> It contains three parts.
>
> 1.CAN chip driver
> 2.CAN-bus protocol stack
> 3.UI
>
> The problem is that I already have written the CAN chip driver as a
> character device driver using IO-simulated SPI.
Oops, don't do that.
> So with this character driver API open() read() write() ioctl(), I start to
> wonder where can I put my protocol stack?
Use the in-kernel CAN protocol stack, that is much easier.
> Or should rewrite the driver in network device frameworks?
Yes.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to design protocol stack with can-bus driver of character driver
2011-01-13 17:40 ` Greg KH
@ 2011-01-14 5:20 ` cheng chen
0 siblings, 0 replies; 4+ messages in thread
From: cheng chen @ 2011-01-14 5:20 UTC (permalink / raw)
To: kernelnewbies
OK, I guess at least my previous work can be used for reference group.
Thanks for both of you.
On Fri, Jan 14, 2011 at 1:40 AM, Greg KH <greg@kroah.com> wrote:
> On Fri, Jan 14, 2011 at 12:42:52AM +0800, cheng chen wrote:
> > Hi all,
> > I am working on vehicle body control system with can-bus as my BE final
> > project.
> > It contains three parts.
> >
> > 1.CAN chip driver
> > 2.CAN-bus protocol stack
> > 3.UI
> >
> > The problem is that I already have written the CAN chip driver as a
> > character device driver using IO-simulated SPI.
>
> Oops, don't do that.
>
> > So with this character driver API open() read() write() ioctl(), I start
> to
> > wonder where can I put my protocol stack?
>
> Use the in-kernel CAN protocol stack, that is much easier.
>
> > Or should rewrite the driver in network device frameworks?
>
> Yes.
>
> thanks,
>
> greg k-h
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
Cheng(?)
Fedora Project Contributor -- Ambassador
https://fedoraproject.org/wiki/User:Freakrobot
_______________________________________________
My Page: http://freakrobot.blogbus.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110114/2fe8c6bd/attachment.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-14 5:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 16:42 How to design protocol stack with can-bus driver of character driver cheng chen
2011-01-13 16:51 ` Daniel Baluta
2011-01-13 17:40 ` Greg KH
2011-01-14 5:20 ` cheng chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).