Writing SocketCAN driver

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Writing SocketCAN driver

ffeldbauer
This post has NOT been accepted by the mailing list yet.
Hey all,

I have a CAN interface for the Raspberry Pi computer using a SJA1000 directly connected to the GPIOs of the CPU.
So far this interface is used as chardev.
I'm also developing a user-space program using this CAN interface. This program should also be compatible with other CAN interfaces like the ones from PEAK or Kvazer. So I thought using socketCAN would be a good idea.

Is there any documentation on how to write a socketCAN compatible kernel module for my own hardware?
I tried google it, but found nothing so far.

Should I write an extension to the existing socketCAN module from the linux kernel, or should I write a stand-alone kernel module instead?
Which functions do I need to implement as interface for socketCAN?
How do I change bitrate of the interface (from a user-space C program)?

Any help appreciated!

Best regards,
Florian